mirror of
https://github.com/LCTT/TranslateProject.git
synced 2026-09-04 04:32:49 +08:00
Merge branch 'master' of https://github.com/LCTT/TranslateProject into new
This commit is contained in:
@@ -1,99 +0,0 @@
|
||||
translating by ryze-borgia
|
||||
Getting Linux Jobs
|
||||
======
|
||||
|
||||
In a qualitative review of job posting websites, even highly skilled Linux administrators would be hamstrung to succeed in getting to the stage of an interview.
|
||||
|
||||
All of this results in hundreds of decent and skilled people being snubbed without cause simply because today's job market requires a few extra tools to increase the odds.
|
||||
|
||||
I have two colleagues and a cousin who have all received certifications with RedHat, managed quite extensive server rooms, and received earnest recommendations from former employers.
|
||||
|
||||
All of these skills, certifications and experience come to naught as they apply to employer ads that are crudely constructed by someone hurriedly cutting and pasting snippets of "skill words" from a list of technical terms.
|
||||
|
||||
Not surprisingly, today's politeness has gone the way of the bird, and a **non-response** from companies posting ads seems to be the new way of communicating.
|
||||
|
||||
Unfortunately, it also means that these recruiters/HR personnel probably did **not** get the best candidate.
|
||||
|
||||
The reason I can say this with such conviction is because of the type of buffoonery that takes place so often when creating job ads in the first place.
|
||||
|
||||
Walter, another [Reallylinux.com][3] guest writer, presented how [**Job Want Ads Have Gone Mad**][4].
|
||||
|
||||
Perhaps he's right. However, I believe every Linux job seeker can avoid pitfalls of a job hunt by keeping in mind **three key facts** about job ads.
|
||||
|
||||
First, few advertisements for Linux administrators are exclusively about Linux.
|
||||
|
||||
Bear in mind the occasional Linux system administrator job, where you would actually be using Linux on servers. Instead, many jobs that rise up on a "Linux administrator" search are actually referring to a plethora of 'NX operating systems.
|
||||
|
||||
For example, here is a quote from a **"Linux Administrator"** job posting:
|
||||
This role will provide support for build system integration, especially operating system installation support for BSD applications...
|
||||
|
||||
Or another ad declares in the bowels of its content:
|
||||
Windows administration experience required.
|
||||
|
||||
Ironically, if you show up to interview for any of these types of jobs and focus on Linux, they probably will not choose you.
|
||||
|
||||
Even more importantly, if you simply include Linux as your expertise, they may not even bother with your resume, because they can't tell the difference between UNIX, BSD, Linux, etc.
|
||||
|
||||
As a result, if you are conscientious and only include Linux on your resume, you are automatically out. But change that Linux to UNIX/Linux and you end up getting a bit farther in the human resources bureaucracy.
|
||||
|
||||
I had two colleagues that ended up changing this on their resumes and getting a much better hit ratio for interviews, which were still slim pickings because most job ads are tailored with some particular person already in mind. The main intent behind such job ads being a cover for the ass of the department making the claim of having an open job.
|
||||
|
||||
Second, the only person at the company who cares at all about the system administrator position is the technical lead/manager hiring for the slot. Others at the company, including the HR contact or the management could not care less.
|
||||
|
||||
I remember sitting in a board room as a fly on the wall, hearing one executive vice president refer to server administrators as "dime a dozen geeks." How wrong they are to suggest this.
|
||||
|
||||
Ironically, one day should the mail system fail, or the PBX connectivity hiccup, or perhaps core business files disappear from the intranet, these same executives are the first to get on the phone and threaten to fire the system admins.
|
||||
|
||||
Perhaps if they would stop leaving so many hot air telephone messages, or filling their emails with 35MB photographs of another vice president's fishing trip and wife, the servers wouldn't be so problematic.
|
||||
|
||||
Be aware that a Linux administrator ad, or any job posting for server administrator is placed because someone at the TECHNICAL level sees an urgent need for staffing. You're not going to get any empathy talking to HR or any leader of the company. Instead, take the time to find out who the hiring technical manager is and try to telephone them.
|
||||
|
||||
You can always call them directly because you have some "specific technical questions" you know the HR person could not answer. This opens the dialogue with the person who actually cares that the position is filled and ensures you get a foot in because you took the time for personal contact, even if it was a 60 second phone call.
|
||||
|
||||
What if the HR beauracracy won't let you through?
|
||||
|
||||
Start asking as many tech questions as possible direct to the HR hiring contact, such as how their Linux clusters are setup and do they run VMs exclusively? Anything relatively technical will send these HR people in a tizzy and allow you the question: "may I contact the technical manager of the team?"
|
||||
|
||||
If the response is a fluffy "maybe" or "I'll get back to you on that" they already filled the slot in their mind with someone else two weeks earlier, such as the HR staff member's fiance. They simply wanted it to look less like nepotism and more like indeterminism with a dash of egoism.
|
||||
|
||||
```
|
||||
"They simply wanted it to look less like nepotism and more like indeterminism with a dash of egoism."
|
||||
```
|
||||
|
||||
So take the time to find out who is the direct TECHNICAL leader hiring for the position and talk to them. It can make a difference and get you past some of the baloney.
|
||||
|
||||
Third, few job ads today include any semblance of reality.
|
||||
|
||||
I've seen enough ads requiring a junior system administrator with expertise that senior level experts don't have, to know the plan is to list the blue sky wish list and then find out who applies.
|
||||
|
||||
In this situation, the Linux administrator ad you apply for, should include some key phrases for which you already have experience or certifications.
|
||||
|
||||
The trick is to so overload your resume with the key phrases that MATCH their ad, it becomes almost impossible for them to determine which phrases you left out.
|
||||
|
||||
This doesn't necessarily translate to a job, but it often adds enough intrigue to get you an interview, which now a days is a major step.
|
||||
|
||||
By understanding and applying these three techniques, hopefully those seeking Linux administrator jobs have a head start on those who have only a slim chance in hell.
|
||||
|
||||
Even if these tips don't get you interviews right away, you can use the experience and awareness when you go to the next trade show, or company sponsored technical conference.
|
||||
|
||||
I strongly recommend you regularly attend these as well, especially if they are reasonably close, as they always provide a kick start to networking.
|
||||
|
||||
Remember that job networking now a days is a pseudonym for "getting the gossip on which companies are actually hiring and which ones are just lying about jobs to give the appearance of growth for shareholders."
|
||||
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://reallylinux.com/docs/gettinglinuxjobs.shtml
|
||||
|
||||
作者:[Andrea W.Codingly][a]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:http://reallylinux.com
|
||||
[1]:http://www.reallylinux.com
|
||||
[2]:http://reallylinux.com/docs/linuxrecessionproof.shtml
|
||||
[3]:http://reallylinux.com
|
||||
[4]:http://reallylinux.com/docs/wantadsmad.shtml
|
||||
@@ -1,156 +0,0 @@
|
||||
WangYueScream Tanslating
|
||||
---------------
|
||||
How to Install and Use FreeDOS on VirtualBox
|
||||
======
|
||||
This step-by-step guide shows you how to install FreeDOS on VirtualBox in Linux.
|
||||
|
||||
### Installing FreeDOS on VirtualBox in Linux
|
||||
|
||||
<https://www.youtube.com/embed/p1MegqzFAqA?enablejsapi=1&autoplay=0&cc_load_policy=0&iv_load_policy=1&loop=0&modestbranding=1&rel=0&showinfo=0&fs=1&playsinline=0&autohide=2&theme=dark&color=red&controls=2&>
|
||||
|
||||
In November of 2017, I [interviewed Jim Hall][1] about the history behind the [FreeDOS project][2]. Today, I’m going to tell you how to install and use FreeDOS. Please note: I will be using [VirtualBox][3] 5.2.14 on [Solus][4].
|
||||
|
||||
Note: I used Solus as the host operating system for this tutorial because it is very easy to setup. One thing you should keep in mind is that Solus’ Software Center contains two versions of VirtualBox: `virtualbox` and `virtualbox-current`. Solus gives you the option to use the linux-lts kernel and the linux-current kernel. `virtualbox`is modified for linux-lts and `virtualbox-current` is for linux-current.
|
||||
|
||||
#### Step 1 – Create New Virtual Machine
|
||||
|
||||
![][5]
|
||||
|
||||
Once you open VirtualBox, press the “New” button to create a new virtual machine. You can name it whatever you want, I just use “FreeDOS”. You can use the label to specify what version of FreeDOS you are installing. You also need to select the type and version of the operating system you will be installing. Select “Other” and “DOS”.
|
||||
|
||||
#### Step 2 – Select Memory Size
|
||||
|
||||
![][6]
|
||||
|
||||
The next dialog box will ask you how much of the host computer’s memory you want to make available to FreeDOS. The default is 32MB. Don’t change it. Back in the day, this would be a huge amount of RAM for a DOS machine. If you need to, you can increase it later by right-clicking on the virtual machine you created for FreeDOS and selecting Settings -> System.
|
||||
|
||||
![][7]
|
||||
|
||||
#### Step 3 – Create Virtual Hard Disk
|
||||
|
||||
![][8]
|
||||
|
||||
Next, you will be asked to create a virtual hard drive where FreeDOS and its files will be stored. Since you haven’t created one yet, just click “Create”.
|
||||
|
||||
The next dialog box will ask you what hard disk file type you want to use. This default (VirtualBox Disk Image) works just fine. Click “Next”.
|
||||
|
||||
The next question you will encounter is how you want the virtual disk to act. Do you want it to start small and gradually grow to its full size as you create files and install programs? Then choose dynamically allocated. If you prefer that the virtual hard drive (vhd) is created at full size, then choose fixed size. Dynamically allocated is nice if you don’t plan to use the whole vhd or if you don’t have very much free space on your hard drive. (Keep in mind that while the size of a dynamically allocated vhd increases as you add files, it will not drop when you remove files.) I prefer dynamically allocated, but you can choose the option that serves your needs best and click “Next”.
|
||||
|
||||
![][9]
|
||||
|
||||
Now, you can choose the size and location of the vhd. 500 MB should be plenty of space. Remember most of the programs you will be using will be text-based, thus fairly small. Once you make your adjustments, click Create,
|
||||
|
||||
#### Step 4 – Attach .iso file
|
||||
|
||||
Before we continue, you will need to [download][10] the FreeDOS .iso file. You will need to choose the CDROM “standard” installer.
|
||||
|
||||
![][11]
|
||||
|
||||
Once the file has been downloaded, return to VirtualBox. Select your virtual machine and open the settings. You can do this by either right-clicking on the virtual machine and selecting “Settings” or highlight the virtual machine and click the “Settings” button.
|
||||
|
||||
Now, click the “Storage” tab. Under “Storage Devices”, select the CD icon. (It should say “Empty” next to it.) In the “Attributes” panel on the right, click on the CD icon and select the location of the .iso file you just downloaded.
|
||||
|
||||
Note: Typically, after you install an operating system on VirtualBox you can delete the original .iso file. Not with FreeDOS. You need the .iso file if you want to install applications via the FreeDOS package manager. I generally keep the ,iso file attached the virtual machine in case I want to install something. If you do that, you have to make sure that you tell FreeDOS you want to boot from the hard drive each time you boot it up because it defaults to the attached CD/iso. If you forget to attach the .iso, don’t worry. You can do so by selecting “Devices” on the top of your FreeDOS virtual machine window. The .iso files are listed under “Optical Drives”.
|
||||
|
||||
#### Step 5 – Install FreeDOS
|
||||
|
||||
![][12]
|
||||
|
||||
Now that we’ve completed all of the preparations, let’s install FreeDOS.
|
||||
|
||||
First, you need to be aware of a bug in the most recent version of VirtualBox. If you start the virtual machine that we just created and select “Install to harddisk” when the FreeDOS welcome screen appears, you will see an unending, scrolling mass of machine code. I’ve only run into this issue recently and it affects both the Linux and Windows versions of VirtualBox. (I know first hand.)
|
||||
|
||||
To get around this, you need to make a simple edit. When you see the FreeDOS welcome screen, press Tab. (Make sure that the “Install to harddrive” option is selected.) Type the word `raw` after “fdboot.img” and hit Enter. The FreeDOS installer will then start.
|
||||
|
||||
![][13]
|
||||
|
||||
The first part of the installer will handle formatting your virtual drive. Once formatting is completed, the installer will reboot. When the FreeDOS welcome screen appears again, you will have to re-enter the `raw` comment you used earlier.
|
||||
|
||||
Make sure that you select “Yes” on all of the questions in the installer. One important question that doesn’t have a “Yes” or “No” answer is: “What FreeDOS packages do you want to install?. The two options are “Base packages” or “Full installation”. Base packages are for those who want a DOS experience most like the original MS-DOS. The Full installation includes a bunch of tools and utilities to improve DOS.
|
||||
|
||||
At the end of the installation, you will be given the option to reboot or stay on DOS. Select “reboot”.
|
||||
|
||||
#### Step 6 – Setup Networking
|
||||
|
||||
Unlike the original DOS, FreeDOS can access the internet. You can install new packages and update the ones already you have installed. In order to use networking, you need to install several applications in FreeDOS.
|
||||
|
||||
![][14]
|
||||
|
||||
First, boot into your newly created FreeDOS virtual machine. At the FreeDOS selection screen, select “Boot from System harddrive”.
|
||||
|
||||
![][15]
|
||||
|
||||
Now, to access the FreeDOS package manager, type `fdimples`. You can navigate around the package manager with the arrow keys and select categories or packages with the space bar. From the “Networking” category, you need to select `fdnet`. The FreeDOS Project also recommends installing `mtcp` and `wget`. Hit “Tab” several times until “OK” is selected and press “Enter”. Once the installation is complete, type `reboot` and hit enter. After the system reboots, boot to your system drive. If the network installation was successful, you will see several new messages at the terminal listing your network information.
|
||||
|
||||
![][16]
|
||||
|
||||
##### Note
|
||||
|
||||
Sometimes the default VirtualBox setup doesn’t work. If that happens, close your FreeDOS VirtualBox window. Right-click your virtual machine from the main VirtualBox screen and select “Settings”. The default VirtualBox network setting is “NAT”. Change it to “Bridged Adapter” and retry installing the FreeDOS packages. It should work now.
|
||||
|
||||
#### Step 7 – Basic Usage of FreeDOS
|
||||
|
||||
##### Commons Commands
|
||||
|
||||
Now that you have installed FreeDOS, let’s look at a few basic commands. If you have ever used the Command Prompt on Windows, you will be familiar with some of these commands.
|
||||
|
||||
* `DIR`– display the contents of the current directory
|
||||
* `CD` – change the directory you are currently in
|
||||
* `COPY OLD.TXT NEW.TXT`– copy files
|
||||
* `TYPE TEST.TXT` – display content of file
|
||||
* `DEL TEST.TXT` – delete file
|
||||
* `XCOPY DIR NEWDIR` – copy directory and all of its contents
|
||||
* `EDIT TEST.TXT`– edit a file
|
||||
* `MKDIR NEWDIR` – create a new directory
|
||||
* `CLS` – clear the screen
|
||||
|
||||
|
||||
|
||||
You can find more basic DOS commands on the web or the [handy cheat sheet][17] created by Jim Hall.
|
||||
|
||||
##### Running a Program
|
||||
|
||||
Running program on FreeDos is fairly easy. When you install an application with the `fdimples` package manager, be sure to note where the .EXE file of the application is located. This is shown in the application’s details. To run the application, you generally need to navigate to the application folder and type the application’s name.
|
||||
|
||||
For example, FreeDOS has an editor named `FED` that you can install. After installing it, all you need to do is navigate to `C:\FED` and type `FED`.
|
||||
|
||||
Sometimes a program, such as Pico, is stored in the `\bin` folder. These programs can be called up from any folder.
|
||||
|
||||
Games usually have an .EXE program or two that you have to run before you can play the game. These setup file usually fix sound, video, or control issues.
|
||||
|
||||
If you run into problems that this tutorial didn’t cover, don’t forget to visit the [home of FreeDOS][2]. They have a wiki and several other support options.
|
||||
|
||||
Have you ever used FreeDOS? What tutorials would you like to see in the future? Please let us know in the comments below.
|
||||
|
||||
If you found this article interesting, please take a minute to share it on social media, Hacker News or [Reddit][18].
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/install-freedos/
|
||||
|
||||
作者:[John Paul][a]
|
||||
选题:[lujun9972](https://github.com/lujun9972)
|
||||
译者:[译者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/john/
|
||||
[1]:https://itsfoss.com/interview-freedos-jim-hall/
|
||||
[2]:http://www.freedos.org/
|
||||
[3]:https://www.virtualbox.org/
|
||||
[4]:https://solus-project.com/home/
|
||||
[5]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2018/07/freedos-tutorial-1.jpg
|
||||
[6]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2018/07/freedos-tutorial-2.jpg
|
||||
[7]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2018/07/freedos-tutorial-3.jpg
|
||||
[8]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2018/07/freedos-tutorial-4.jpg
|
||||
[9]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2018/07/freedos-tutorial-6.jpg
|
||||
[10]:http://www.freedos.org/download/
|
||||
[11]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2018/07/freedos-tutorial-7.jpg
|
||||
[12]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2018/07/freedos-tutorial-8.png
|
||||
[13]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2018/07/freedos-tutorial-9.png
|
||||
[14]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2018/07/freedos-tutorial-10.png
|
||||
[15]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2018/07/freedos-tutorial-11.png
|
||||
[16]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2018/07/freedos-tutorial-12.png
|
||||
[17]:https://opensource.com/article/18/6/freedos-commands-cheat-sheet
|
||||
[18]:http://reddit.com/r/linuxusersgroup
|
||||
136
sources/talk/20181220 7 CI-CD tools for sysadmins.md
Normal file
136
sources/talk/20181220 7 CI-CD tools for sysadmins.md
Normal file
@@ -0,0 +1,136 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (7 CI/CD tools for sysadmins)
|
||||
[#]: via: (https://opensource.com/article/18/12/cicd-tools-sysadmins)
|
||||
[#]: author: (Dan Barker https://opensource.com/users/barkerd427)
|
||||
|
||||
7 CI/CD tools for sysadmins
|
||||
======
|
||||
An easy guide to the top open source continuous integration, continuous delivery, and continuous deployment tools.
|
||||

|
||||
|
||||
Continuous integration, continuous delivery, and continuous deployment (CI/CD) have all existed in the developer community for many years. Some organizations have involved their operations counterparts, but many haven't. For most organizations, it's imperative for their operations teams to become just as familiar with CI/CD tools and practices as their development compatriots are.
|
||||
|
||||
CI/CD practices can equally apply to infrastructure and third-party applications and internally developed applications. Also, there are many different tools but all use similar models. And possibly most importantly, leading your company into this new practice will put you in a strong position within your company, and you'll be a beacon for others to follow.
|
||||
|
||||
Some organizations have been using CI/CD practices on infrastructure, with tools like [Ansible][1], [Chef][2], or [Puppet][3], for several years. Other tools, like [Test Kitchen][4], allow tests to be performed on infrastructure that will eventually host applications. In fact, those tests can even deploy the application into a production-like environment and execute application-level tests with production loads in more advanced configurations. However, just getting to the point of being able to test the infrastructure individually is a huge feat. Terraform can also use Test Kitchen for even more [ephemeral][5] and [idempotent][6] infrastructure configurations than some of the original configuration-management tools. Add in Linux containers and Kubernetes, and you can now test full infrastructure and application deployments with prod-like specs and resources that come and go in hours rather than months or years. Everything is wiped out before being deployed and tested again.
|
||||
|
||||
However, you can also focus on getting your network configurations or database data definition language (DDL) files into version control and start running small CI/CD pipelines on them. Maybe it just checks syntax or semantics or some best practices. Actually, this is how most development pipelines started. Once you get the scaffolding down, it will be easier to build on. You'll start to find all kinds of use cases for pipelines once you get started.
|
||||
|
||||
For example, I regularly write a newsletter within my company, and I maintain it in version control using [MJML][7]. I needed to be able to host a web version, and some folks liked being able to get a PDF, so I built a [pipeline][8]. Now when I create a new newsletter, I submit it for a merge request in GitLab. This automatically creates an index.html with links to HTML and PDF versions of the newsletter. The HTML and PDF files are also created in the pipeline. None of this is published until someone comes and reviews these artifacts. Then, GitLab Pages publishes the website and I can pull down the HTML to send as a newsletter. In the future, I'll automatically send the newsletter when the merge request is merged or after a special approval step. This seems simple, but it has saved me a lot of time. This is really at the core of what these tools can do for you. They will save you time.
|
||||
|
||||
The key is creating tools to work in the abstract so that they can apply to multiple problems with little change. I should also note that what I created required almost no code except [some light HTML templating][9], some [node to loop through the HTML files][10], and some more [node to populate the index page with all the HTML pages and PDFs][11].
|
||||
|
||||
Some of this might look a little complex, but most of it was taken from the tutorials of the different tools I'm using. And many developers are happy to work with you on these types of things, as they might also find them useful when they're done. The links I've provided are to a newsletter we plan to start for [DevOps KC][12], and all the code for creating the site comes from the work I did on our internal newsletter.
|
||||
|
||||
Many of the tools listed below can offer this type of interaction, but some offer a slightly different model. The emerging model in this space is that of a declarative description of a pipeline in something like YAML with each stage being ephemeral and idempotent. Many of these systems also ensure correct sequencing by creating a [directed acyclic graph][13] (DAG) over the different stages of the pipeline.
|
||||
|
||||
These stages are often run in Linux containers and can do anything you can do in a container. Some tools, like [Spinnaker][14], focus only on the deployment component and offer some operational features that others don't normally include. [Jenkins][15] has generally kept pipelines in an XML format and most interactions occur within the GUI, but more recent implementations have used a [domain specific language][16] (DSL) using [Groovy][17]. Further, Jenkins jobs normally execute on nodes with a special Java agent installed and consist of a mix of plugins and pre-installed components.
|
||||
|
||||
Jenkins introduced pipelines in its tool, but they were a bit challenging to use and contained several caveats. Recently, the creator of Jenkins decided to move the community toward a couple different initiatives that will hopefully breathe new life into the project—which is the one that really brought CI/CD to the masses. I think its most interesting initiative is creating a Cloud Native Jenkins that can turn a Kubernetes cluster into a Jenkins CI/CD platform.
|
||||
|
||||
As you learn more about these tools and start bringing these practices into your company or your operations division, you'll quickly gain followers. You will increase your own productivity as well as that of others. We all have years of backlog to get to—how much would your co-workers love if you could give them enough time to start tackling that backlog? Not only that, but your customers will start to see increased application reliability, and your management will see you as a force multiplier. That certainly can't hurt during your next salary negotiation or when interviewing with all your new skills.
|
||||
|
||||
Let's dig into the tools a bit more. We'll briefly cover each one and share links to more information.
|
||||
|
||||
### GitLab CI
|
||||
|
||||
GitLab is a fairly new entrant to the CI/CD space, but it's already achieved the top spot in the [Forrester Wave for Continuous Integration Tools][20]. That's a huge achievement in such a crowded and highly qualified field. What makes GitLab CI so great? It uses a YAML file to describe the entire pipeline. It also has a functionality called Auto DevOps that allows for simpler projects to have a pipeline built automatically with multiple tests built-in. This system uses [Herokuish buildpacks][21] to determine the language and how to build the application. Some languages can also manage databases, which is a real game-changer for building new applications and getting them deployed to production from the beginning of the development process. The system has native integrations into Kubernetes and will deploy your application automatically into a Kubernetes cluster using one of several different deployment methodologies, like percentage-based rollouts and blue-green deployments.
|
||||
|
||||
In addition to its CI functionality, GitLab offers many complementary features like operations and monitoring with Prometheus deployed automatically with your application; portfolio and project management using GitLab Issues, Epics, and Milestones; security checks built into the pipeline with the results provided as an aggregate across multiple projects; and the ability to edit code right in GitLab using the WebIDE, which can even provide a preview or execute part of a pipeline for faster feedback.
|
||||
|
||||
### GoCD
|
||||
|
||||
GoCD comes from the great minds at Thoughtworks, which is testimony enough for its capabilities and efficiency. To me, GoCD's main differentiator from the rest of the pack is its [Value Stream Map][22] (VSM) feature. In fact, pipelines can be chained together with one pipeline providing the "material" for the next pipeline. This allows for increased independence for different teams with different responsibilities in the deployment process. This may be a useful feature when introducing this type of system in older organizations that intend to keep these teams separate—but having everyone using the same tool will make it easier later to find bottlenecks in the VSM and reorganize the teams or work to increase efficiencies.
|
||||
|
||||
It's incredibly valuable to have a VSM for each product in a company; that GoCD allows this to be [described in JSON or YAML][23] in version control and presented visually with all the data around wait times makes this tool even more valuable to an organization trying to understand itself better. Start by installing GoCD and mapping out your process with only manual approval gates. Then have each team use the manual approvals so you can start collecting data on where bottlenecks might exist.
|
||||
|
||||
### Travis CI
|
||||
|
||||
Travis CI was my first experience with a Software as a Service (SaaS) CI system, and it's pretty awesome. The pipelines are stored as YAML with your source code, and it integrates seamlessly with tools like GitHub. I don't remember the last time a pipeline failed because of Travis CI or the integration—Travis CI has a very high uptime. Not only can it be used as SaaS, but it also has a version that can be hosted. I haven't run that version—there were a lot of components, and it looked a bit daunting to install all of it. I'm guessing it would be much easier to deploy it all to Kubernetes with [Helm charts provided by Travis CI][26]. Those charts don't deploy everything yet, but I'm sure it will grow even more in the future. There is also an enterprise version if you don't want to deal with the hassle.
|
||||
|
||||
However, if you're developing open source code, you can use the SaaS version of Travis CI for free. That is an awesome service provided by an awesome team! This alleviates a lot of overhead and allows you to use a fairly common platform for developing open source code without having to run anything.
|
||||
|
||||
### Jenkins
|
||||
|
||||
Jenkins is the original, the venerable, de facto standard in CI/CD. If you haven't already, you need to read "[Jenkins: Shifting Gears][27]" from Kohsuke, the creator of Jenkins and CTO of CloudBees. It sums up all of my feelings about Jenkins and the community from the last decade. What he describes is something that has been needed for several years, and I'm happy CloudBees is taking the lead on this transformation. Jenkins will be a bit overwhelming to most non-developers and has long been a burden on its administrators. However, these are items they're aiming to fix.
|
||||
|
||||
[Jenkins Configuration as Code][28] (JCasC) should help fix the complex configuration issues that have plagued admins for years. This will allow for a zero-touch configuration of Jenkins masters through a YAML file, similar to other CI/CD systems. [Jenkins Evergreen][29] aims to make this process even easier by providing predefined Jenkins configurations based on different use cases. These distributions should be easier to maintain and upgrade than the normal Jenkins distribution.
|
||||
|
||||
Jenkins 2 introduced native pipeline functionality with two types of pipelines, which [I discuss][30] in a LISA17 presentation. Neither is as easy to navigate as YAML when you're doing something simple, but they're quite nice for doing more complex tasks.
|
||||
|
||||
[Jenkins X][31] is the full transformation of Jenkins and will likely be the implementation of Cloud Native Jenkins (or at least the thing most users see when using Cloud Native Jenkins). It will take JCasC and Evergreen and use them at their best natively on Kubernetes. These are exciting times for Jenkins, and I look forward to its innovation and continued leadership in this space.
|
||||
|
||||
### Concourse CI
|
||||
|
||||
I was first introduced to Concourse through folks at Pivotal Labs when it was an early beta version—there weren't many tools like it at the time. The system is made of microservices, and each job runs within a container. One of its most useful features that other tools don't have is the ability to run a job from your local system with your local changes. This means you can develop locally (assuming you have a connection to the Concourse server) and run your builds just as they'll run in the real build pipeline. Also, you can rerun failed builds from your local system and inject specific changes to test your fixes.
|
||||
|
||||
Concourse also has a simple extension system that relies on the fundamental concept of resources. Basically, each new feature you want to provide to your pipeline can be implemented in a Docker image and included as a new resource type in your configuration. This keeps all functionality encapsulated in a single, immutable artifact that can be upgraded and modified independently, and breaking changes don't necessarily have to break all your builds at the same time.
|
||||
|
||||
### Spinnaker
|
||||
|
||||
Spinnaker comes from Netflix and is more focused on continuous deployment than continuous integration. It can integrate with other tools, including Travis and Jenkins, to kick off test and deployment pipelines. It also has integrations with monitoring tools like Prometheus and Datadog to make decisions about deployments based on metrics provided by these systems. For example, the canary deployment uses a judge concept and the metrics being collected to determine if the latest canary deployment has caused any degradation in pertinent metrics and should be rolled back or if deployment can continue.
|
||||
|
||||
A couple of additional, unique features related to deployments cover an area that is often overlooked when discussing continuous deployment, and might even seem antithetical, but is critical to success: Spinnaker helps make continuous deployment a little less continuous. It will prevent a stage from running during certain times to prevent a deployment from occurring during a critical time in the application lifecycle. It can also enforce manual approvals to ensure the release occurs when the business will benefit the most from the change. In fact, the whole point of continuous integration and continuous deployment is to be ready to deploy changes as quickly as the business needs to change.
|
||||
|
||||
### Screwdriver
|
||||
|
||||
Screwdriver is an impressively simple piece of engineering. It uses a microservices approach and relies on tools like Nomad, Kubernetes, and Docker to act as its execution engine. There is a pretty good [deployment tutorial][34] for deploying to AWS and Kubernetes, but it could be improved once the in-progress [Helm chart][35] is completed.
|
||||
|
||||
Screwdriver also uses YAML for its pipeline descriptions and includes a lot of sensible defaults, so there's less boilerplate configuration for each pipeline. The configuration describes an advanced workflow that can have complex dependencies among jobs. For example, a job can be guaranteed to run after or before another job. Jobs can run in parallel and be joined afterward. You can also use logical operators to run a job, for example, if any of its dependencies are successful or only if all are successful. Even better is that you can specify certain jobs to be triggered from a pull request. Also, dependent jobs won't run when this occurs, which allows easy segregation of your pipeline for when an artifact should go to production and when it still needs to be reviewed.
|
||||
|
||||
This is only a brief description of these CI/CD tools—each has even more cool features and differentiators you can investigate. They are all open source and free to use, so go deploy them and see which one fits your needs best.
|
||||
|
||||
### What to read next
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/18/12/cicd-tools-sysadmins
|
||||
|
||||
作者:[Dan Barker][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/barkerd427
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://www.ansible.com/
|
||||
[2]: https://www.chef.io/
|
||||
[3]: https://puppet.com/
|
||||
[4]: https://github.com/test-kitchen/test-kitchen
|
||||
[5]: https://www.merriam-webster.com/dictionary/ephemeral
|
||||
[6]: https://en.wikipedia.org/wiki/Idempotence
|
||||
[7]: https://mjml.io/
|
||||
[8]: https://gitlab.com/devopskc/newsletter/blob/master/.gitlab-ci.yml
|
||||
[9]: https://gitlab.com/devopskc/newsletter/blob/master/index/index.html
|
||||
[10]: https://gitlab.com/devopskc/newsletter/blob/master/html-to-pdf.js
|
||||
[11]: https://gitlab.com/devopskc/newsletter/blob/master/populate-index.js
|
||||
[12]: https://devopskc.com/
|
||||
[13]: https://en.wikipedia.org/wiki/Directed_acyclic_graph
|
||||
[14]: https://www.spinnaker.io/
|
||||
[15]: https://jenkins.io/
|
||||
[16]: https://martinfowler.com/books/dsl.html
|
||||
[17]: http://groovy-lang.org/
|
||||
[18]: https://about.gitlab.com/product/continuous-integration/
|
||||
[19]: https://gitlab.com/gitlab-org/gitlab-ce/
|
||||
[20]: https://about.gitlab.com/2017/09/27/gitlab-leader-continuous-integration-forrester-wave/
|
||||
[21]: https://github.com/gliderlabs/herokuish
|
||||
[22]: https://www.gocd.org/getting-started/part-3/#value_stream_map
|
||||
[23]: https://docs.gocd.org/current/advanced_usage/pipelines_as_code.html
|
||||
[24]: https://docs.travis-ci.com/
|
||||
[25]: https://github.com/travis-ci/travis-ci
|
||||
[26]: https://github.com/travis-ci/kubernetes-config
|
||||
[27]: https://jenkins.io/blog/2018/08/31/shifting-gears/
|
||||
[28]: https://jenkins.io/projects/jcasc/
|
||||
[29]: https://github.com/jenkinsci/jep/blob/master/jep/300/README.adoc
|
||||
[30]: https://danbarker.codes/talk/lisa17-becoming-plumber-building-deployment-pipelines/
|
||||
[31]: https://jenkins-x.io/
|
||||
[32]: https://concourse-ci.org/
|
||||
[33]: https://github.com/concourse/concourse
|
||||
[34]: https://docs.screwdriver.cd/cluster-management/kubernetes
|
||||
[35]: https://github.com/screwdriver-cd/screwdriver-chart
|
||||
@@ -1,190 +0,0 @@
|
||||
zjon is translating
|
||||
7 Best eBook Readers for Linux
|
||||
======
|
||||
**Brief:** In this article, we are covering some of the best ebook readers for Linux. These apps give a better reading experience and some will even help in managing your ebooks.
|
||||
|
||||
![Best eBook readers for Linux][1]
|
||||
|
||||
Lately, the demand for digital books has increased as people find it more comfortable in reading a book on their handheld devices, Kindle or PC. When it comes to the Linux users, there are various ebook apps that will serve your purpose in reading and organizing your ebook collections.
|
||||
|
||||
In this article, we have compiled seven best ebook readers for Linux. These ebook readers are best suited for pdf, epubs and other ebook formats.
|
||||
|
||||
## Best eBook readers for Linux
|
||||
|
||||
I have provided installation instructions for Ubuntu as I am using Ubuntu right now. If you use [non-Ubuntu Linux distributions][2], you can find most of these eBook applications in the software repositories of your distro.
|
||||
|
||||
### 1. Calibre
|
||||
|
||||
[Calibre][3] is one of the most popular eBook apps for Linux. To be honest, it's a lot more than just a simple eBook reader. It's a complete eBook solution. You can even [create professional eBooks with Calibre][4].
|
||||
|
||||
With a powerful eBook manager and easy to use interface, it features creation and editing of an eBook. Calibre supports a variety of formats and syncing with other ebook readers. It also lets you convert one eBook format to another with ease.
|
||||
|
||||
The biggest drawback of Calibre is that it's too heavy on resources and that makes it a difficult choice as a standalone eBook reader.
|
||||
|
||||
![Calibre][5]
|
||||
|
||||
#### Features
|
||||
|
||||
* Managing eBook: Calibre allows sorting and grouping eBooks by managing metadata. You can download metadata for an eBook from various sources or create and edit the existing field.
|
||||
* Supports all major eBook formats: Calibre supports all major eBook formats and is compatible with various e-readers.
|
||||
* File conversion: You can convert any ebook format to another one with the option of changing the book style, creating a table of content or improving margins while converting. You can convert your personal documents to an ebook too.
|
||||
* Download magazines from the web: Calibre can deliver stories from various news sources or through RSS feed.
|
||||
* Share and backup your library: It gives an option of hosting your eBook collection over its server which you can share with your friends or acccess from anywhere, using any device. Backup and import/export feature allows you to keep your collection safe and easy portability.
|
||||
|
||||
|
||||
|
||||
#### Installation
|
||||
|
||||
You can find it in the software repository of all major Linux distributions. For Ubuntu, search for it in Software Center or use he command below:
|
||||
|
||||
`sudo apt-get install calibre`
|
||||
|
||||
### 2. FBReader
|
||||
|
||||
![FBReader: eBook reader for Linux][6]
|
||||
|
||||
[FBReader][7] is an open source, lightweight, multi-platform ebook reader supporting various formats like ePub, fb2, mobi, rtf, html etc. It includes access to popular network libraries from where you can download ebooks for free or buy one.
|
||||
|
||||
FBReader is highly customizable with options to choose colors, fonts, page-turning animations, bookmarks and dictionaries.
|
||||
|
||||
#### Features
|
||||
|
||||
* Supports a variety of file formats and devices like Android, iOS, Windows, Mac and more.
|
||||
* Synchronize book collection, reading positions and bookmarks.
|
||||
* Manage your library online by adding any book from your Linux desktop to all your devices.
|
||||
* Web browser access to your stored collection.
|
||||
* Supports storage of books in Google Drive and organizing of books by authors, series or other attributes.
|
||||
|
||||
|
||||
|
||||
#### Installation
|
||||
|
||||
You can install FBReader ebook reader from the official repository or by typing the below command in terminal.
|
||||
```
|
||||
sudo apt-get install fbreader
|
||||
```
|
||||
|
||||
Or, you can grab a .deb package from [here][8] and install it on your Debian based distributions.
|
||||
|
||||
### 3. Okular
|
||||
|
||||
[Okular][9] is another open source and cross-platform document viewer developed by KDE and is shipped as part of the KDE Application release.
|
||||
|
||||
![Okular][10]
|
||||
|
||||
#### Features
|
||||
|
||||
* Okular supports various document formats like PDF, Postscript, DjVu, CHM, XPS, ePub and others.
|
||||
* Supports features like commenting on PDF documents, highlighting and drawing different shapes etc.
|
||||
* These changes are saved separately without modifying the original PDF file.
|
||||
* Text from an eBook can be extracted to a text file and has an inbuilt text reading service called Jovie.
|
||||
|
||||
|
||||
|
||||
Note: While checking the app, I did discover that the app doesn't support ePub file format in Ubuntu and its derivatives. The other distribution users can still utilize it's full potential.
|
||||
|
||||
#### Installation
|
||||
|
||||
Ubuntu users can install it by typing below command in Terminal :
|
||||
```
|
||||
sudo apt-get install okular
|
||||
```
|
||||
|
||||
### 4. Lucidor
|
||||
|
||||
Lucidor is a handy e-book reader supporting epub file formats and catalogs in OPDS formats. It also features organizing the collection of e-books in local bookcase, searching and downloading from the internet and converting web feeds and web pages into e-books.
|
||||
|
||||
Lucidor is XULRunner application giving you a look of Firefox with tabbed layout and behaves like it while storing data and configurations. It's the simplest ebook reader among the list and includes configurations like text justifications and scrolling options.
|
||||
|
||||
![lucidor][11]
|
||||
|
||||
You can look out for the definition from Wiktionary.org by selecting a word and right click > lookup word options. It also includes options to Web feeds or web pages as e-books.
|
||||
|
||||
You can download and install the deb or RPM package from [here.][12]
|
||||
|
||||
### 5. Bookworm
|
||||
|
||||
![Bookworm eBook reader for Linux][13]
|
||||
|
||||
Bookworm is another free and open source ebook reader supporting different file formats like epub, pdf, mobi, cbr and cbz. I wrote a dedicated article on features and installation for Bookworm apps, read it here: [Bookworm: A Simple yet Magnificent eBook Reader for Linux][14]
|
||||
|
||||
#### Installation
|
||||
```
|
||||
sudo apt-add-repository ppa:bookworm-team/bookworm
|
||||
sudo apt-get update
|
||||
sudo apt-get install bookworm
|
||||
```
|
||||
|
||||
### 6. Easy Ebook Viewer
|
||||
|
||||
[Easy Ebook Viewer][15] is another fantastic GTK Python app for reading ePub files. With features like basic chapter navigation, continuing from the last reading positions, importing from other ebook file formats, chapter jumping and more, Easy Ebook Viewer is a simple and minimalist ePub reader.
|
||||
|
||||
![Easy-Ebook-Viewer][16]
|
||||
|
||||
The app is still in its initial stage and has support for only ePub files.
|
||||
|
||||
#### Installation
|
||||
|
||||
You can install Easy Ebook Viewer by downloading the source code from [github][17] and compiling it yourself along with the dependencies. Alternatively, the following terminal commands will do the exact same job.
|
||||
```
|
||||
sudo apt install git gir1.2-webkit-3.0 libwebkitgtk-3.0-0 gir1.2-gtk-3.0 python3-gi
|
||||
git clone https://github.com/michaldaniel/Ebook-Viewer.git
|
||||
cd Ebook-Viewer/
|
||||
sudo make install
|
||||
```
|
||||
|
||||
After successful completion of the above steps, you can launch it from the Dash.
|
||||
|
||||
### 7. Buka
|
||||
|
||||
[Buka][18] is mostly an ebook manager with a simple and clean user interface. It currently supports PDF formats and is designed to help the user focus more on the content. With all the basic features of pdf reader, Buka lets you navigate through arrow keys, has zoom options and you can view 2 pages side by side.
|
||||
|
||||
You can create separate lists of your PDF files and switch between them easily. Buka also provides a built-in translation tool but you need an active internet connection to use the feature.
|
||||
|
||||
![Buka][19]
|
||||
|
||||
#### Installation
|
||||
|
||||
You can download an AppImage from the [official download page.][20] If you are not aware of it, read [how to use AppImage in Linux][21]. Alternatively, you can install it from the command line:
|
||||
```
|
||||
sudo snap install buka
|
||||
```
|
||||
|
||||
### Final Words
|
||||
|
||||
Personally, I find Calibre best suited for my needs. Also, Bookworm looks promising to me and I am using it more often these days. Though, the selection of an ebook application totally depends on your preference.
|
||||
|
||||
Which ebook app do you use? Let us know in the comments below.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/best-ebook-readers-linux/
|
||||
|
||||
作者:[Ambarish Kumar][a]
|
||||
译者:[译者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/ambarish/
|
||||
[1]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2017/10/best-ebook-readers-linux-800x450.png
|
||||
[2]:https://itsfoss.com/non-ubuntu-beginner-linux/
|
||||
[3]:https://www.calibre-ebook.com
|
||||
[4]:https://itsfoss.com/create-ebook-calibre-linux/
|
||||
[5]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2017/09/Calibre-800x603.jpeg
|
||||
[6]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2017/10/fbreader-800x624.jpeg
|
||||
[7]:https://fbreader.org
|
||||
[8]:https://fbreader.org/content/fbreader-beta-linux-desktop
|
||||
[9]:https://okular.kde.org/
|
||||
[10]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2017/09/Okular-800x435.jpg
|
||||
[11]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2017/09/lucidor-2.png
|
||||
[12]:http://lucidor.org/lucidor/download.php
|
||||
[13]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2017/08/bookworm-ebook-reader-linux-800x450.jpeg
|
||||
[14]:https://itsfoss.com/bookworm-ebook-reader-linux/
|
||||
[15]:https://github.com/michaldaniel/Ebook-Viewer
|
||||
[16]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2017/09/Easy-Ebook-Viewer.jpg
|
||||
[17]:https://github.com/michaldaniel/Ebook-Viewer.git
|
||||
[18]:https://github.com/oguzhaninan/Buka
|
||||
[19]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2017/09/Buka2-800x555.png
|
||||
[20]:https://github.com/oguzhaninan/Buka/releases
|
||||
[21]:https://itsfoss.com/use-appimage-linux/
|
||||
115
sources/tech/20180119 Top 6 open source desktop email clients.md
Normal file
115
sources/tech/20180119 Top 6 open source desktop email clients.md
Normal file
@@ -0,0 +1,115 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Top 6 open source desktop email clients)
|
||||
[#]: via: (https://opensource.com/business/18/1/desktop-email-clients)
|
||||
[#]: author: (Jason Baker https://opensource.com/users/jason-baker)
|
||||
|
||||
Top 6 open source desktop email clients
|
||||
======
|
||||
|
||||

|
||||
|
||||
This article was originally published on October 8, 2015, and has been updated to reflect new information and project changes.
|
||||
|
||||
Mobile and web technologies still haven't made the desktop obsolete, and despite some regular claims to the contrary, desktop clients don't seem to be going away anytime soon.
|
||||
|
||||
And with good reason. For many, the preference for a native application (and corresponding native performance), easy offline use, a vast array of plugins, and meeting security needs will long outweigh pressures to switch to a webmail email client. Whether you're sticking with a desktop email client because of a corporate mandate or just personal preference, there are still many great options to choose from. And just because you may be stuck on Windows doesn't mean Outlook is your only option; many open source clients are cross-platform.
|
||||
|
||||
In this roundup, we take a quick look at six open source options for desktop email, share a little bit about each, and provide you with some options you may want to try yourself.
|
||||
|
||||
### Thunderbird
|
||||
|
||||
For many years, Mozilla [Thunderbird][1] was the king of the open source email clients. It was available on all major platforms, and it had great success alongside Mozilla's now-flagship project, Firefox. Thunderbird has been around for over a decade and was immediately popular from the start, receiving over a million downloads in its first 10 days of public release.
|
||||
|
||||
In recent years, the thunder behind Thunderbird got a little quieter, and in mid-2017 the project announced it would move off Mozilla's infrastructure, but keep the Mozilla Foundation as its legal and fiscal home. Several [new hires][2] were made to advance the project, with plans to bring in new developers to fix lingering issues and transform the codebase to be based on web technologies.
|
||||
|
||||
Thunderbird is full-featured, with a number of well-supported plugins adding everything from calendar support to advanced address book integration, and many specialized features including theming and large file management. Out of the box, it supports POP and IMAP email syncing, spam filtering, and many other features you would expect, and it works flawlessly across Windows, macOS, and Linux.
|
||||
|
||||
Thunderbird is made available under the [Mozilla Public License][3].
|
||||
|
||||
![Thunderbird][4]
|
||||
|
||||
### Claws Mail
|
||||
|
||||
[Claws Mail][5], a fork of [Sylpheed][6], is a fast and flexible alternative that might be appealing to anyone concerned about performance and minimal resource usage. It's a good option, for example, if you're working within the limited processing and memory capacity of a [Raspberry Pi][7], for example.
|
||||
|
||||
But even for those with virtually unlimited computing resources to throw at a mail client, Claws Mail might be a good option. It's flexible, probably more so than Thunderbird or some of the other options in this list, and it has a number of plugins available for those who want to extend it. And it prides itself on being fast and reliable, too, in addition to sporting a simple interface that's perhaps ideal for new users.
|
||||
|
||||
Claws Mail is based on the GTK+ framework and made available under the [GPL][8].
|
||||
|
||||

|
||||
|
||||
### Evolution
|
||||
|
||||
If you're a user of the popular Fedora or Debian distributions, you're probably already familiar with the next option on our list, [Evolution][9]. Evolution is an official part of the GNOME project, but it didn't start out that way. Originally developed at Ximian, and later Novell, Evolution was designed from the ground up to be an enterprise-ready email application.
|
||||
|
||||
To this end, Evolution supports Exchange Server and a number of other email setups you might find in a corporate environment. It's also a full personal information manager (PIM), sporting a calendar, task list, contact manager, and note taking application, in addition to handling your email. Even if it's not the default mail application in your distribution, you might want to take a look if you're interested in these features or the included spam filtering, GNU Privacy Guard (GPG) support, integration with LibreOffice, or a slew of other features.
|
||||
|
||||
Evolution is made available as open source under the [LGPL][10].
|
||||
|
||||

|
||||
|
||||
### Geary
|
||||
|
||||
[Geary][11] is a project originally developed by Yorba Foundation, which made a number of different GNOME software tools. Geary supports a number of popular webmail services as the mail backend through IMAP.
|
||||
|
||||
Geary doesn't have a lot of features compared to some other clients on this list, but its simple interface might be appealing to users frustrated with unnecessary complexity in other email programs. Geary is available under the [LGPL][10].
|
||||
|
||||

|
||||
|
||||
### KMail
|
||||
|
||||
[KMail][12] is the mail component of [Kontact][13], the personal information manager included with KDE. KMail supports a variety of email protocols, including IMAP, SMTP, and POP3, and through its integration with the other Kontact components, it could be considered a complete groupware suite. Despite its Linux routes, a Windows build is also available.
|
||||
|
||||
With its long history, KMail has developed most of the features you would expect to find in a modern mail program. While it fits nicely into the KDE group of applications, some may find its interface clunky compared to others. But give it a try and see what you think.
|
||||
|
||||
KMail is made available under the [GPL][14].
|
||||
|
||||

|
||||
|
||||
### Mailspring
|
||||
|
||||
[Mailspring][15], the new kid on the block, is a relaunch of the now-defunct Nylas Mail by one of the original authors. It replaces Nylas' JavaScript sync engine with a C++ core, which is said to minimize the application's RAM and power demands, and removes heavy dependencies to add speed. Its features include a unified inbox, support for IMAP (but not ActiveSync), Gmail-style search, themes, and message translation.
|
||||
|
||||
Mailspring is available for macOS, Windows, and Linux, and it's licensed under [GPLv3][16].
|
||||
|
||||
![Mailspring][17]
|
||||
|
||||
Of course, there are many more options above and beyond these, including the full-featured PIM [Zimbra Desktop][18] or one of the [lightweight alternatives][19] like [GNUMail][20] that might be the best choice for your situation. What's your favorite open source desktop email client? And with webmail as the first choice of many users, what do you see as the role of the desktop email client in the years to come? Let us know in the comments below.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/business/18/1/desktop-email-clients
|
||||
|
||||
作者:[Jason Baker][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/jason-baker
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://www.mozilla.org/en-US/thunderbird/
|
||||
[2]: https://blog.mozilla.org/thunderbird/2017/12/new-thunderbird-releases-and-new-thunderbird-staff/
|
||||
[3]: https://www.mozilla.org/en-US/MPL/
|
||||
[4]: https://opensource.com/sites/default/files/u128651/desktop-email-thunderbird57.png (Thunderbird)
|
||||
[5]: http://www.claws-mail.org/
|
||||
[6]: http://sylpheed.sraoss.jp/en/
|
||||
[7]: https://opensource.com/resources/what-raspberry-pi
|
||||
[8]: http://www.claws-mail.org/COPYING
|
||||
[9]: https://wiki.gnome.org/Apps/Evolution
|
||||
[10]: http://www.gnu.org/licenses/lgpl-3.0.en.html
|
||||
[11]: https://wiki.gnome.org/Apps/Geary
|
||||
[12]: https://userbase.kde.org/KMail
|
||||
[13]: https://userbase.kde.org/Kontact
|
||||
[14]: http://www.gnu.org/licenses/gpl-3.0.en.html
|
||||
[15]: https://getmailspring.com/
|
||||
[16]: https://github.com/Foundry376/Mailspring/blob/master/LICENSE.md
|
||||
[17]: https://opensource.com/sites/default/files/u128651/desktop-email-mailspring.png (Mailspring)
|
||||
[18]: https://www.zimbra.com/open-source-email-overview/
|
||||
[19]: https://opensource.com/article/17/7/email-alternatives-thunderbird
|
||||
[20]: http://wiki.gnustep.org/index.php/GNUMail
|
||||
@@ -1,147 +0,0 @@
|
||||
Translating by qhwdw
|
||||
Protecting Code Integrity with PGP — Part 7: Protecting Online Accounts
|
||||
======
|
||||
|
||||

|
||||
So far in this tutorial series, we've provided practical guidelines for using PGP, including basic concepts and steps for generating and protecting your keys. If you missed the previous articles, you can catch up below. In this final article, we offer additional guidance for protecting your online accounts, which is of paramount importance today.
|
||||
|
||||
[Part 1: Basic Concepts and Tools][1]
|
||||
|
||||
[Part 2: Generating Your Master Key][2]
|
||||
|
||||
[Part 3: Generating PGP Subkeys][3]
|
||||
|
||||
[Part 4: Moving Your Master Key to Offline Storage][4]
|
||||
|
||||
[Part 5: Moving Subkeys to a Hardware Device][5]
|
||||
|
||||
[Part 6: Using PGP with Git][6]
|
||||
|
||||
### Checklist
|
||||
|
||||
* Get a U2F-capable device (ESSENTIAL)
|
||||
|
||||
* Enable 2-factor authentication for your online accounts (ESSENTIAL)
|
||||
|
||||
* GitHub/GitLab
|
||||
|
||||
* Google
|
||||
|
||||
* Social media
|
||||
|
||||
* Use U2F as primary mechanism, with TOTP as fallback (ESSENTIAL)
|
||||
|
||||
|
||||
|
||||
|
||||
#### Considerations
|
||||
|
||||
You may have noticed how a lot of your online developer identity is tied to your email address. If someone can gain access to your mailbox, they would be able to do a lot of damage to you personally, and to your reputation as a free software developer. Protecting your email accounts is just as important as protecting your PGP keys.
|
||||
|
||||
##### Two-factor authentication with Fido U2F
|
||||
|
||||
[Two-factor authentication][7] is a mechanism to improve account security by requiring a physical token in addition to a username and password. The goal is to make sure that even if someone steals your password (via keylogging, shoulder surfing, or other means), they still wouldn't be able to gain access to your account without having in their possession a specific physical device ("something you have" factor).
|
||||
|
||||
The most widely known mechanisms for 2-factor authentication are:
|
||||
|
||||
* SMS-based verification
|
||||
|
||||
* Time-based One-Time Passwords (TOTP) via a smartphone app, such as the "Google Authenticator" or similar solutions
|
||||
|
||||
* Hardware tokens supporting Fido U2F
|
||||
|
||||
|
||||
|
||||
|
||||
SMS-based verification is easiest to configure, but has the following important downsides: it is useless in areas without signal (e.g. most building basements), and can be defeated if the attacker is able to intercept or divert SMS messages, for example by cloning your SIM card.
|
||||
|
||||
TOTP-based multi-factor authentication offers more protection than SMS, but has important scaling downsides (there are only so many tokens you can add to your smartphone app before finding the correct one becomes unwieldy). Plus, there's no avoiding the fact that your secret key ends up stored on the smartphone itself -- which is a complex, globally connected device that may or may not have been receiving timely security patches from the manufacturer.
|
||||
|
||||
Most importantly, neither TOTP nor SMS methods protect you from phishing attacks -- if the phisher is able to steal both your account password and the 2-factor token, they can replay them on the legitimate site and gain access to your account.
|
||||
|
||||
[Fido U2F][8] is a standard developed specifically to provide a mechanism for 2-factor authentication and to combat credential phishing. The U2F protocol will store each site's unique key on the USB token and will prevent you from accidentally giving the attacker both your password and your one-time token if you try to use it on anything other than the legitimate website.
|
||||
|
||||
Both Chrome and Firefox support U2F 2-factor authentication, and hopefully other browsers will soon follow.
|
||||
|
||||
##### Get a token capable of Fido U2F
|
||||
|
||||
There are [many options available][9] for hardware tokens with Fido U2F support, but if you're already ordering a smartcard-capable physical device, then your best option is a Yubikey 4, which supports both.
|
||||
|
||||
##### Enable 2-factor authentication on your online accounts
|
||||
|
||||
You definitely want to enable this option on the email provider you are using (especially if it is Google, which has excellent support for U2F). Other sites where this functionality should be enabled are:
|
||||
|
||||
* GitHub: it probably occurred to you when you uploaded your PGP public key that if anyone else is able to gain access to your account, they can replace your key with their own. If you publish code on GitHub, you should take care of your account security by protecting it with U2F-backed authentication.
|
||||
|
||||
* GitLab: for the same reasons as above.
|
||||
|
||||
* Google: if you have a google account, you will be surprised how many sites allow logging in with Google authentication instead of site-specific credentials.
|
||||
|
||||
* Facebook: same as above, a lot of online sites offer the option to authenticate using a Facebook account. You should 2-factor protect your Facebook account even if you do not use it.
|
||||
|
||||
* Other sites, as you deem necessary. See [dongleauth.info][10] for inspiration.
|
||||
|
||||
|
||||
|
||||
|
||||
##### Configure TOTP failover, if possible
|
||||
|
||||
Many sites will allow you to configure multiple 2-factor mechanisms, and the recommended setup is:
|
||||
|
||||
* U2F token as the primary mechanism
|
||||
|
||||
* TOTP phone app as the secondary mechanism
|
||||
|
||||
|
||||
|
||||
|
||||
This way, even if you lose your U2F token, you should be able to re-gain access to your account. Alternatively, you can enroll multiple U2F tokens (e.g. you can get another cheap token that only does U2F and use it for backup reasons).
|
||||
|
||||
### Further reading
|
||||
|
||||
By this point you have accomplished the following important tasks:
|
||||
|
||||
1. Created your developer identity and protected it using PGP cryptography.
|
||||
|
||||
2. Configured your environment so your identity is not easily stolen by moving your master key offline and your subkeys to an external hardware device.
|
||||
|
||||
3. Configured your git environment to ensure that anyone using your project is able to verify the integrity of the repository and its entire history.
|
||||
|
||||
4. Secured your online accounts using 2-factor authentication.
|
||||
|
||||
|
||||
|
||||
|
||||
You are already in a good place, but you should also read up on the following topics:
|
||||
|
||||
* How to secure your team communication (see the document in this repository). Decisions regarding your project development and governance require just as much careful protection as any committed code, if not so. Make sure that your team communication is trusted and the integrity of all decisions is verified.
|
||||
|
||||
* How to secure your workstation (see the document in this repository). Your goal is to minimize risky behaviour that would cause your project code to be contaminated, or your developer identity to be stolen.
|
||||
|
||||
* How to write secure code (see various documentation related to the programming languages and libraries used by your project). Bad, insecure code is still bad, insecure code even if there is a PGP signature on the commit that introduced it.
|
||||
|
||||
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.linux.com/blog/learn/pgp/2018/3/protecting-code-integrity-pgp-part-7-protecting-online-accounts
|
||||
|
||||
作者:[Konstantin Ryabitsev][a]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
选题:[lujun9972](https://github.com/lujun9972)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:https://www.linux.com/users/mricon
|
||||
[1]:https://www.linux.com/blog/learn/2018/2/protecting-code-integrity-pgp-part-1-basic-pgp-concepts-and-tools
|
||||
[2]:https://www.linux.com/blog/learn/pgp/2018/2/protecting-code-integrity-pgp-part-2-generating-and-protecting-your-master-pgp-key
|
||||
[3]:https://www.linux.com/blog/learn/pgp/2018/2/protecting-code-integrity-pgp-part-3-generating-pgp-subkeys
|
||||
[4]:https://www.linux.com/blog/learn/pgp/2018/3/protecting-code-integrity-pgp-part-4-moving-your-master-key-offline-storage
|
||||
[5]:https://www.linux.com/blog/learn/pgp/2018/3/protecting-code-integrity-pgp-part-5-moving-subkeys-hardware-device
|
||||
[6]:https://www.linux.com/blog/learn/pgp/2018/3/protecting-code-integrity-pgp-part-6-using-pgp-git
|
||||
[7]:https://en.wikipedia.org/wiki/Multi-factor_authentication
|
||||
[8]:https://en.wikipedia.org/wiki/Universal_2nd_Factor
|
||||
[9]:http://www.dongleauth.info/dongles/
|
||||
[10]:http://www.dongleauth.info/
|
||||
@@ -1,5 +1,5 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
|
||||
@@ -0,0 +1,411 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (PowerTOP – Monitors Power Usage and Improve Laptop Battery Life in Linux)
|
||||
[#]: via: (https://www.2daygeek.com/powertop-monitors-laptop-battery-usage-linux/)
|
||||
[#]: author: (Vinoth Kumar https://www.2daygeek.com/author/vinoth/)
|
||||
|
||||
PowerTOP – Monitors Power Usage and Improve Laptop Battery Life in Linux
|
||||
======
|
||||
|
||||
We all know, we almost 80-90% migrated from PC (Desktop) to laptop.
|
||||
|
||||
But one thing we want from a laptop, it’s long battery life and we want to use every drop of power.
|
||||
|
||||
So it’s good to know where our power is going and getting waste.
|
||||
|
||||
You can use the powertop utility to see what’s drawing power when your system’s not plugged in.
|
||||
|
||||
You need to run the powertop utility in terminal with super user privilege.
|
||||
|
||||
It will access the hardware and measure power usage.
|
||||
|
||||
### What is PowerTOP
|
||||
|
||||
PowerTOP is a Linux tool to diagnose issues with power consumption and power management.
|
||||
|
||||
It was developed by Intel to enable various power-saving modes in kernel, userspace, and hardware.
|
||||
|
||||
In addition to being a diagnostic tool, PowerTOP also has an interactive mode where the user can experiment various power management settings for cases where the Linux distribution has not enabled these settings.
|
||||
|
||||
It is possible to monitor processes and show which of them are utilizing the CPU and wake it from its Idle-States, allowing to identify applications with particular high power demands.
|
||||
|
||||
### How to Install PowerTOP
|
||||
|
||||
PowerTOP package is available in most of the distributions official repository so, use the distributions **[Package Manager][1]** to install it.
|
||||
|
||||
For **`Fedora`** system, use **[DNF Command][2]** to install PowerTOP.
|
||||
|
||||
```
|
||||
$ sudo dnf install powertop
|
||||
```
|
||||
|
||||
For **`Debian/Ubuntu`** systems, use **[APT-GET Command][3]** or **[APT Command][4]** to install PowerTOP.
|
||||
|
||||
```
|
||||
$ sudo apt install powertop
|
||||
```
|
||||
|
||||
For **`Arch Linux`** based systems, use **[Pacman Command][5]** to install PowerTOP.
|
||||
|
||||
```
|
||||
$ sudo pacman -S powertop
|
||||
```
|
||||
|
||||
For **`RHEL/CentOS`** systems, use **[YUM Command][6]** to install PowerTOP.
|
||||
|
||||
```
|
||||
$ sudo yum install powertop
|
||||
```
|
||||
|
||||
For **`openSUSE Leap`** system, use **[Zypper Command][7]** to install PowerTOP.
|
||||
|
||||
```
|
||||
$ sudo zypper install powertop
|
||||
```
|
||||
|
||||
### How To Access PowerTOP
|
||||
|
||||
PowerTOP requires super user privilege so, run as root to use PowerTOP utility on your Linux system.
|
||||
|
||||
By default it shows `Overview` tab where we can see the power usage consumption for all the devices. Also shows your system wakeups seconds.
|
||||
|
||||
```
|
||||
$ sudo powertop
|
||||
|
||||
PowerTOP v2.9 Overview Idle stats Frequency stats Device stats Tunables
|
||||
|
||||
The battery reports a discharge rate of 12.6 W
|
||||
The power consumed was 259 J
|
||||
The estimated remaining time is 1 hours, 52 minutes
|
||||
|
||||
Summary: 1692.9 wakeups/second, 0.0 GPU ops/seconds, 0.0 VFS ops/sec and 54.9% CPU use
|
||||
|
||||
Usage Events/s Category Description
|
||||
9.3 ms/s 529.4 Timer tick_sched_timer
|
||||
378.5 ms/s 139.8 Process [PID 2991] /usr/lib/firefox/firefox -contentproc -childID 7 -isForBrowser -prefsLen 8314 -prefMapSize 173895 -schedulerPrefs 00
|
||||
7.5 ms/s 141.7 Timer hrtimer_wakeup
|
||||
3.3 ms/s 102.7 Process [PID 1527] /usr/lib/firefox/firefox --new-window
|
||||
11.6 ms/s 69.1 Process [PID 1568] /usr/lib/firefox/firefox -contentproc -childID 1 -isForBrowser -prefsLen 1 -prefMapSize 173895 -schedulerPrefs 0001,
|
||||
6.2 ms/s 59.0 Process [PID 1496] /usr/lib/firefox/firefox --new-window
|
||||
2.1 ms/s 59.6 Process [PID 2466] /usr/lib/firefox/firefox -contentproc -childID 3 -isForBrowser -prefsLen 5814 -prefMapSize 173895 -schedulerPrefs 00
|
||||
1.8 ms/s 52.3 Process [PID 2052] /usr/lib/firefox/firefox -contentproc -childID 4 -isForBrowser -prefsLen 5814 -prefMapSize 173895 -schedulerPrefs 00
|
||||
1.8 ms/s 50.8 Process [PID 3034] /usr/lib/firefox/firefox -contentproc -childID 7 -isForBrowser -prefsLen 8314 -prefMapSize 173895 -schedulerPrefs 00
|
||||
3.6 ms/s 48.4 Process [PID 3009] /usr/lib/firefox/firefox -contentproc -childID 7 -isForBrowser -prefsLen 8314 -prefMapSize 173895 -schedulerPrefs 00
|
||||
7.5 ms/s 46.2 Process [PID 2996] /usr/lib/firefox/firefox -contentproc -childID 7 -isForBrowser -prefsLen 8314 -prefMapSize 173895 -schedulerPrefs 00
|
||||
25.2 ms/s 33.6 Process [PID 1528] /usr/lib/firefox/firefox --new-window
|
||||
5.7 ms/s 32.2 Interrupt [7] sched(softirq)
|
||||
2.1 ms/s 32.2 Process [PID 1811] /usr/lib/firefox/firefox -contentproc -childID 4 -isForBrowser -prefsLen 5814 -prefMapSize 173895 -schedulerPrefs 00
|
||||
19.7 ms/s 25.0 Process [PID 1794] /usr/lib/firefox/firefox -contentproc -childID 4 -isForBrowser -prefsLen 5814 -prefMapSize 173895 -schedulerPrefs 00
|
||||
1.9 ms/s 31.5 Process [PID 1596] /usr/lib/firefox/firefox -contentproc -childID 1 -isForBrowser -prefsLen 1 -prefMapSize 173895 -schedulerPrefs 0001,
|
||||
3.1 ms/s 29.9 Process [PID 1535] /usr/lib/firefox/firefox --new-window
|
||||
7.1 ms/s 28.2 Process [PID 1488] /usr/lib/firefox/firefox --new-window
|
||||
1.8 ms/s 29.5 Process [PID 1762] /usr/lib/firefox/firefox -contentproc -childID 3 -isForBrowser -prefsLen 5814 -prefMapSize 173895 -schedulerPrefs 00
|
||||
8.8 ms/s 23.3 Process [PID 1121] /usr/bin/gnome-shell
|
||||
1.2 ms/s 21.8 Process [PID 1657] /usr/lib/firefox/firefox -contentproc -childID 2 -isForBrowser -prefsLen 920 -prefMapSize 173895 -schedulerPrefs 000
|
||||
13.3 ms/s 13.9 Process [PID 1746] /usr/lib/firefox/firefox -contentproc -childID 3 -isForBrowser -prefsLen 5814 -prefMapSize 173895 -schedulerPrefs 00
|
||||
2.7 ms/s 11.1 Process [PID 3410] /usr/lib/gnome-terminal-server
|
||||
3.8 ms/s 10.8 Process [PID 1057] /usr/lib/Xorg vt2 -displayfd 3 -auth /run/user/1000/gdm/Xauthority -nolisten tcp -background none -noreset -keeptty
|
||||
3.1 ms/s 9.8 Process [PID 1629] /usr/lib/firefox/firefox -contentproc -childID 2 -isForBrowser -prefsLen 920 -prefMapSize 173895 -schedulerPrefs 000
|
||||
0.9 ms/s 6.7 Interrupt [136] xhci_hcd
|
||||
278.0 us/s 6.4 Process [PID 414] [irq/141-iwlwifi]
|
||||
128.7 us/s 5.7 Process [PID 1] /sbin/init
|
||||
118.5 us/s 5.2 Process [PID 10] [rcu_preempt]
|
||||
49.0 us/s 4.7 Interrupt [0] HI_SOFTIRQ
|
||||
459.3 us/s 3.1 Interrupt [142] i915
|
||||
2.1 ms/s 2.3 Process [PID 3451] powertop
|
||||
8.4 us/s 2.7 kWork intel_atomic_helper_free_state_
|
||||
1.2 ms/s 1.8 kWork intel_atomic_commit_work
|
||||
374.2 us/s 2.1 Interrupt [9] acpi
|
||||
42.1 us/s 1.8 kWork intel_atomic_cleanup_work
|
||||
3.5 ms/s 0.25 kWork delayed_fput
|
||||
238.0 us/s 1.5 Process [PID 907] /usr/lib/upowerd
|
||||
17.7 us/s 1.5 Timer intel_uncore_fw_release_timer
|
||||
26.4 us/s 1.4 Process [PID 576] [i915/signal:0]
|
||||
19.8 us/s 1.3 Timer watchdog_timer_fn
|
||||
1.1 ms/s 0.00 Process [PID 206] [kworker/7:2]
|
||||
2.4 ms/s 0.00 Interrupt [1] timer(softirq)
|
||||
13.4 us/s 0.9 Process [PID 9] [ksoftirqd/0]
|
||||
|
||||
Exit | / Navigate |
|
||||
```
|
||||
|
||||
The powertop output looks similar to the above screenshot, it will be slightly different based on your hardware. This have many screen you can switch between screen the using `Tab` and `Shift+Tab` button.
|
||||
|
||||
### Idle Stats Tab
|
||||
|
||||
It displays various information about the processor.
|
||||
|
||||
```
|
||||
PowerTOP v2.9 Overview Idle stats Frequency stats Device stats Tunables
|
||||
|
||||
|
||||
Package | Core | CPU 0 CPU 4
|
||||
| | C0 active 6.7% 7.2%
|
||||
| | POLL 0.0% 0.1 ms 0.0% 0.1 ms
|
||||
| | C1E 1.2% 0.2 ms 1.6% 0.3 ms
|
||||
C2 (pc2) 7.5% | |
|
||||
C3 (pc3) 25.2% | C3 (cc3) 0.7% | C3 0.5% 0.2 ms 0.6% 0.1 ms
|
||||
C6 (pc6) 0.0% | C6 (cc6) 7.1% | C6 6.6% 0.5 ms 6.3% 0.5 ms
|
||||
C7 (pc7) 0.0% | C7 (cc7) 59.8% | C7s 0.0% 0.0 ms 0.0% 0.0 ms
|
||||
C8 (pc8) 0.0% | | C8 33.9% 1.6 ms 32.3% 1.5 ms
|
||||
C9 (pc9) 0.0% | | C9 2.1% 3.4 ms 0.7% 2.8 ms
|
||||
C10 (pc10) 0.0% | | C10 39.5% 4.7 ms 41.4% 4.7 ms
|
||||
|
||||
| Core | CPU 1 CPU 5
|
||||
| | C0 active 8.3% 7.2%
|
||||
| | POLL 0.0% 0.0 ms 0.0% 0.1 ms
|
||||
| | C1E 1.3% 0.2 ms 1.4% 0.3 ms
|
||||
| |
|
||||
| C3 (cc3) 0.5% | C3 0.5% 0.2 ms 0.4% 0.2 ms
|
||||
| C6 (cc6) 6.0% | C6 5.3% 0.5 ms 4.7% 0.5 ms
|
||||
| C7 (cc7) 59.3% | C7s 0.0% 0.8 ms 0.0% 1.0 ms
|
||||
| | C8 27.2% 1.5 ms 23.8% 1.4 ms
|
||||
| | C9 1.6% 3.0 ms 0.5% 3.0 ms
|
||||
| | C10 44.5% 4.7 ms 52.2% 4.6 ms
|
||||
|
||||
| Core | CPU 2 CPU 6
|
||||
| | C0 active 11.2% 8.4%
|
||||
| | POLL 0.0% 0.0 ms 0.0% 0.0 ms
|
||||
| | C1E 1.4% 0.4 ms 1.3% 0.3 ms
|
||||
| |
|
||||
| C3 (cc3) 0.3% | C3 0.2% 0.1 ms 0.4% 0.2 ms
|
||||
| C6 (cc6) 4.0% | C6 3.7% 0.5 ms 4.3% 0.5 ms
|
||||
| C7 (cc7) 54.2% | C7s 0.0% 0.0 ms 0.0% 1.0 ms
|
||||
| | C8 20.0% 1.5 ms 20.7% 1.4 ms
|
||||
| | C9 1.0% 3.4 ms 0.4% 3.8 ms
|
||||
| | C10 48.8% 4.6 ms 52.3% 5.0 ms
|
||||
|
||||
| Core | CPU 3 CPU 7
|
||||
| | C0 active 8.8% 8.1%
|
||||
| | POLL 0.0% 0.1 ms 0.0% 0.0 ms
|
||||
| | C1E 1.2% 0.2 ms 1.2% 0.2 ms
|
||||
| |
|
||||
| C3 (cc3) 0.6% | C3 0.6% 0.2 ms 0.4% 0.2 ms
|
||||
| C6 (cc6) 7.0% | C6 7.5% 0.5 ms 4.4% 0.5 ms
|
||||
| C7 (cc7) 56.8% | C7s 0.0% 0.0 ms 0.0% 0.9 ms
|
||||
| | C8 29.4% 1.4 ms 23.8% 1.4 ms
|
||||
| | C9 1.1% 2.7 ms 0.7% 3.9 ms
|
||||
| | C10 41.0% 4.0 ms 50.0% 4.8 ms
|
||||
|
||||
|
||||
Exit | / Navigate |
|
||||
```
|
||||
|
||||
### Frequency Stats Tab
|
||||
|
||||
It displays the frequency of CPU.
|
||||
|
||||
```
|
||||
PowerTOP v2.9 Overview Idle stats Frequency stats Device stats Tunables
|
||||
|
||||
|
||||
Package | Core | CPU 0 CPU 4
|
||||
| | Average 930 MHz 1101 MHz
|
||||
Idle | Idle | Idle
|
||||
|
||||
| Core | CPU 1 CPU 5
|
||||
| | Average 1063 MHz 979 MHz
|
||||
| Idle | Idle
|
||||
|
||||
| Core | CPU 2 CPU 6
|
||||
| | Average 976 MHz 942 MHz
|
||||
| Idle | Idle
|
||||
|
||||
| Core | CPU 3 CPU 7
|
||||
| | Average 924 MHz 957 MHz
|
||||
| Idle | Idle
|
||||
|
||||
```
|
||||
|
||||
### Device Stats Tab
|
||||
|
||||
It displays power usage information against only devices.
|
||||
|
||||
```
|
||||
PowerTOP v2.9 Overview Idle stats Frequency stats Device stats Tunables
|
||||
|
||||
|
||||
The battery reports a discharge rate of 13.8 W
|
||||
The power consumed was 280 J
|
||||
|
||||
Usage Device name
|
||||
46.7% CPU misc
|
||||
46.7% DRAM
|
||||
46.7% CPU core
|
||||
19.0% Display backlight
|
||||
0.0% Audio codec hwC0D0: Realtek
|
||||
0.0% USB device: Lenovo EasyCamera (160709000341)
|
||||
100.0% PCI Device: Intel Corporation HD Graphics 530
|
||||
100.0% Radio device: iwlwifi
|
||||
100.0% PCI Device: O2 Micro, Inc. SD/MMC Card Reader Controller
|
||||
100.0% PCI Device: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Host Bridge/DRAM Registers
|
||||
100.0% USB device: Lenovo Wireless Optical Mouse N100
|
||||
100.0% PCI Device: Intel Corporation Wireless 8260
|
||||
100.0% PCI Device: Intel Corporation HM170/QM170 Chipset SATA Controller [AHCI Mode]
|
||||
100.0% Radio device: btusb
|
||||
100.0% PCI Device: Intel Corporation 100 Series/C230 Series Chipset Family PCI Express Root Port #4
|
||||
100.0% USB device: xHCI Host Controller
|
||||
100.0% PCI Device: Intel Corporation 100 Series/C230 Series Chipset Family USB 3.0 xHCI Controller
|
||||
100.0% PCI Device: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
|
||||
100.0% PCI Device: Intel Corporation 100 Series/C230 Series Chipset Family PCI Express Root Port #3
|
||||
100.0% PCI Device: Samsung Electronics Co Ltd NVMe SSD Controller SM951/PM951
|
||||
100.0% PCI Device: Intel Corporation 100 Series/C230 Series Chipset Family PCI Express Root Port #2
|
||||
100.0% PCI Device: Intel Corporation 100 Series/C230 Series Chipset Family PCI Express Root Port #9
|
||||
100.0% PCI Device: Intel Corporation 100 Series/C230 Series Chipset Family SMBus
|
||||
26.1 pkts/s Network interface: wlp8s0 (iwlwifi)
|
||||
0.0% USB device: usb-device-8087-0a2b
|
||||
0.0% runtime-reg-dummy
|
||||
0.0% Audio codec hwC0D2: Intel
|
||||
0.0 pkts/s Network interface: enp9s0 (r8168)
|
||||
0.0% PCI Device: Intel Corporation 100 Series/C230 Series Chipset Family Power Management Controller
|
||||
0.0% PCI Device: Intel Corporation HM170 Chipset LPC/eSPI Controller
|
||||
0.0% PCI Device: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor PCIe Controller (x16)
|
||||
0.0% PCI Device: Intel Corporation 100 Series/C230 Series Chipset Family MEI Controller #1
|
||||
0.0% PCI Device: NVIDIA Corporation GM107M [GeForce GTX 960M]
|
||||
0.0% I2C Adapter (i2c-8): nvkm-0000:01:00.0-bus-0005
|
||||
0.0% runtime-PNP0C14:00
|
||||
0.0% PCI Device: Intel Corporation 100 Series/C230 Series Chipset Family HD Audio Controller
|
||||
0.0% runtime-PNP0C0C:00
|
||||
0.0% USB device: xHCI Host Controller
|
||||
0.0% runtime-ACPI000C:00
|
||||
0.0% runtime-regulatory.0
|
||||
0.0% runtime-PNP0C14:01
|
||||
0.0% runtime-vesa-framebuffer.0
|
||||
0.0% runtime-coretemp.0
|
||||
0.0% runtime-alarmtimer
|
||||
|
||||
Exit | / Navigate |
|
||||
```
|
||||
|
||||
### Tunables Stats Tab
|
||||
|
||||
This tab is important area that provides suggestions to optimize your laptop battery.
|
||||
|
||||
```
|
||||
PowerTOP v2.9 Overview Idle stats Frequency stats Device stats Tunables
|
||||
|
||||
|
||||
>> Bad Enable SATA link power management for host2
|
||||
Bad Enable SATA link power management for host3
|
||||
Bad Enable SATA link power management for host0
|
||||
Bad Enable SATA link power management for host1
|
||||
Bad VM writeback timeout
|
||||
Bad Autosuspend for USB device Lenovo Wireless Optical Mouse N100 [1-2]
|
||||
Good Bluetooth device interface status
|
||||
Good Enable Audio codec power management
|
||||
Good NMI watchdog should be turned off
|
||||
Good Runtime PM for I2C Adapter i2c-7 (nvkm-0000:01:00.0-bus-0002)
|
||||
Good Autosuspend for unknown USB device 1-11 (8087:0a2b)
|
||||
Good Runtime PM for I2C Adapter i2c-3 (i915 gmbus dpd)
|
||||
Good Autosuspend for USB device Lenovo EasyCamera [160709000341]
|
||||
Good Runtime PM for I2C Adapter i2c-1 (i915 gmbus dpc)
|
||||
Good Runtime PM for I2C Adapter i2c-12 (nvkm-0000:01:00.0-bus-0009)
|
||||
Good Autosuspend for USB device xHCI Host Controller [usb1]
|
||||
Good Runtime PM for I2C Adapter i2c-13 (nvkm-0000:01:00.0-aux-000a)
|
||||
Good Runtime PM for I2C Adapter i2c-2 (i915 gmbus dpb)
|
||||
Good Runtime PM for I2C Adapter i2c-8 (nvkm-0000:01:00.0-bus-0005)
|
||||
Good Runtime PM for I2C Adapter i2c-15 (nvkm-0000:01:00.0-aux-000c)
|
||||
Good Runtime PM for I2C Adapter i2c-16 (nvkm-0000:01:00.0-aux-000d)
|
||||
Good Runtime PM for I2C Adapter i2c-5 (nvkm-0000:01:00.0-bus-0000)
|
||||
Good Runtime PM for I2C Adapter i2c-0 (SMBus I801 adapter at 6040)
|
||||
Good Runtime PM for I2C Adapter i2c-11 (nvkm-0000:01:00.0-bus-0008)
|
||||
Good Runtime PM for I2C Adapter i2c-14 (nvkm-0000:01:00.0-aux-000b)
|
||||
Good Autosuspend for USB device xHCI Host Controller [usb2]
|
||||
Good Runtime PM for I2C Adapter i2c-9 (nvkm-0000:01:00.0-bus-0006)
|
||||
Good Runtime PM for I2C Adapter i2c-10 (nvkm-0000:01:00.0-bus-0007)
|
||||
Good Runtime PM for I2C Adapter i2c-6 (nvkm-0000:01:00.0-bus-0001)
|
||||
Good Runtime PM for PCI Device Intel Corporation 100 Series/C230 Series Chipset Family HD Audio Controller
|
||||
Good Runtime PM for PCI Device Intel Corporation 100 Series/C230 Series Chipset Family USB 3.0 xHCI Controller
|
||||
Good Runtime PM for PCI Device Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Host Bridge/DRAM Registers
|
||||
Good Runtime PM for PCI Device Intel Corporation 100 Series/C230 Series Chipset Family PCI Express Root Port #9
|
||||
Good Runtime PM for PCI Device Intel Corporation HD Graphics 530
|
||||
Good Runtime PM for PCI Device Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
|
||||
Good Runtime PM for PCI Device Intel Corporation 100 Series/C230 Series Chipset Family PCI Express Root Port #3
|
||||
Good Runtime PM for PCI Device O2 Micro, Inc. SD/MMC Card Reader Controller
|
||||
Good Runtime PM for PCI Device Intel Corporation HM170 Chipset LPC/eSPI Controller
|
||||
Good Runtime PM for PCI Device Intel Corporation 100 Series/C230 Series Chipset Family MEI Controller #1
|
||||
Good Runtime PM for PCI Device Samsung Electronics Co Ltd NVMe SSD Controller SM951/PM951
|
||||
Good Runtime PM for PCI Device Intel Corporation HM170/QM170 Chipset SATA Controller [AHCI Mode]
|
||||
Good Runtime PM for PCI Device Intel Corporation 100 Series/C230 Series Chipset Family Power Management Controller
|
||||
Good Runtime PM for PCI Device Intel Corporation 100 Series/C230 Series Chipset Family PCI Express Root Port #2
|
||||
Good Runtime PM for PCI Device Intel Corporation Wireless 8260
|
||||
Good Runtime PM for PCI Device Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor PCIe Controller (x16)
|
||||
Good Runtime PM for PCI Device Intel Corporation 100 Series/C230 Series Chipset Family PCI Express Root Port #4
|
||||
Good Runtime PM for PCI Device Intel Corporation 100 Series/C230 Series Chipset Family SMBus
|
||||
Good Runtime PM for PCI Device NVIDIA Corporation GM107M [GeForce GTX 960M]
|
||||
|
||||
Exit | Toggle tunable | Window refresh
|
||||
```
|
||||
|
||||
### How To Generate PowerTop HTML Report
|
||||
|
||||
Run the following command to generate the PowerTop HTML report.
|
||||
|
||||
```
|
||||
$ sudo powertop --html=powertop.html
|
||||
modprobe cpufreq_stats failedLoaded 100 prior measurements
|
||||
Cannot load from file /var/cache/powertop/saved_parameters.powertop
|
||||
File will be loaded after taking minimum number of measurement(s) with battery only
|
||||
RAPL device for cpu 0
|
||||
RAPL Using PowerCap Sysfs : Domain Mask f
|
||||
RAPL device for cpu 0
|
||||
RAPL Using PowerCap Sysfs : Domain Mask f
|
||||
Devfreq not enabled
|
||||
glob returned GLOB_ABORTED
|
||||
Cannot load from file /var/cache/powertop/saved_parameters.powertop
|
||||
File will be loaded after taking minimum number of measurement(s) with battery only
|
||||
Preparing to take measurements
|
||||
To show power estimates do 182 measurement(s) connected to battery only
|
||||
Taking 1 measurement(s) for a duration of 20 second(s) each.
|
||||
PowerTOP outputing using base filename powertop.html
|
||||
```
|
||||
|
||||
Navigate to `file:///home/daygeek/powertop.html` file to access the generated PowerTOP HTML report.
|
||||
![][9]
|
||||
|
||||
### Auto-Tune mode
|
||||
|
||||
This feature sets all tunable options from `BAD` to `GOOD` which increase the laptop battery life in Linux.
|
||||
|
||||
```
|
||||
$ sudo powertop --auto-tune
|
||||
modprobe cpufreq_stats failedLoaded 210 prior measurements
|
||||
Cannot load from file /var/cache/powertop/saved_parameters.powertop
|
||||
File will be loaded after taking minimum number of measurement(s) with battery only
|
||||
RAPL device for cpu 0
|
||||
RAPL Using PowerCap Sysfs : Domain Mask f
|
||||
RAPL device for cpu 0
|
||||
RAPL Using PowerCap Sysfs : Domain Mask f
|
||||
Devfreq not enabled
|
||||
glob returned GLOB_ABORTED
|
||||
Cannot load from file /var/cache/powertop/saved_parameters.powertop
|
||||
File will be loaded after taking minimum number of measurement(s) with battery only
|
||||
To show power estimates do 72 measurement(s) connected to battery only
|
||||
Leaving PowerTOP
|
||||
```
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.2daygeek.com/powertop-monitors-laptop-battery-usage-linux/
|
||||
|
||||
作者:[Vinoth Kumar][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.2daygeek.com/author/vinoth/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://www.2daygeek.com/category/package-management/
|
||||
[2]: https://www.2daygeek.com/dnf-command-examples-manage-packages-fedora-system/
|
||||
[3]: https://www.2daygeek.com/apt-get-apt-cache-command-examples-manage-packages-debian-ubuntu-systems/
|
||||
[4]: https://www.2daygeek.com/apt-command-examples-manage-packages-debian-ubuntu-systems/
|
||||
[5]: https://www.2daygeek.com/pacman-command-examples-manage-packages-arch-linux-system/
|
||||
[6]: https://www.2daygeek.com/yum-command-examples-manage-packages-rhel-centos-systems/
|
||||
[7]: https://www.2daygeek.com/zypper-command-examples-manage-packages-opensuse-system/
|
||||
[8]: data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7
|
||||
[9]: https://www.2daygeek.com/wp-content/uploads/2015/07/powertop-html-output.jpg
|
||||
@@ -0,0 +1,337 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (How To Install Microsoft .NET Core SDK On Linux)
|
||||
[#]: via: (https://www.ostechnix.com/how-to-install-microsoft-net-core-sdk-on-linux/)
|
||||
[#]: author: (SK https://www.ostechnix.com/author/sk/)
|
||||
|
||||
How To Install Microsoft .NET Core SDK On Linux
|
||||
======
|
||||
|
||||

|
||||
|
||||
The **.NET Core** is a free, cross platform and open source framework developed by Microsoft to build desktop applications, mobile apps, web apps, IoT apps and gaming apps etc. If you’re dotnet developer coming from Windows platform, .NET core helps you to setup your development environment easily on any Linux and Unix-like operating systems. This step by step guide explains how to install Microsoft .NET Core SDK on Linux and how to write your first app using .Net.
|
||||
|
||||
### Install Microsoft .NET Core SDK On Linux
|
||||
|
||||
The .NET core supports GNU/Linux, Mac OS and Windows. .Net core can be installed on popular GNU/Linux operating systems including Debian, Fedora, CentOS, Oracle Linux, RHEL, SUSE/openSUSE, and Ubuntu. As of writing this guide, the latest .NET core version was **2.2**.
|
||||
|
||||
On **Debian 9** , you can install .NET Core SDK as shown below.
|
||||
|
||||
First of all, you need to register Microsoft key and add .NET repository by running the following commands:
|
||||
|
||||
```
|
||||
$ wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.asc.gpg
|
||||
$ sudo mv microsoft.asc.gpg /etc/apt/trusted.gpg.d/
|
||||
$ wget -q https://packages.microsoft.com/config/debian/9/prod.list
|
||||
$ sudo mv prod.list /etc/apt/sources.list.d/microsoft-prod.list
|
||||
$ sudo chown root:root /etc/apt/trusted.gpg.d/microsoft.asc.gpg
|
||||
$ sudo chown root:root /etc/apt/sources.list.d/microsoft-prod.list
|
||||
```
|
||||
|
||||
After registering the key and adding the repository, install .NET SDK using commands:
|
||||
|
||||
```
|
||||
$ sudo apt-get update
|
||||
$ sudo apt-get install dotnet-sdk-2.2
|
||||
```
|
||||
|
||||
**On Debian 8:**
|
||||
|
||||
Add Microsoft key and enable .NET repository:
|
||||
|
||||
```
|
||||
$ wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.asc.gpg
|
||||
$ sudo mv microsoft.asc.gpg /etc/apt/trusted.gpg.d/
|
||||
$ wget -q https://packages.microsoft.com/config/debian/8/prod.list
|
||||
$ sudo mv prod.list /etc/apt/sources.list.d/microsoft-prod.list
|
||||
$ sudo chown root:root /etc/apt/trusted.gpg.d/microsoft.asc.gpg
|
||||
$ sudo chown root:root /etc/apt/sources.list.d/microsoft-prod.list
|
||||
```
|
||||
|
||||
Install .NET SDK:
|
||||
|
||||
```
|
||||
$ sudo apt-get update
|
||||
$ sudo apt-get install dotnet-sdk-2.2
|
||||
```
|
||||
|
||||
**On Fedora 28:**
|
||||
|
||||
Add Microsoft key and enable .NET repository:
|
||||
|
||||
```
|
||||
$ sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc
|
||||
$ wget -q https://packages.microsoft.com/config/fedora/27/prod.repo
|
||||
$ sudo mv prod.repo /etc/yum.repos.d/microsoft-prod.repo
|
||||
$ sudo chown root:root /etc/yum.repos.d/microsoft-prod.repo
|
||||
```
|
||||
|
||||
Now, Install .NET SDK:
|
||||
|
||||
```
|
||||
$ sudo dnf update
|
||||
$ sudo dnf install dotnet-sdk-2.2
|
||||
```
|
||||
|
||||
On **Fedora 27** , add the key and repository using commands:
|
||||
|
||||
```
|
||||
$ sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc
|
||||
$ wget -q https://packages.microsoft.com/config/fedora/27/prod.repo
|
||||
$ sudo mv prod.repo /etc/yum.repos.d/microsoft-prod.repo
|
||||
$ sudo chown root:root /etc/yum.repos.d/microsoft-prod.repo
|
||||
```
|
||||
|
||||
And install .NET SDK using commands:
|
||||
|
||||
```
|
||||
$ sudo dnf update
|
||||
$ sudo dnf install dotnet-sdk-2.2
|
||||
```
|
||||
|
||||
**On CentOS/Oracle Linux:**
|
||||
|
||||
Add Microsoft key and enable .NET core repository:
|
||||
|
||||
```
|
||||
$ sudo rpm -Uvh https://packages.microsoft.com/config/rhel/7/packages-microsoft-prod.rpm
|
||||
```
|
||||
|
||||
Update the repositories and install .NET SDK:
|
||||
|
||||
```
|
||||
$ sudo yum update
|
||||
$ sudo yum install dotnet-sdk-2.2
|
||||
```
|
||||
|
||||
**On openSUSE Leap:**
|
||||
|
||||
Add key, enable repository and install necessary dependencies using the following commands:
|
||||
|
||||
```
|
||||
$ sudo zypper install libicu
|
||||
$ sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc
|
||||
$ wget -q https://packages.microsoft.com/config/opensuse/42.2/prod.repo
|
||||
$ sudo mv prod.repo /etc/zypp/repos.d/microsoft-prod.repo
|
||||
$ sudo chown root:root /etc/zypp/repos.d/microsoft-prod.repo
|
||||
```
|
||||
|
||||
Update the repositories and Install .NET SDK using commands:
|
||||
|
||||
```
|
||||
$ sudo zypper update
|
||||
$ sudo zypper install dotnet-sdk-2.2
|
||||
```
|
||||
|
||||
**On Ubuntu 18.04 LTS:**
|
||||
|
||||
Register the Microsoft key and .NET core repository using commands:
|
||||
|
||||
```
|
||||
$ wget -q https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb
|
||||
$ sudo dpkg -i packages-microsoft-prod.deb
|
||||
```
|
||||
|
||||
Enable ‘Universe’ repository using:
|
||||
|
||||
```
|
||||
$ sudo add-apt-repository universe
|
||||
```
|
||||
|
||||
Then, install .NET Core SDK using command:
|
||||
|
||||
```
|
||||
$ sudo apt-get install apt-transport-https
|
||||
$sudo apt-get update
|
||||
$ sudo apt-get install dotnet-sdk-2.2
|
||||
```
|
||||
|
||||
**On Ubuntu 16.04 LTS:**
|
||||
|
||||
Register Microsoft key and .NET repository using commands:
|
||||
|
||||
```
|
||||
$ wget -q https://packages.microsoft.com/config/ubuntu/16.04/packages-microsoft-prod.deb
|
||||
$ sudo dpkg -i packages-microsoft-prod.deb
|
||||
```
|
||||
|
||||
And then, Install .NET core SDK:
|
||||
|
||||
```
|
||||
$ sudo apt-get install apt-transport-https
|
||||
$ sudo apt-get update
|
||||
$ sudo apt-get install dotnet-sdk-2.2
|
||||
```
|
||||
|
||||
### Create Your First App
|
||||
|
||||
We have successfully installed .Net Core SDK in our Linux box. It is time to create our first app using dotnet.
|
||||
|
||||
For the purpose of this guide, I am going to create a new app called **“ostechnixApp”**. To do so, simply run the following command:
|
||||
|
||||
```
|
||||
$ dotnet new console -o ostechnixApp
|
||||
```
|
||||
|
||||
**Sample output:**
|
||||
|
||||
```
|
||||
Welcome to .NET Core!
|
||||
---------------------
|
||||
Learn more about .NET Core: https://aka.ms/dotnet-docs
|
||||
Use 'dotnet --help' to see available commands or visit: https://aka.ms/dotnet-cli-docs
|
||||
|
||||
Telemetry
|
||||
---------
|
||||
The .NET Core tools collect usage data in order to help us improve your experience. The data is anonymous and doesn't include command-line arguments. The data is collected by Microsoft and shared with the community. You can opt-out of telemetry by setting the DOTNET_CLI_TELEMETRY_OPTOUT environment variable to '1' or 'true' using your favorite shell.
|
||||
|
||||
Read more about .NET Core CLI Tools telemetry: https://aka.ms/dotnet-cli-telemetry
|
||||
|
||||
ASP.NET Core
|
||||
------------
|
||||
Successfully installed the ASP.NET Core HTTPS Development Certificate.
|
||||
To trust the certificate run 'dotnet dev-certs https --trust' (Windows and macOS only). For establishing trust on other platforms refer to the platform specific documentation.
|
||||
For more information on configuring HTTPS see https://go.microsoft.com/fwlink/?linkid=848054.
|
||||
Getting ready...
|
||||
The template "Console Application" was created successfully.
|
||||
|
||||
Processing post-creation actions...
|
||||
Running 'dotnet restore' on ostechnixApp/ostechnixApp.csproj...
|
||||
Restoring packages for /home/sk/ostechnixApp/ostechnixApp.csproj...
|
||||
Generating MSBuild file /home/sk/ostechnixApp/obj/ostechnixApp.csproj.nuget.g.props.
|
||||
Generating MSBuild file /home/sk/ostechnixApp/obj/ostechnixApp.csproj.nuget.g.targets.
|
||||
Restore completed in 894.27 ms for /home/sk/ostechnixApp/ostechnixApp.csproj.
|
||||
|
||||
Restore succeeded.
|
||||
```
|
||||
|
||||
As you can see in the above output, .Net has created a new application of type console. The parameter -o creates a directory named “ostechnixApp” where you store your app data with all necessary files.
|
||||
|
||||
Let us switch to ostechnixApp directory and see what’s in there.
|
||||
|
||||
```
|
||||
$ cd ostechnixApp/
|
||||
$ ls
|
||||
obj ostechnixApp.csproj Program.cs
|
||||
```
|
||||
|
||||
As you there are three files named **ostechnixApp.csproj** and **Program.cs** and one directory named **obj**. By default, the Program.cs file will contain the code to run the ‘Hello World’ program in the console. Let us have a look at the code.
|
||||
|
||||
```
|
||||
$ cat Program.cs
|
||||
using System;
|
||||
|
||||
namespace ostechnixApp
|
||||
{
|
||||
class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
Console.WriteLine("Hello World!");
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
To run the newly created app, simply run the following command:
|
||||
|
||||
```
|
||||
$ dotnet run
|
||||
Hello World!
|
||||
```
|
||||
|
||||

|
||||
|
||||
Simple, isn’t it? Yes, it is! Now, you can write your code in the **Program.cs** file and run it as shown above.
|
||||
|
||||
Alternatively, you can create a new directory, for example mycode, using commands:
|
||||
|
||||
```
|
||||
$ mkdir ~/.mycode
|
||||
|
||||
$ cd mycode/
|
||||
```
|
||||
|
||||
…and make that as your new development environment by running the following command:
|
||||
|
||||
```
|
||||
$ dotnet new console
|
||||
```
|
||||
|
||||
Sample output:
|
||||
|
||||
```
|
||||
The template "Console Application" was created successfully.
|
||||
|
||||
Processing post-creation actions...
|
||||
Running 'dotnet restore' on /home/sk/mycode/mycode.csproj...
|
||||
Restoring packages for /home/sk/mycode/mycode.csproj...
|
||||
Generating MSBuild file /home/sk/mycode/obj/mycode.csproj.nuget.g.props.
|
||||
Generating MSBuild file /home/sk/mycode/obj/mycode.csproj.nuget.g.targets.
|
||||
Restore completed in 331.87 ms for /home/sk/mycode/mycode.csproj.
|
||||
|
||||
Restore succeeded.
|
||||
```
|
||||
|
||||
The above command will create two files named **mycode.csproj** and **Program.cs** and one directory named **obj**. Open the Program.cs file in your favorite editor, delete or modify the existing ‘hello world’ code with your own code.
|
||||
|
||||
Once the code is written, save and close the Program.cs file and run the app using command:
|
||||
|
||||
```
|
||||
$ dotnet run
|
||||
```
|
||||
|
||||
To check the installed .NET core SDK version, simply run:
|
||||
|
||||
```
|
||||
$ dotnet --version
|
||||
2.2.101
|
||||
```
|
||||
|
||||
To get help, run:
|
||||
|
||||
```
|
||||
$ dotnet --help
|
||||
```
|
||||
|
||||
### Get Microsoft Visual Studio Code Editor
|
||||
|
||||
To write the code, you can use your favorite editors of your choice. Microsoft has also its own editor named “ **Microsoft Visual Studio Code** ” with support for .NET. It is an open source, lightweight and powerful source code editor. It comes with built-in support for JavaScript, TypeScript and Node.js and has a rich ecosystem of extensions for other languages (such as C++, C#, Python, PHP, Go) and runtimes (such as .NET and Unity). It is a cross-platform code editor, so you can use it in Microsoft Windows, GNU/Linux, and Mac OS X. You can use it if you’re interested.
|
||||
|
||||
To know how to install and use it on Linux, please refer the following guide.
|
||||
|
||||
[Install Microsoft Visual Studio Code In Linux][3]
|
||||
|
||||
[**This page**][1] has some basic tutorials to learn .NET Core and .NET Core SDK tools using Visual Studio Code editor. Go and check them to learn more.
|
||||
|
||||
### Telemetry
|
||||
|
||||
By default, the .NET core SDK will collect the usage data using a feature called **‘Telemetry’**. The collected data is anonymous and shared to the development team and community under the [Creative Commons Attribution License][2]. So the .NET team will understand how the tools are used and decide how they can be improved over time. If you don’t want to share your usage information, you can simply opt-out of telemetry by setting the **DOTNET_CLI_TELEMETRY_OPTOUT** environment variable to **‘1’** or **‘true’** using your favorite shell.
|
||||
|
||||
And, that’s all. You know how to install .NET Core SDK on various Linux platforms and how to create a basic app using it. TO learn more about .NET usage, refer the links given at the end of this guide.
|
||||
|
||||
More good stuffs to come. Stay tuned!
|
||||
|
||||
Cheers!
|
||||
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.ostechnix.com/how-to-install-microsoft-net-core-sdk-on-linux/
|
||||
|
||||
作者:[SK][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.ostechnix.com/author/sk/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://docs.microsoft.com/en-us/dotnet/core/tutorials/index
|
||||
[2]: https://creativecommons.org/licenses/by/4.0/
|
||||
[3]: https://www.ostechnix.com/install-microsoft-visual-studio-code-linux/
|
||||
@@ -0,0 +1,200 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (An Easy Way To Remove Programs Installed From Source In Linux)
|
||||
[#]: via: (https://www.ostechnix.com/an-easy-way-to-remove-programs-installed-from-source-in-linux/)
|
||||
[#]: author: (SK https://www.ostechnix.com/author/sk/)
|
||||
|
||||
An Easy Way To Remove Programs Installed From Source In Linux
|
||||
======
|
||||
|
||||

|
||||
|
||||
Not all programs available in the official or third-party repositories, so you can’t install them using the regular package managers. Some times, you have to install the programs by manually compiling from source. As you may already know, when you install programs from source, the package files will be copied to multiple locations, such as **/usr/local/bin** , **/usr/local/etc/** , on the filesystem. If the installed program from source doesn’t have a built-in uninstaller, it is going to be a tedious task to remove the packages when you don’t need it anymore. You may need to spend couple (or several) minutes to find those package files and remove them manually. This is what I have been doing up until I stumbled upon a utility named **“GNU Stow”**. Thankfully, Stow has a fantastic way to easily manage programs installed from source.
|
||||
|
||||
To quote the official website,
|
||||
|
||||
> **GNU Stow is a symlink farm manager which takes distinct packages of software and/or data located in separate directories on the filesystem, and makes them appear to be installed in the same place.**
|
||||
|
||||
To put this simply, Stow helps you to keep the package files organized in a way to easily manageable. In this method, the files will not be copied to multiple locations. Instead, all files are saved in a specific folder, usually under the program name itself, and Stow creates symbolic links to all the programs’ files into the appropriate places. For example, **/usr/local/bin** could contain symlinks to files within **/usr/local/stow/vim/bin** , **/usr/local/stow/python/bin** etc., and likewise recursively for any other subdirectories such as **…/share** , **…/man** , and so on. In this tutorial, I will show you how to easily manage programs installed from source using Stow with a practical example. Read on.
|
||||
|
||||
### Installing GNU Stow
|
||||
|
||||
GNU Stow is available in the default repositories of popular Linux operating systems.
|
||||
|
||||
On **Arch Linux** and its variants, run the following command to install Stow.
|
||||
|
||||
```
|
||||
$ sudo pacman -S stow
|
||||
```
|
||||
|
||||
On **Debian** , **Ubuntu** , **Linux Mint** :
|
||||
|
||||
```
|
||||
$ sudo apt install stow
|
||||
```
|
||||
|
||||
On **Fedora** :
|
||||
|
||||
```
|
||||
$ sudo dnf install stow
|
||||
```
|
||||
|
||||
On **RHEL/CentOS** :
|
||||
|
||||
```
|
||||
$ sudo yum install epel-release
|
||||
|
||||
$ sudo yum install stow
|
||||
```
|
||||
|
||||
### Easily Remove Programs Installed From Source In Linux
|
||||
|
||||
As I already mentioned earlier, all program files of a package will be saved in a root folder located in **/usr/local/stow/**. Under this root or parent directory, each package will be saved in its own private sub-directory. For example, if we install Vim editor from source, all program files and directories related to Vim will be saved under **/usr/local/stow/vim** folder. If you install python from source, all files related to python will be kept under **/usr/local/stow/python** and so on.
|
||||
|
||||
Let me install a program, for example **hello** , from source.
|
||||
|
||||
First download the ‘hello’ program’s tarball.
|
||||
|
||||
```
|
||||
$ wget http://ftp.gnu.org/gnu/hello/hello-2.10.tar.gz
|
||||
```
|
||||
|
||||
Extract the downloaded tarball using command:
|
||||
|
||||
```
|
||||
$ tar -zxvf hello-2.10.tar.gz
|
||||
```
|
||||
|
||||
The above command will create a directory named ‘hello-2.10’ in the current working directory and extract all contents in it.
|
||||
|
||||
Switch to the extracted directory:
|
||||
|
||||
```
|
||||
$ cd hello-2.10/
|
||||
```
|
||||
|
||||
Run the following command with –prefix option.
|
||||
|
||||
```
|
||||
$ ./configure --prefix=/usr/local/stow/hello
|
||||
```
|
||||
|
||||
The above command will save the build files in the specified location i.e **/usr/local/stow/hello** in our case.
|
||||
|
||||
Finally, build and install the hello program using the following commands:
|
||||
|
||||
```
|
||||
$ make
|
||||
|
||||
$ sudo make install
|
||||
```
|
||||
|
||||
That’s it. The hello program has been installed in **/usr/local/stow/hello/** location. You can verify it with ‘ls’ command as shown below.
|
||||
|
||||
```
|
||||
$ ls /usr/local/stow/hello/
|
||||
bin share
|
||||
```
|
||||
|
||||
Finally, go to the **/usr/local/stow/** directory and run the following command to generate the necessary symlinks.
|
||||
|
||||
```
|
||||
$ cd /usr/local/stow/
|
||||
|
||||
$ sudo stow hello
|
||||
```
|
||||
|
||||
All done!
|
||||
|
||||
What just happened is all the files and directories contained in the hello package have been symlinked to the directory **/usr/local/**. In other words, **/usr/local/stow/hello/bin** has been symlinked to **/usr/local/bin** and **/usr/local/stow/hello/share** has been symlinked to **/usr/local/share** and **/usr/local/stow/hello/share/man** has been symlinked to **/usr/local/share/man** and so on.
|
||||
|
||||
You can verify them using ‘ls’ command:
|
||||
|
||||
```
|
||||
$ ls /usr/local/bin/
|
||||
hello
|
||||
```
|
||||
|
||||
Let us check if the hello program is working or not using command:
|
||||
|
||||
```
|
||||
$ hello
|
||||
Hello, world!
|
||||
```
|
||||
|
||||
Yeah, it is working!!
|
||||
|
||||
Similarly, you can install programs as described above under its own sub-directory.
|
||||
|
||||
Here is the contents of the Stow root directory:
|
||||
|
||||
```
|
||||
$ tree /usr/local/stow/
|
||||
```
|
||||
|
||||
![][2]
|
||||
|
||||
See? The hello program is installed /usr/local/stow/hello/ location. Like wise, all packages will be kept under their own directory.
|
||||
|
||||
Here comes the main part. Let us remove the hello program. To do so, go to **/usr/local/stow/** directory:
|
||||
|
||||
```
|
||||
$ cd /usr/local/stow/
|
||||
```
|
||||
|
||||
..and run the following command:
|
||||
|
||||
```
|
||||
$ sudo stow --delete hello
|
||||
```
|
||||
|
||||
The hello program has just been removed. You can verify if it is really removed using command:
|
||||
|
||||
```
|
||||
$ hello
|
||||
-bash: /usr/local/bin/hello: No such file or directory
|
||||
```
|
||||
|
||||
![][3]
|
||||
|
||||
See? Hello program is removed!
|
||||
|
||||
Please note that Stow has removed the symlinks only. All program files and directories related to hello program are still available in **/usr/local/stow/hello** folder. So, you can install the hello program again without having to download the actual source file. If you don’t want it anymore, simply delete the folder.
|
||||
|
||||
```
|
||||
$ sudo rm -fr /usr/local/stow/hello/
|
||||
```
|
||||
|
||||
To know more details about Stow, refer the man pages.
|
||||
|
||||
```
|
||||
$ man stow
|
||||
```
|
||||
|
||||
|
||||
Stow helps you to uninstall the programs as easily as you install them. If you are wondering how to effectively manage a lot of programs installed from source, GNU Stow is one such program to make this task a lot easier. Give it a try, you won’t be disappointed.
|
||||
|
||||
And, that’s all for now. Hope this was useful. More good stuffs to come. Stay tuned!
|
||||
|
||||
Cheers!
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.ostechnix.com/an-easy-way-to-remove-programs-installed-from-source-in-linux/
|
||||
|
||||
作者:[SK][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.ostechnix.com/author/sk/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7
|
||||
[2]: http://www.ostechnix.com/wp-content/uploads/2018/12/tree-command.png
|
||||
[3]: http://www.ostechnix.com/wp-content/uploads/2018/12/hello-world.png
|
||||
284
sources/tech/20181221 How to Build a Netboot Server, Part 3.md
Normal file
284
sources/tech/20181221 How to Build a Netboot Server, Part 3.md
Normal file
@@ -0,0 +1,284 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (qhwdw)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (How to Build a Netboot Server, Part 3)
|
||||
[#]: via: (https://fedoramagazine.org/how-to-build-a-netboot-server-part-3/)
|
||||
[#]: author: (Gregory Bartholomew https://fedoramagazine.org/author/glb/)
|
||||
|
||||
How to Build a Netboot Server, Part 3
|
||||
======
|
||||
|
||||

|
||||
|
||||
The [How to Build a Netboot Server, Part 1][1] article provided a minimal [iPXE][2] boot script for your netboot image. Many users probably have a local operating system that they want to use in addition to the netboot image. But switching bootloaders using the typical workstation’s BIOS can be cumbersome. This part of the series shows how to set up some more complex iPXE configurations. These allow the end user to easily choose which operating system they want to boot. They also let the system administrator manage the boot menus from a central server.
|
||||
|
||||
### An interactive iPXE boot menu
|
||||
|
||||
The commands below redefine the netboot image’s boot.cfg as an interactive iPXE boot menu with a 5 second countdown timer:
|
||||
|
||||
```
|
||||
$ MY_FVER=29
|
||||
$ MY_KRNL=$(ls -c /fc$MY_FVER/lib/modules | head -n 1)
|
||||
$ MY_DNS1=192.0.2.91
|
||||
$ MY_DNS2=192.0.2.92
|
||||
$ MY_NAME=server-01.example.edu
|
||||
$ MY_EMAN=$(echo $MY_NAME | tr '.' "\n" | tac | tr "\n" '.' | cut -b -${#MY_NAME})
|
||||
$ MY_ADDR=$(host -t A $MY_NAME | awk '{print $4}')
|
||||
$ cat << END > $HOME/esp/linux/boot.cfg
|
||||
#!ipxe
|
||||
|
||||
set timeout 5000
|
||||
|
||||
:menu
|
||||
menu iPXE Boot Menu
|
||||
item --key 1 lcl 1. Microsoft Windows 10
|
||||
item --key 2 f$MY_FVER 2. RedHat Fedora $MY_FVER
|
||||
choose --timeout \${timeout} --default lcl selected || goto shell
|
||||
set timeout 0
|
||||
goto \${selected}
|
||||
|
||||
:failed
|
||||
echo boot failed, dropping to shell...
|
||||
goto shell
|
||||
|
||||
:shell
|
||||
echo type 'exit' to get the back to the menu
|
||||
set timeout 0
|
||||
shell
|
||||
goto menu
|
||||
|
||||
:lcl
|
||||
exit
|
||||
|
||||
:f$MY_FVER
|
||||
kernel --name kernel.efi \${prefix}/vmlinuz-$MY_KRNL initrd=initrd.img ro ip=dhcp rd.peerdns=0 nameserver=$MY_DNS1 nameserver=$MY_DNS2 root=/dev/disk/by-path/ip-$MY_ADDR:3260-iscsi-iqn.$MY_EMAN:fc$MY_FVER-lun-1 netroot=iscsi:$MY_ADDR::::iqn.$MY_EMAN:fc$MY_FVER console=tty0 console=ttyS0,115200n8 audit=0 selinux=0 quiet
|
||||
initrd --name initrd.img \${prefix}/initramfs-$MY_KRNL.img
|
||||
boot || goto failed
|
||||
END
|
||||
```
|
||||
|
||||
The above menu has five sections:
|
||||
|
||||
* **menu** defines the actual menu that will be shown on the screen.
|
||||
* **failed** notifies the user that something went wrong and drops the user to a shell so they can troubleshot the problem.
|
||||
* **shell** provides an interactive command prompt. You can reach it either by pressing the **Esc** key while at the boot menu or if the “boot” command returns with a failure code.
|
||||
* **lcl** contains a single command that tells iPXE to exit and return control back to the BIOS. Whatever you want to boot by default (e.g. the workstation’s local hard drive) **must** be listed as the next boot item right after iPXE in your workstation’s BIOS.
|
||||
* **f29** contains the same netboot code used earlier but with the final exit replaced with goto failed.
|
||||
|
||||
|
||||
|
||||
Copy the updated boot.cfg from your $HOME/esp/linux directory out to the ESPs of all your client systems. If all goes well, you should see results similar to the image below:
|
||||
|
||||
![][3]
|
||||
|
||||
### A server hosted boot menu
|
||||
|
||||
Another feature you can add to the netboot server is the ability to manage all the client boot menus from one central location. This feature can be especially useful when rolling out a new version of the OS. It lets you perform a sort of [atomic transaction][4] to switch all clients over to the new OS after you’ve copied the new kernel and initramfs out to the ESPs of all the clients.
|
||||
|
||||
Install Mojolicious:
|
||||
|
||||
```
|
||||
$ sudo -i
|
||||
# dnf install -y perl-Mojolicious
|
||||
```
|
||||
|
||||
Define the “bootmenu” app:
|
||||
|
||||
```
|
||||
# mkdir /opt/bootmenu
|
||||
# cat << END > /opt/bootmenu/bootmenu.pl
|
||||
#!/usr/bin/env perl
|
||||
use Mojolicious::Lite;
|
||||
use Mojolicious::Plugins;
|
||||
|
||||
plugin 'Config';
|
||||
|
||||
get '/menu';
|
||||
|
||||
app->start;
|
||||
END
|
||||
# chmod 755 /opt/bootmenu/bootmenu.pl
|
||||
```
|
||||
|
||||
Define the configuration file for the bootmenu app:
|
||||
|
||||
```
|
||||
# cat << END > /opt/bootmenu/bootmenu.conf
|
||||
{
|
||||
hypnotoad => {
|
||||
listen => ['http://*:80'],
|
||||
pid_file => '/run/bootmenu/bootmenu.pid',
|
||||
}
|
||||
}
|
||||
END
|
||||
```
|
||||
|
||||
This is an extremely simple Mojolicious application that listens on port 80 and only answers to /menu requests. If you want a quick introduction to what Mojolicious can do, run man Mojolicious::Guides::Growing to view the manual. Use the **Q** key to quit the manual.
|
||||
|
||||
Move boot.cfg over to our netboot app as a template named menu.html.ep:
|
||||
|
||||
```
|
||||
# mkdir /opt/bootmenu/templates
|
||||
# mv $HOME/esp/linux/boot.cfg /opt/bootmenu/templates/menu.html.ep
|
||||
```
|
||||
|
||||
Define a systemd service to manage the bootmenu app:
|
||||
|
||||
```
|
||||
# cat << END > /etc/systemd/system/bootmenu.service
|
||||
[Unit]
|
||||
Description=Serves iPXE Menus over HTTP
|
||||
After=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
DynamicUser=true
|
||||
RuntimeDirectory=bootmenu
|
||||
PIDFile=/run/bootmenu/bootmenu.pid
|
||||
ExecStart=/usr/bin/hypnotoad /opt/bootmenu/bootmenu.pl
|
||||
ExecReload=/usr/bin/hypnotoad /opt/bootmenu/bootmenu.pl
|
||||
AmbientCapabilities=CAP_NET_BIND_SERVICE
|
||||
KillMode=process
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
END
|
||||
```
|
||||
|
||||
Add an exception for the HTTP service to the local firewall and start the bootmenu service:
|
||||
|
||||
```
|
||||
# firewall-cmd --add-service http
|
||||
# firewall-cmd --runtime-to-permanent
|
||||
# systemctl enable bootmenu.service
|
||||
# systemctl start bootmenu.service
|
||||
```
|
||||
|
||||
Test it with wget:
|
||||
|
||||
```
|
||||
$ sudo dnf install -y wget
|
||||
$ MY_BOOTMENU_SERVER=server-01.example.edu
|
||||
$ wget -q -O - http://$MY_BOOTMENU_SERVER/menu
|
||||
```
|
||||
|
||||
The above command should output something similar to the following:
|
||||
|
||||
```
|
||||
#!ipxe
|
||||
|
||||
set timeout 5000
|
||||
|
||||
:menu
|
||||
menu iPXE Boot Menu
|
||||
item --key 1 lcl 1. Microsoft Windows 10
|
||||
item --key 2 f29 2. RedHat Fedora 29
|
||||
choose --timeout ${timeout} --default lcl selected || goto shell
|
||||
set timeout 0
|
||||
goto ${selected}
|
||||
|
||||
:failed
|
||||
echo boot failed, dropping to shell...
|
||||
goto shell
|
||||
|
||||
:shell
|
||||
echo type 'exit' to get the back to the menu
|
||||
set timeout 0
|
||||
shell
|
||||
goto menu
|
||||
|
||||
:lcl
|
||||
exit
|
||||
|
||||
:f29
|
||||
kernel --name kernel.efi ${prefix}/vmlinuz-4.19.4-300.fc29.x86_64 initrd=initrd.img ro ip=dhcp rd.peerdns=0 nameserver=192.0.2.91 nameserver=192.0.2.92 root=/dev/disk/by-path/ip-192.0.2.158:3260-iscsi-iqn.edu.example.server-01:fc29-lun-1 netroot=iscsi:192.0.2.158::::iqn.edu.example.server-01:fc29 console=tty0 console=ttyS0,115200n8 audit=0 selinux=0 quiet
|
||||
initrd --name initrd.img ${prefix}/initramfs-4.19.4-300.fc29.x86_64.img
|
||||
boot || goto failed
|
||||
```
|
||||
|
||||
Now that the boot menu server is working, rebuild the ipxe.efi bootloader with an init script that points to it.
|
||||
|
||||
First, update the init.ipxe script created in part one of this series:
|
||||
|
||||
```
|
||||
$ MY_BOOTMENU_SERVER=server-01.example.edu
|
||||
$ cat << END > $HOME/ipxe/init.ipxe
|
||||
#!ipxe
|
||||
|
||||
dhcp || exit
|
||||
set prefix file:///linux
|
||||
chain http://$MY_BOOTMENU_SERVER/menu || exit
|
||||
END
|
||||
```
|
||||
|
||||
Now, rebuild the boot loader:
|
||||
|
||||
```
|
||||
$ cd $HOME/ipxe/src
|
||||
$ make clean
|
||||
$ make bin-x86_64-efi/ipxe.efi EMBED=../init.ipxe
|
||||
```
|
||||
|
||||
Copy the updated bootloader to your ESP:
|
||||
|
||||
```
|
||||
$ cp $HOME/ipxe/src/bin-x86_64-efi/ipxe.efi $HOME/esp/efi/boot/bootx64.efi
|
||||
```
|
||||
|
||||
After you’ve copied the updated bootloader to all your clients, you can make future updates to the boot menu simply by editing /opt/bootmenu/templates/menu.html.ep and running:
|
||||
|
||||
```
|
||||
$ sudo systemctl restart bootmenu.service
|
||||
```
|
||||
|
||||
### Making further changes
|
||||
|
||||
If the boot menu server is working properly, you’ll longer need the the boot.cfg file on your client systems.
|
||||
|
||||
For example, re-add the Fedora 28 image to the boot menu:
|
||||
|
||||
```
|
||||
$ sudo -i
|
||||
# MY_FVER=28
|
||||
# MY_KRNL=$(ls -c /fc$MY_FVER/lib/modules | head -n 1)
|
||||
# MY_DNS1=192.0.2.91
|
||||
# MY_DNS2=192.0.2.92
|
||||
# MY_NAME=$(</etc/hostname)
|
||||
# MY_EMAN=$(echo $MY_NAME | tr '.' "\n" | tac | tr "\n" '.' | cut -b -${#MY_NAME})
|
||||
# MY_ADDR=$(host -t A $MY_NAME | awk '{print $4}')
|
||||
# cat << END >> /opt/bootmenu/templates/menu.html.ep
|
||||
|
||||
:f$MY_FVER
|
||||
kernel --name kernel.efi \${prefix}/vmlinuz-$MY_KRNL initrd=initrd.img ro ip=dhcp rd.peerdns=0 nameserver=$MY_DNS1 nameserver=$MY_DNS2 root=/dev/disk/by-path/ip-$MY_ADDR:3260-iscsi-iqn.$MY_EMAN:fc$MY_FVER-lun-1 netroot=iscsi:$MY_ADDR::::iqn.$MY_EMAN:fc$MY_FVER console=tty0 console=ttyS0,115200n8 audit=0 selinux=0 quiet
|
||||
initrd --name initrd.img \${prefix}/initramfs-$MY_KRNL.img
|
||||
boot || goto failed
|
||||
END
|
||||
# sed -i "/item --key 2/a item --key 3 f$MY_FVER 3. RedHat Fedora $MY_FVER" /opt/bootmenu/templates/menu.html.ep
|
||||
# systemctl restart bootmenu.service
|
||||
```
|
||||
|
||||
If all goes well, your clients should see results similar to the image below the next time they boot:
|
||||
|
||||
![][5]
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://fedoramagazine.org/how-to-build-a-netboot-server-part-3/
|
||||
|
||||
作者:[Gregory Bartholomew][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://fedoramagazine.org/author/glb/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://fedoramagazine.org/how-to-build-a-netboot-server-part-1/
|
||||
[2]: https://ipxe.org/
|
||||
[3]: https://fedoramagazine.org/wp-content/uploads/2018/11/netboot-menu-1024x641.png
|
||||
[4]: https://en.wikipedia.org/wiki/Atomicity_(database_systems)
|
||||
[5]: https://fedoramagazine.org/wp-content/uploads/2018/11/netboot-menu-updated-1024x641.png
|
||||
145
sources/tech/20181221 Large files with Git- LFS and git-annex.md
Normal file
145
sources/tech/20181221 Large files with Git- LFS and git-annex.md
Normal file
@@ -0,0 +1,145 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Large files with Git: LFS and git-annex)
|
||||
[#]: via: (https://anarc.at/blog/2018-12-21-large-files-with-git/)
|
||||
[#]: author: (Anarc.at https://anarc.at/)
|
||||
|
||||
Large files with Git: LFS and git-annex
|
||||
======
|
||||
|
||||
Git does not handle large files very well. While there is work underway to handle large repositories through the [commit graph work][2], Git's internal design has remained surprisingly constant throughout its history, which means that storing large files into Git comes with a significant and, ultimately, prohibitive performance cost. Thankfully, other projects are helping Git address this challenge. This article compares how Git LFS and git-annex address this problem and should help readers pick the right solution for their needs.
|
||||
|
||||
### The problem with large files
|
||||
|
||||
As readers probably know, Linus Torvalds wrote Git to manage the history of the kernel source code, which is a large collection of small files. Every file is a "blob" in Git's object store, addressed by its cryptographic hash. A new version of that file will store a new blob in Git's history, with no deduplication between the two versions. The pack file format can store binary deltas between similar objects, but if many objects of similar size change in a repository, that algorithm might fail to properly deduplicate. In practice, large binary files (say JPEG images) have an irritating tendency of changing completely when even the smallest change is made, which makes delta compression useless.
|
||||
|
||||
There have been different attempts at fixing this in the past. In 2006, Torvalds worked on [improving the pack-file format][3] to reduce object duplication between the index and the pack files. Those changes were eventually reverted because, as Nicolas Pitre [put it][4]: "that extra loose object format doesn't appear to be worth it anymore".
|
||||
|
||||
Then in 2009, [Caca Labs][5] worked on improving the `fast-import` and `pack-objects` Git commands to do special handling for big files, in an effort called [git-bigfiles][6]. Some of those changes eventually made it into Git: for example, since [1.7.6][7], Git will stream large files directly to a pack file instead of holding them all in memory. But files are still kept forever in the history.
|
||||
|
||||
An example of trouble I had to deal with is for the Debian security tracker, which follows all security issues in the entire Debian history in a single file. That file is around 360,000 lines for a whopping 18MB. The resulting repository takes 1.6GB of disk space and a local clone takes 21 minutes to perform, mostly taken up by Git resolving deltas. Commit, push, and pull are noticeably slower than a regular repository, taking anywhere from a few seconds to a minute depending one how old the local copy is. And running annotate on that large file can take up to ten minutes. So even though that is a simple text file, it's grown large enough to cause significant problems for Git, which is otherwise known for stellar performance.
|
||||
|
||||
Intuitively, the problem is that Git needs to copy files into its object store to track them. Third-party projects therefore typically solve the large-files problem by taking files out of Git. In 2009, Git evangelist Scott Chacon released [GitMedia][8], which is a Git filter that simply takes large files out of Git. Unfortunately, there hasn't been an official release since then and it's [unclear][9] if the project is still maintained. The next effort to come up was [git-fat][10], first released in 2012 and still maintained. But neither tool has seen massive adoption yet. If I would have to venture a guess, it might be because both require manual configuration. Both also require a custom server (rsync for git-fat; S3, SCP, Atmos, or WebDAV for GitMedia) which limits collaboration since users need access to another service.
|
||||
|
||||
### Git LFS
|
||||
|
||||
That was before GitHub [released][11] Git Large File Storage (LFS) in August 2015. Like all software taking files out of Git, LFS tracks file hashes instead of file contents. So instead of adding large files into Git directly, LFS adds a pointer file to the Git repository, which looks like this:
|
||||
|
||||
```
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:4d7a214614ab2935c943f9e0ff69d22eadbb8f32b1258daaa5e2ca24d17e2393
|
||||
size 12345
|
||||
```
|
||||
|
||||
LFS then uses Git's smudge and clean filters to show the real file on checkout. Git only stores that small text file and does so efficiently. The downside, of course, is that large files are not version controlled: only the latest version of a file is kept in the repository.
|
||||
|
||||
Git LFS can be used in any repository by installing the right hooks with `git lfs install` then asking LFS to track any given file with `git lfs track`. This will add the file to the `.gitattributes` file which will make Git run the proper LFS filters. It's also possible to add patterns to the `.gitattributes` file, of course. For example, this will make sure Git LFS will track MP3 and ZIP files:
|
||||
|
||||
```
|
||||
$ cat .gitattributes
|
||||
*.mp3 filter=lfs -text
|
||||
*.zip filter=lfs -text
|
||||
```
|
||||
|
||||
After this configuration, we use Git normally: `git add`, `git commit`, and so on will talk to Git LFS transparently.
|
||||
|
||||
The actual files tracked by LFS are copied to a path like `.git/lfs/objects/{OID-PATH}`, where `{OID-PATH}` is a sharded file path of the form `OID[0:2]/OID[2:4]/OID` and where `OID` is the content's hash (currently SHA-256) of the file. This brings the extra feature that multiple copies of the same file in the same repository are automatically deduplicated, although in practice this rarely occurs.
|
||||
|
||||
Git LFS will copy large files to that internal storage on `git add`. When a file is modified in the repository, Git notices, the new version is copied to the internal storage, and the pointer file is updated. The old version is left dangling until the repository is pruned.
|
||||
|
||||
This process only works for new files you are importing into Git, however. If a Git repository already has large files in its history, LFS can fortunately "fix" repositories by retroactively rewriting history with [git lfs migrate][12]. This has all the normal downsides of rewriting history, however --- existing clones will have to be reset to benefit from the cleanup.
|
||||
|
||||
LFS also supports [file locking][13], which allows users to claim a lock on a file, making it read-only everywhere except in the locking repository. This allows users to signal others that they are working on an LFS file. Those locks are purely advisory, however, as users can remove other user's locks by using the `--force` flag. LFS can also [prune][14] old or unreferenced files.
|
||||
|
||||
The main [limitation][15] of LFS is that it's bound to a single upstream: large files are usually stored in the same location as the central Git repository. If it is hosted on GitHub, this means a default quota of 1GB storage and bandwidth, but you can purchase additional "packs" to expand both of those quotas. GitHub also limits the size of individual files to 2GB. This [upset][16] some users surprised by the bandwidth fees, which were previously hidden in GitHub's cost structure.
|
||||
|
||||
While the actual server-side implementation used by GitHub is closed source, there is a [test server][17] provided as an example implementation. Other Git hosting platforms have also [implemented][18] support for the LFS [API][19], including GitLab, Gitea, and BitBucket; that level of adoption is something that git-fat and GitMedia never achieved. LFS does support hosting large files on a server other than the central one --- a project could run its own LFS server, for example --- but this will involve a different set of credentials, bringing back the difficult user onboarding that affected git-fat and GitMedia.
|
||||
|
||||
Another limitation is that LFS only supports pushing and pulling files over HTTP(S) --- no SSH transfers. LFS uses some [tricks][20] to bypass HTTP basic authentication, fortunately. This also might change in the future as there are proposals to add [SSH support][21], resumable uploads through the [tus.io protocol][22], and other [custom transfer protocols][23].
|
||||
|
||||
Finally, LFS can be slow. Every file added to LFS takes up double the space on the local filesystem as it is copied to the `.git/lfs/objects` storage. The smudge/clean interface is also slow: it works as a pipe, but buffers the file contents in memory each time, which can be prohibitive with files larger than available memory.
|
||||
|
||||
### git-annex
|
||||
|
||||
The other main player in large file support for Git is git-annex. We [covered the project][24] back in 2010, shortly after its first release, but it's certainly worth discussing what has changed in the eight years since Joey Hess launched the project.
|
||||
|
||||
Like Git LFS, git-annex takes large files out of Git's history. The way it handles this is by storing a symbolic link to the file in `.git/annex`. We should probably credit Hess for this innovation, since the Git LFS storage layout is obviously inspired by git-annex. The original design of git-annex introduced all sorts of problems however, especially on filesystems lacking symbolic-link support. So Hess has implemented different solutions to this problem. Originally, when git-annex detected such a "crippled" filesystem, it switched to [direct mode][25], which kept files directly in the work tree, while internally committing the symbolic links into the Git repository. This design turned out to be a little confusing to users, including myself; I have managed to shoot myself in the foot more than once using this system.
|
||||
|
||||
Since then, git-annex has adopted a different v7 mode that is also based on smudge/clean filters, which it called "[unlocked files][26]". Like Git LFS, unlocked files will double disk space usage by default. However it is possible to reduce disk space usage by using "thin mode" which uses hard links between the internal git-annex disk storage and the work tree. The downside is, of course, that changes are immediately performed on files, which means previous file versions are automatically discarded. This can lead to data loss if users are not careful.
|
||||
|
||||
Furthermore, git-annex in v7 mode suffers from some of the performance problems affecting Git LFS, because both use the smudge/clean filters. Hess actually has [ideas][27] on how the smudge/clean interface could be improved. He proposes changing Git so that it stops buffering entire files into memory, allows filters to access the work tree directly, and adds the hooks he found missing (for `stash`, `reset`, and `cherry-pick`). Git-annex already implements some tricks to work around those problems itself but it would be better for those to be implemented in Git natively.
|
||||
|
||||
Being more distributed by design, git-annex does not have the same "locking" semantics as LFS. Locking a file in git-annex means protecting it from changes, so files need to actually be in the "unlocked" state to be editable, which might be counter-intuitive to new users. In general, git-annex has some of those unusual quirks and interfaces that often come with more powerful software.
|
||||
|
||||
And git-annex is much more powerful: it not only addresses the "large-files problem" but goes much further. For example, it supports "partial checkouts" --- downloading only some of the large files. I find that especially useful to manage my video, music, and photo collections, as those are too large to fit on my mobile devices. Git-annex also has support for location tracking, where it knows how many copies of a file exist and where, which is useful for archival purposes. And while Git LFS is only starting to look at transfer protocols other than HTTP, git-annex already supports a [large number][28] through a [special remote protocol][29] that is fairly easy to implement.
|
||||
|
||||
"Large files" is therefore only scratching the surface of what git-annex can do: I have used it to build an [archival system for remote native communities in northern Québec][30], while others have built a [similar system in Brazil][31]. It's also used by the scientific community in projects like [GIN][32] and [DataLad][33], which manage terabytes of data. Another example is the [Japanese American Legacy Project][34] which manages "upwards of 100 terabytes of collections, transporting them from small cultural heritage sites on USB drives".
|
||||
|
||||
Unfortunately, git-annex is not well supported by hosting providers. GitLab [used to support it][35], but since it implemented Git LFS, it [dropped support for git-annex][36], saying it was a "burden to support". Fortunately, thanks to git-annex's flexibility, it may eventually be possible to treat [LFS servers as just another remote][37] which would make git-annex capable of storing files on those servers again.
|
||||
|
||||
### Conclusion
|
||||
|
||||
Git LFS and git-annex are both mature and well maintained programs that deal efficiently with large files in Git. LFS is easier to use and is well supported by major Git hosting providers, but it's less flexible than git-annex.
|
||||
|
||||
Git-annex, in comparison, allows you to store your content anywhere and espouses Git's distributed nature more faithfully. It also uses all sorts of tricks to save disk space and improve performance, so it should generally be faster than Git LFS. Learning git-annex, however, feels like learning Git: you always feel you are not quite there and you can always learn more. It's a double-edged sword and can feel empowering for some users and terrifyingly hard for others. Where you stand on the "power-user" scale, along with project-specific requirements will ultimately determine which solution is the right one for you.
|
||||
|
||||
Ironically, after thorough evaluation of large-file solutions for the Debian security tracker, I ended up proposing to rewrite history and [split the file by year][38] which improved all performance markers by at least an order of magnitude. As it turns out, keeping history is critical for the security team so any solution that moves large files outside of the Git repository is not acceptable to them. Therefore, before adding large files into Git, you might want to think about organizing your content correctly first. But if large files are unavoidable, the Git LFS and git-annex projects allow users to keep using most of their current workflow.
|
||||
|
||||
> This article [first appeared][39] in the [Linux Weekly News][40].
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://anarc.at/blog/2018-12-21-large-files-with-git/
|
||||
|
||||
作者:[Anarc.at][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://anarc.at/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://anarc.at/blog/
|
||||
[2]: https://github.com/git/git/blob/master/Documentation/technical/commit-graph.txt
|
||||
[3]: https://public-inbox.org/git/Pine.LNX.4.64.0607111010320.5623@g5.osdl.org/
|
||||
[4]: https://public-inbox.org/git/alpine.LFD.0.99.0705091422130.24220@xanadu.home/
|
||||
[5]: http://caca.zoy.org/
|
||||
[6]: http://caca.zoy.org/wiki/git-bigfiles
|
||||
[7]: https://public-inbox.org/git/7v8vsnz2nc.fsf@alter.siamese.dyndns.org/
|
||||
[8]: https://github.com/alebedev/git-media
|
||||
[9]: https://github.com/alebedev/git-media/issues/15
|
||||
[10]: https://github.com/jedbrown/git-fat
|
||||
[11]: https://blog.github.com/2015-04-08-announcing-git-large-file-storage-lfs/
|
||||
[12]: https://github.com/git-lfs/git-lfs/blob/master/docs/man/git-lfs-migrate.1.ronn
|
||||
[13]: https://github.com/git-lfs/git-lfs/wiki/File-Locking
|
||||
[14]: https://github.com/git-lfs/git-lfs/blob/master/docs/man/git-lfs-prune.1.ronn
|
||||
[15]: https://github.com/git-lfs/git-lfs/wiki/Limitations
|
||||
[16]: https://medium.com/@megastep/github-s-large-file-storage-is-no-panacea-for-open-source-quite-the-opposite-12c0e16a9a91
|
||||
[17]: https://github.com/git-lfs/lfs-test-server
|
||||
[18]: https://github.com/git-lfs/git-lfs/wiki/Implementations%0A
|
||||
[19]: https://github.com/git-lfs/git-lfs/tree/master/docs/api
|
||||
[20]: https://github.com/git-lfs/git-lfs/blob/master/docs/api/authentication.md
|
||||
[21]: https://github.com/git-lfs/git-lfs/blob/master/docs/proposals/ssh_adapter.md
|
||||
[22]: https://tus.io/
|
||||
[23]: https://github.com/git-lfs/git-lfs/blob/master/docs/custom-transfers.md
|
||||
[24]: https://lwn.net/Articles/419241/
|
||||
[25]: http://git-annex.branchable.com/direct_mode/
|
||||
[26]: https://git-annex.branchable.com/tips/unlocked_files/
|
||||
[27]: http://git-annex.branchable.com/todo/git_smudge_clean_interface_suboptiomal/
|
||||
[28]: http://git-annex.branchable.com/special_remotes/
|
||||
[29]: http://git-annex.branchable.com/special_remotes/external/
|
||||
[30]: http://isuma-media-players.readthedocs.org/en/latest/index.html
|
||||
[31]: https://github.com/RedeMocambos/baobaxia
|
||||
[32]: https://web.gin.g-node.org/
|
||||
[33]: https://www.datalad.org/
|
||||
[34]: http://www.densho.org/
|
||||
[35]: https://docs.gitlab.com/ee/workflow/git_annex.html
|
||||
[36]: https://gitlab.com/gitlab-org/gitlab-ee/issues/1648
|
||||
[37]: https://git-annex.branchable.com/todo/LFS_API_support/
|
||||
[38]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=908678#52
|
||||
[39]: https://lwn.net/Articles/774125/
|
||||
[40]: http://lwn.net/
|
||||
@@ -0,0 +1,60 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Listen to the radio at the Linux terminal)
|
||||
[#]: via: (https://opensource.com/article/18/12/linux-toy-mplayer)
|
||||
[#]: author: (Jason Baker https://opensource.com/users/jason-baker)
|
||||
|
||||
Listen to the radio at the Linux terminal
|
||||
======
|
||||
MPlayer is an extremely versatile open source media player that can be surprisingly useful at the Linux command line.
|
||||

|
||||
|
||||
You've found your way to our 24-day-long Linux command-line toys advent calendar. If this is your first visit to the series, you might be asking yourself what a command-line toy even is. It could be a game or any simple diversion that helps you have fun at the terminal.
|
||||
|
||||
Some of you will have seen various selections from our calendar before, but we hope there’s at least one new thing for everyone.
|
||||
|
||||
There are many ways to listen to music at the command line; if you've got media stored locally, **cmus** is a great option, but there are [plenty of others][1] as well.
|
||||
|
||||
Lots of times when I'm at the terminal, though, I'd really rather just zone out and not pay close attention to picking each song, and let someone else do the work. While I've got plenty of playlists that work for just such a purpose, after a while, even though go stale, and I'll switch over to an internet radio station.
|
||||
|
||||
Today's toy, MPlayer, is a versatile multimedia player that will support just about any media format you throw at it. If MPlayer is not already installed, you can probably find it packaged for your distribution. On Fedora, I found it in [RPM Fusion][2] (be aware that this is not an "official" repository for Fedora, so exercise caution):
|
||||
|
||||
```
|
||||
$ sudo dnf install mplayer
|
||||
```
|
||||
|
||||
MPlayer has a slew of command-line options to set depending on your situation. I wanted to listen to the local college radio station here in Raleigh ([88.1 WKNC,][3] they're pretty good!), and so after grabbing the streaming URL from their website, all that took to get my radio up and running, no GUI or web player needed, was:
|
||||
|
||||
```
|
||||
$ mplayer -nocache -afm ffmpeg http://wknc.sma.ncsu.edu:8000/wknchd1.mp3
|
||||
```
|
||||
|
||||
MPlayer is open source under the GPLv3, and you can find out more about the project and download source code from the project's [website][4].
|
||||
|
||||
As I mentioned in yesterday's article, I'm trying to use a screenshot of each toy as the lead image for each article, but as we moved into the world of audio, I had to fudge it a little. So today's image was created from a public domain icon of a radio tower using **img2txt** , which is provided by the **libcaca** package.
|
||||
|
||||
Do you have a favorite command-line toy that you we should have included? Our calendar is basically set for the remainder of the series, but we'd still love to feature some cool command-line toys in the new year. Let me know in the comments below, and I'll check it out. And let me know what you thought of today's amusement.
|
||||
|
||||
Be sure to check out yesterday's toy, [Let you Linux terminal speak its mind][5], and come back tomorrow for another!
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/18/12/linux-toy-mplayer
|
||||
|
||||
作者:[Jason Baker][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/jason-baker
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/life/16/8/3-command-line-music-players-linux
|
||||
[2]: https://rpmfusion.org/
|
||||
[3]: https://wknc.org/index.php
|
||||
[4]: http://www.mplayerhq.hu/
|
||||
[5]: https://opensource.com/article/18/12/linux-toy-espeak
|
||||
75
sources/tech/20181222 A Tale of HTTP-2.md
Normal file
75
sources/tech/20181222 A Tale of HTTP-2.md
Normal file
@@ -0,0 +1,75 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (A Tale of HTTP/2)
|
||||
[#]: via: (https://veronneau.org/a-tale-of-http2.html)
|
||||
[#]: author: (Louis-Philippe Véronneau https://veronneau.org/)
|
||||
|
||||
A Tale of HTTP/2
|
||||
======
|
||||
|
||||
Around a month ago, someone mentioned the existence of [HTTP/2][1] in an IRC channel I lurk in. For some reason, I had never heard of it and some of the features of this new protocol (like mutiplexing requests without having to open multiple TCP connections) seemed cool.
|
||||
|
||||
To be honest, I had just finished re-writing the Puppet code that manages our backup procedures and enabling HTTP/2 seemed like a productive way to procrastinate before moving on to an another large project. How hard could this be?
|
||||
|
||||
Turns out it took me around 25 hours of work... Sit back and put on comfortable slippers, for this is a tale of HTTP/2!
|
||||
|
||||
[![The Yule Log][2]][3]
|
||||
|
||||
### Cursed Be the HTTP/1.1
|
||||
|
||||
When I first looked up how to enable HTTP/2 on Apache it seemed a pretty simple task. The documentation mentioned loading the `http2` module and making sure to prioritise the new protocol via a configuration file like this one:
|
||||
|
||||
```
|
||||
Protocols h2 h2c http/1.1
|
||||
|
||||
H2Push on
|
||||
H2PushPriority core.md Dict.md lctt2014.md lctt2016.md lctt2018.md LICENSE published README.md scripts sources translated after
|
||||
H2PushPriority text/css before
|
||||
H2PushPriority image/jpeg after 32
|
||||
H2PushPriority image/png after 32
|
||||
H2PushPriority application/javascript interleaved
|
||||
```
|
||||
|
||||
This would of course have been too easy. Even if everything in Apache was set up properly, websites kept being served as HTTP/1.1. I was obviously doing something right though, since my websites were now sending a new HTTP header: `Upgrade: h2, h2c`.
|
||||
|
||||
After wasting a good deal of time debugging TLS ciphers (HTTP/2 is [incompatible with TLS 1.1][4]), I finally found out the problem was that we weren't using the right multi-processing module for Apache.
|
||||
|
||||
Turns out Apache won't let you serve HTTP/2 while using `mpm_prefork` (the default MPM), as it is not supported by `mod_http2`. Even though there are two other MPM you can use with Apache, only `mpm_prefork` supports `mod_php`. Suddenly, adding support for HTTP/2 meant switching all our webapps built in PHP to PHP-FPM...
|
||||
|
||||
### Down the Rabbit Hole
|
||||
|
||||
![A clip from Alice in Wonderlands][5]
|
||||
|
||||
For the longest time, a close friend has been trying to convince me of the virtues of [PHP-FPM][6]. As great as it looked on paper, I never really did anything about it. It seemed so ... complicated. Regular ol' `mod_php` did the trick just fine and other things required my attention.
|
||||
|
||||
This whole HTTP/2 thing turned out to be the perfect excuse for me to dive into it after all. Once I understood how FPM pools worked, it was actually pretty easy to set up. Since I had to rewrite the Puppet profiles we're using to deploy websites, also I took that opportunity to harden a bunch of things left and right.
|
||||
|
||||
PHP-FPM let's you run websites under different Unix users for added separation. On top of that, I decided it was time for PHP code on our servers to be ran in read-only mode and had to tweak a bunch of things for our Wordpress, Nextcloud, KanBoard and Drupal instances to stop complaining about it.
|
||||
|
||||
After too much time passed automating tasks in Puppet, I finally was able to turn off `mod_php` and `mpm_prefork` everywhere and to enable `mpm_event` and `mod_http2`. The speed bonus offered by PHP-FPM and HTTP/2 is nice, but more than anything I'm happy this whole ordeal forced me to harden the way our Apache servers deal with PHP.
|
||||
|
||||
![Victory!][7]
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://veronneau.org/a-tale-of-http2.html
|
||||
|
||||
作者:[Louis-Philippe Véronneau][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://veronneau.org/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://en.wikipedia.org/wiki/HTTP/2
|
||||
[2]: https://veronneau.org/media/blog/2018-12-22/yule_log.jpg (The Yule Log)
|
||||
[3]: https://commons.wikimedia.org/wiki/File:The_Yule_Log.jpg
|
||||
[4]: https://http2.github.io/http2-spec/#TLSUsage
|
||||
[5]: https://veronneau.org/media/blog/2018-12-22/mod_php.gif (A clip from Alice in Wonderlands)
|
||||
[6]: https://wiki.apache.org/httpd/PHP-FPM
|
||||
[7]: https://veronneau.org/media/blog/2018-12-22/victory.png (Victory!)
|
||||
@@ -0,0 +1,144 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (How to detect automatically generated emails)
|
||||
[#]: via: (https://arp242.net/weblog/autoreply.html)
|
||||
[#]: author: (Martin Tournoij https://arp242.net/)
|
||||
|
||||
How to detect automatically generated emails
|
||||
======
|
||||
|
||||
### How to detect automatically generated emails
|
||||
|
||||
|
||||
When you send out an auto-reply from an email system you want to take care to not send replies to automatically generated emails. At best, you will get a useless delivery failure. At words, you will get an infinite email loop and a world of chaos.
|
||||
|
||||
Turns out that reliably detecting automatically generated emails is not always easy. Here are my observations based on writing a detector for this and scanning about 100,000 emails with it (extensive personal archive and company archive).
|
||||
|
||||
### Auto-submitted header
|
||||
|
||||
Defined in [RFC 3834][1].
|
||||
|
||||
This is the ‘official’ standard way to indicate your message is an auto-reply. You should **not** send a reply if `Auto-Submitted` is present and has a value other than `no`.
|
||||
|
||||
### X-Auto-Response-Suppress header
|
||||
|
||||
Defined [by Microsoft][2]
|
||||
|
||||
This header is used by Microsoft Exchange, Outlook, and perhaps some other products. Many newsletters and such also set this. You should **not** send a reply if `X-Auto-Response-Suppress` contains `DR` (“Suppress delivery reports”), `AutoReply` (“Suppress auto-reply messages other than OOF notifications”), or `All`.
|
||||
|
||||
### List-Id and List-Unsubscribe headers
|
||||
|
||||
Defined in [RFC 2919][3]
|
||||
|
||||
You usually don’t want to send auto-replies to mailing lists or news letters. Pretty much all mail lists and most newsletters set at least one of these headers. You should **not** send a reply if either of these headers is present. The value is unimportant.
|
||||
|
||||
### Feedback-ID header
|
||||
|
||||
Defined [by Google][4].
|
||||
|
||||
Gmail uses this header to identify mail newsletters, and uses it to generate statistics/reports for owners of those newsletters. You should **not** send a reply if this headers is present; the value is unimportant.
|
||||
|
||||
### Non-standard ways
|
||||
|
||||
The above methods are well-defined and clear (even though some are non-standard). Unfortunately some email systems do not use any of them :-( Here are some additional measures.
|
||||
|
||||
#### Precedence header
|
||||
|
||||
Not really defined anywhere, mentioned in [RFC 2076][5] where its use is discouraged (but this header is commonly encountered).
|
||||
|
||||
Note that checking for the existence of this field is not recommended, as some ails use `normal` and some other (obscure) values (this is not very common though).
|
||||
|
||||
My recommendation is to **not** send a reply if the value case-insensitively matches `bulk`, `auto_reply`, or `list`.
|
||||
|
||||
#### Other obscure headers
|
||||
|
||||
A collection of other (somewhat obscure) headers I’ve encountered. I would recommend **not** sending an auto-reply if one of these is set. Most mails also set one of the above headers, but some don’t (but it’s not very common).
|
||||
|
||||
* `X-MSFBL`; can’t really find a definition (Microsoft header?), but I only have auto-generated mails with this header.
|
||||
|
||||
* `X-Loop`; not really defined anywhere, and somewhat rare, but sometimes it’s set. It’s most often set to the address that should not get emails, but `X-Loop: yes` is also encountered.
|
||||
|
||||
* `X-Autoreply`; fairly rare, and always seems to have a value of `yes`.
|
||||
|
||||
|
||||
|
||||
|
||||
#### Email address
|
||||
|
||||
Check if the `From` or `Reply-To` headers contains `noreply`, `no-reply`, or `no_reply` (regex: `^no.?reply@`).
|
||||
|
||||
#### HTML only
|
||||
|
||||
If an email only has a HTML part, but no text part it’s a good indication this is an auto-generated mail or newsletter. Pretty much all mail clients also set a text part.
|
||||
|
||||
#### Delivery failures
|
||||
|
||||
Many delivery failure messages don’t really indicate that they’re failures. Some ways to check this:
|
||||
|
||||
* `From` contains `mailer-daemon` or `Mail Delivery Subsystem`
|
||||
|
||||
|
||||
|
||||
Many mail libraries leave some sort of footprint, and most regular mail clients override this with their own data. Checking for this seems to work fairly well.
|
||||
|
||||
* `X-Mailer: Microsoft CDO for Windows 2000` – Set by some MS software; I can only find it on autogenerated mails. Yes, it’s still used in 2015.
|
||||
|
||||
* `Message-ID` header contains `.JavaMail.` – I’ve found a few (5 on 50k) regular messages with this, but not many; the vast majority (thousends) of messages are news-letters, order confirmations, etc.
|
||||
|
||||
* `^X-Mailer` starts with `PHP`. This should catch both `X-Mailer: PHP/5.5.0` and `X-Mailer: PHPmailer blah blah`. The same as `JavaMail` applies.
|
||||
|
||||
* `X-Library` presence; only [Indy][6] seems to set this.
|
||||
|
||||
* `X-Mailer` starts with `wdcollect`. Set by some Plesk mails.
|
||||
|
||||
* `X-Mailer` starts with `MIME-tools`.
|
||||
|
||||
|
||||
|
||||
|
||||
### Final precaution: limit the number of replies
|
||||
|
||||
Even when following all of the above advice, you may still encounter an email program that will slip through. This can very dangerous, as email systems that simply `IF email THEN send_email` have the potential to cause infinite email loops.
|
||||
|
||||
For this reason, I recommend keeping track of which emails you’ve sent an autoreply to and rate limiting this to at most n emails in n minutes. This will break the back-and-forth chain.
|
||||
|
||||
We use one email per five minutes, but something less strict will probably also work well.
|
||||
|
||||
### What you need to set on your auto-response
|
||||
|
||||
The specifics for this will vary depending on what sort of mails you’re sending. This is what we use for auto-reply mails:
|
||||
|
||||
```
|
||||
Auto-Submitted: auto-replied
|
||||
X-Auto-Response-Suppress: All
|
||||
Precedence: auto_reply
|
||||
```
|
||||
|
||||
### Feedback
|
||||
|
||||
You can mail me at [martin@arp242.net][7] or [create a GitHub issue][8] for feedback, questions, etc.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://arp242.net/weblog/autoreply.html
|
||||
|
||||
作者:[Martin Tournoij][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://arp242.net/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: http://tools.ietf.org/html/rfc3834
|
||||
[2]: https://msdn.microsoft.com/en-us/library/ee219609(v=EXCHG.80).aspx
|
||||
[3]: https://tools.ietf.org/html/rfc2919)
|
||||
[4]: https://support.google.com/mail/answer/6254652?hl=en
|
||||
[5]: http://www.faqs.org/rfcs/rfc2076.html
|
||||
[6]: http://www.indyproject.org/index.en.aspx
|
||||
[7]: mailto:martin@arp242.net
|
||||
[8]: https://github.com/Carpetsmoker/arp242.net/issues/new
|
||||
@@ -0,0 +1,344 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Top 11 best Image Viewer for Ubuntu and other Linux)
|
||||
[#]: via: (https://itsfoss.com/image-viewers-linux/)
|
||||
[#]: author: (Ankush Das https://itsfoss.com/author/ankush/)
|
||||
|
||||
Top 11 best Image Viewer for Ubuntu and other Linux
|
||||
======
|
||||
|
||||
It is probably a good idea to stick with the default system image viewer unless you want a specific feature (that’s missing) or if you crave for better user experience.
|
||||
|
||||
However, if you like to experiment, you may try out different image viewers. You could end up loving the new user experience of viewing the images or get hooked on to the extra features offered.
|
||||
|
||||
In this article, we have mentioned every kind of image viewers ranging from the simplest to the most advanced tool available for Ubuntu or any other Linux distro.
|
||||
|
||||
### Best Image Viewers for Linux
|
||||
|
||||
![Best image viewers for Ubuntu and other Linux distributions][1]
|
||||
|
||||
**Note:** You should be able to find these image viewers listed in your software center or AppCenter. If you don’t find it there, we’ve mentioned the instructions for manual installation as well.
|
||||
|
||||
#### 1. Nomacs
|
||||
|
||||
![nomacs image viewer][2]
|
||||
|
||||
**What’s good about it?**
|
||||
|
||||
* Simple & Fast UI
|
||||
* Image adjustment tools (color & size)
|
||||
* Geolocation of the image
|
||||
* Metadata information panel
|
||||
* LAN Synchronization
|
||||
* Fullscreen mode
|
||||
|
||||
|
||||
|
||||
A free and open source image viewer that does not come baked with any fancy features. However, Nomacs does support most of the common image file formats if you want to use it.
|
||||
|
||||
The user interface is very simple but it does offer some essential features for image adjustment (color, brightness, resize, crop, & cut). In addition to that, it also supports fullscreen mode, histogram, and a lot of different panels that you can toggle for metadata, edit history, and more such information.
|
||||
|
||||
**How do I install it?**
|
||||
|
||||
You can find it listed in the software center/AppCenter for easy installation. If you want to install it via terminal, you can take a look at their [GitHub page][3] or type in the command below:
|
||||
|
||||
```
|
||||
sudo apt install nomacs
|
||||
```
|
||||
|
||||
#### 2. Eye Of Gnome
|
||||
![eye of gnome][4]
|
||||
|
||||
**What’s good about it?**
|
||||
|
||||
* A dead simple image viewer
|
||||
* Slideshow style (if that’s what you like)
|
||||
* An image viewer tailored for GNOME desktop environment
|
||||
|
||||
|
||||
|
||||
This is a classic image viewer developed as a part of The GNOME Project a lot of years ago. Do note that this isn’t actively maintained anymore. But, it still works on Ubuntu’s latest LTS release and several other Linux distros.
|
||||
|
||||
If you want a dead simple image viewer where you browse through the images in a slideshow-type UI and get the meta info in the sidebar, Eye of GNOME should be your choice. One of the best for GNOME desktop environment!
|
||||
|
||||
**How do I install it?**
|
||||
|
||||
To manually install it on Ubuntu (or Ubuntu-based Linux distros) type in the following command:
|
||||
|
||||
```
|
||||
sudo apt install eog
|
||||
```
|
||||
|
||||
For other distros and source, you should follow the [GitHub page.][5]
|
||||
|
||||
#### 3. Eye Of MATE Image Viewer
|
||||
|
||||
![eye of mate image viewer][6]
|
||||
|
||||
**What’s good about it?**
|
||||
|
||||
* A simple image viewer
|
||||
* Plugins supported
|
||||
* An image viewer tailored for MATE desktop environment
|
||||
|
||||
|
||||
|
||||
Yet another simple image viewer with the basic functionalities of slideshow view and rotating images.
|
||||
|
||||
Even if doesn’t support any image manipulation feature, it does support numerous image file formats and can handle big image files.
|
||||
|
||||
**How do I install it?**
|
||||
|
||||
For Ubuntu/Ubuntu-based distros, type in the following command:
|
||||
|
||||
```
|
||||
sudo apt install eom
|
||||
```
|
||||
|
||||
If you need help for other distros and the source, follow their [GitHub page][7].
|
||||
|
||||
#### 4. Geeqie
|
||||
![geeqie image viewer][8]
|
||||
|
||||
**What’s good about it?**
|
||||
|
||||
* A flexible image manager that supports plugins (you’ll find other image viewers supported as well)
|
||||
* Information about the color profile
|
||||
|
||||
|
||||
|
||||
Geeqie is an impressive image manager and viewer. It supports other image viewers as plugins but does not offer any image manipulation tools.
|
||||
|
||||
If you need to know the color profile, image info, and manage/view a collection of images. It should be a good choice for that.
|
||||
|
||||
**How do I install it?**
|
||||
|
||||
Type in the terminal:
|
||||
|
||||
```
|
||||
sudo apt install geeqie
|
||||
```
|
||||
|
||||
For the source, you can refer the [GitHub page][9].
|
||||
|
||||
#### 5. gThumb Image Viewer
|
||||
|
||||
![gthumb image viewer][10]
|
||||
|
||||
**What’s good about it?**
|
||||
|
||||
* An all-in-one image viewer with the ability to manage, edit and view the images
|
||||
* Reset EXIF orientation
|
||||
* Convert image formats
|
||||
* Find duplicate images
|
||||
|
||||
|
||||
|
||||
gThumb is an amazing image viewer with a lot of features. You get an impressive user interface to view/manage your images along with the basic image manipulation tools (crop, resize, color, and so on.)
|
||||
|
||||
You can also add comments to an image or reset the EXIF orientation info. It also gives you the ability to find duplicate images and convert image formats.
|
||||
|
||||
**How do I install it?**
|
||||
|
||||
You can enter this command in the terminal:
|
||||
|
||||
```
|
||||
sudo apt install gthumb
|
||||
```
|
||||
|
||||
If that doesn’t work, head to the [GitHub page][11] for more info.
|
||||
|
||||
#### 6. Gwenview
|
||||
![gwenview image viewer][12]
|
||||
|
||||
**What’s good about it?**
|
||||
|
||||
* A basic image viewer with common image manipulation tools to rotate and resize
|
||||
* Feature extension using KIPI plugins
|
||||
|
||||
|
||||
|
||||
Gwenview is just another basic image viewer tailored for KDE desktop environment. However, you can install it on other desktop environments as well.
|
||||
|
||||
If you utilize the Konqueror web browser, you can use it as an embedded image viewer. Here, you can add comments/description to the image as well. In addition, it supports [KIPI][13] plugins.
|
||||
|
||||
**How do I install it?**
|
||||
|
||||
Type the following in the terminal to install it:
|
||||
|
||||
```
|
||||
sudo apt install gwenview
|
||||
```
|
||||
|
||||
For the source, check out their [GitHub page][14].
|
||||
|
||||
#### 7. Mirage
|
||||
|
||||
![mirage image viewer][15]
|
||||
|
||||
**What’s good about it?**
|
||||
|
||||
* Customizable interface even it is a basic UI
|
||||
* Basic image manipulation tools
|
||||
* Command-line access
|
||||
|
||||
|
||||
|
||||
If you want a decent image viewer along with the ability to access it via command line, a fullscreen mode, slideshow mode, basic editing tools to resize/crop/rotate/flip, and a configurable interface – Mirage would be the simplest option.
|
||||
|
||||
It is a very fast and capable image viewer that supports a lot of image formats that include png, jpg, svg, xpm, gif, bmp, and tifff.
|
||||
|
||||
**How do I install it?**
|
||||
|
||||
You need to type in the following:
|
||||
|
||||
```
|
||||
sudo apt install mirage
|
||||
```
|
||||
|
||||
For the source code and other installation instructions, refer the [GitHub page][16].
|
||||
|
||||
#### 8. KPhotoAlbum
|
||||
![][17]
|
||||
|
||||
**What’s good about it?**
|
||||
|
||||
* Perfect image manager to tag and manage the pictures
|
||||
* Demo databases
|
||||
* Image compression
|
||||
* Merge/Remove images to/from Stack
|
||||
|
||||
|
||||
|
||||
KPhotoAlbum is not exactly a dedicated image viewer but a photo manager to tag and manage the pictures you’ve got.
|
||||
|
||||
You can opt for slideshows to view the image along with the ability to compress images and search them using the labels/tags.
|
||||
|
||||
**How do I install it?**
|
||||
|
||||
You can install it via the terminal by typing in:
|
||||
|
||||
```
|
||||
sudo apt kphotoalbum
|
||||
```
|
||||
|
||||
In either case, you can check for the [official instructions on their website][18] to get it installed on your Linux distro.
|
||||
|
||||
#### 9. Shotwell
|
||||
|
||||
![shotwell][19]
|
||||
|
||||
**What’s good about it?**
|
||||
|
||||
* Red-eye correction tool
|
||||
* Upload photos to Facebook, Flickr, etc.
|
||||
* Supports RAW file formats as well
|
||||
|
||||
|
||||
|
||||
Shotwell is a feature-rich photo manager. You can view and manage your photos. Although you do not get all the basic image manipulation tools baked in it – you can easily crop and enhance your photos in a single click (auto brightness/contrast adjustments).
|
||||
|
||||
**How do I install it?**
|
||||
|
||||
Go to the terminal and enter the following (Ubuntu/Ubuntu-based distros):
|
||||
|
||||
sudo apt install shotwell
|
||||
|
||||
For more information, check out their [GitHub page][20].
|
||||
|
||||
#### 10. Ristretto
|
||||
|
||||
![ristretto][21]
|
||||
|
||||
**What’s good about it?**
|
||||
|
||||
* A dead simple image viewer
|
||||
* Fullscreen mode & Slideshow
|
||||
|
||||
|
||||
|
||||
A very straightforward image viewer where you just get the ability to zoom, view in fullscreen mode and view the images as a slideshow.
|
||||
|
||||
It is tailored for Xfce desktop environment – but you can install it anywhere.
|
||||
|
||||
**How do I install it?**
|
||||
|
||||
Even though it’s built for Xfce desktop environment, you can install it on any Ubuntu/Ubuntu-based distro by typing the following command in the terminal:
|
||||
|
||||
```
|
||||
sudo apt install ristretto
|
||||
```
|
||||
#### 11. digiKam
|
||||
|
||||
![digikam image viewer][22]
|
||||
|
||||
**What’s good about it?**
|
||||
|
||||
* An all-in-one image viewer with advanced photo management features (editing/managing/viewing)
|
||||
* Batch Queue Manager
|
||||
* [Light Table][23]
|
||||
|
||||
|
||||
|
||||
digiKam is an advanced photo manager with some additional image manipulation tools. You get the ability to configure the database using SQLite or MySQL.
|
||||
|
||||
To enhance your experience of viewing images, it lets you choose the reduced version of images while you preview them. So, that becomes super fast even if you have a lot of images. You get several import/export options via Google, Facebook, Imgur, and so on. If you want a feature-rich image viewer, this is the one you should have installed.
|
||||
|
||||
**How do I install it?**
|
||||
|
||||
Type in the following command:
|
||||
|
||||
```
|
||||
sudo apt install digikam
|
||||
```
|
||||
|
||||
For more information, visit their [GitHub page][24].
|
||||
|
||||
### Wrapping Up
|
||||
|
||||
So, no matter whether you want a different user experience or a rich set of features and powerful tools to manage your photos – there’s something everyone.
|
||||
|
||||
Which image viewer do you prefer to use? Is it the system’s default viewer?
|
||||
|
||||
Let us know in the comments below.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/image-viewers-linux/
|
||||
|
||||
作者:[Ankush Das][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://itsfoss.com/author/ankush/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2018/12/best-image-viewers-linux.png?resize=800%2C450&ssl=1
|
||||
[2]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2018/12/nomacs-image-viewer.jpg?resize=800%2C455&ssl=1
|
||||
[3]: https://github.com/nomacs/nomacs
|
||||
[4]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2018/12/eye-of-gnome-image-viewer.jpg?resize=800%2C470&ssl=1
|
||||
[5]: https://github.com/GNOME/eog
|
||||
[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2018/12/eye-of-mate-image-viewer.jpg?resize=800%2C464&ssl=1
|
||||
[7]: https://github.com/mate-desktop/eom
|
||||
[8]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2018/12/geeqie-image-viewer.jpg?resize=800%2C444&ssl=1
|
||||
[9]: https://github.com/BestImageViewer/geeqie
|
||||
[10]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2018/12/gthumb-image-viewer.jpg?resize=800%2C515&ssl=1
|
||||
[11]: https://github.com/GNOME/gthumb
|
||||
[12]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2018/12/gwenview-image-viewer.jpg?resize=800%2C517&ssl=1
|
||||
[13]: https://en.wikipedia.org/wiki/KDE_Image_Plugin_Interface
|
||||
[14]: https://github.com/KDE/gwenview
|
||||
[15]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2018/12/mirage-image-viewer.jpg?resize=800%2C475&ssl=1
|
||||
[16]: https://github.com/xiongchiamiov/Mirage
|
||||
[17]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2018/12/kphotoalbum-viewer.jpg?fit=800%2C522&ssl=1
|
||||
[18]: https://www.kphotoalbum.org/download/
|
||||
[19]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2018/12/shotwell-image-viewer.jpg?resize=800%2C473&ssl=1
|
||||
[20]: https://github.com/GNOME/shotwell
|
||||
[21]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2018/12/ristretto-image-viewer.jpg?resize=800%2C437&ssl=1
|
||||
[22]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2018/12/digitkam-image-viewer.jpg?resize=800%2C550&ssl=1
|
||||
[23]: https://docs.kde.org/trunk5/en/extragear-graphics/digikam/using-lighttable.html
|
||||
[24]: https://github.com/KDE/digikam
|
||||
@@ -0,0 +1,80 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Watch YouTube videos at the Linux terminal)
|
||||
[#]: via: (https://opensource.com/article/18/12/linux-toy-youtube-dl)
|
||||
[#]: author: (Jason Baker https://opensource.com/users/jason-baker)
|
||||
|
||||
Watch YouTube videos at the Linux terminal
|
||||
======
|
||||
Thought video content was just for your GUI? Think again.
|
||||

|
||||
|
||||
We're almost to the end of our 24-day-long Linux command-line toys advent calendar. Hopefully, you've been following along, but if not, start back at [the beginning][1] and work your way through. You'll find plenty of games, diversions, and oddities for your Linux terminal.
|
||||
|
||||
And while you may have seen some toys from our calendar before, we hope there’s at least one new thing for everyone.
|
||||
|
||||
Today we're going to double-down on yesterday's toy, [MPlayer][2], and add in one more, [**youtube-dl**][3].
|
||||
|
||||
As its name would imply, **youtube-dl** is a command-line utility for downloading YouTube videos, but it can capture video from a number of other sites as well, and it's a really quite full-featured application with [thorough documentation][4] to make video acquisition easy. A note: please don't use **youtube-dl** in any context that would violate the copyright laws in your jurisdiction.
|
||||
|
||||
**youtube-dl** is licensed under a public domain dedication known as [the][5] [Unlicense][5] that's similar to Creative Common's [CC0][6]. There are some interesting [legal opinions][7] out there about where public domain dedication fits into the open source landscape, but it's generally considered compatible with existing open source licenses even by organizations who don't recommend its use.
|
||||
|
||||
In its simplest form, we're going to use **youtube-dl** to grab a video for playback in our terminal. First, [install][8] it using a method appropriate for your distribution. For me, in Fedora, it was packaged in my repositories, so installation was as simple as:
|
||||
|
||||
```
|
||||
$ sudo dnf install youtube-dl
|
||||
```
|
||||
|
||||
Then, let's grab a video. YouTube allows you to search by license, so today, we're going to take a look at a fireplace [video][9] from [Gemmy's Videos][10] available under a Creative Commons attribution license. For YouTube videos, you can download with the file ID alone, like this, and we'll specify an output file name as well. I intentionally picked a short video, since long videos can get quite large!
|
||||
|
||||
```
|
||||
$ youtube-dl pec8P5K4s8c -o fireplace.mp4
|
||||
```
|
||||
|
||||
If you didn't install [MPlayer][2] yesterday, go ahead and do that, and you may need to install **libcaca** for your system as well if you did not install it previously. If you just use MPlayer to launch the video from the command line as-is ( **$** **mplayer fireplace.webm** ), it will play, but in a window all of its own; not exactly what we were going for.
|
||||
|
||||
First, I set my **libcaca** settings to force it to use **ncurses** **** as the display driver, keeping the output in my terminal, with:
|
||||
|
||||
```
|
||||
$ export CACA_DRIVER=ncurses
|
||||
```
|
||||
|
||||
Then, I zoomed way out in my terminal (the more "pixels", the better), and played the file with the following (forcing the use of **libcaca** and silencing text output from MPlayer):
|
||||
|
||||
```
|
||||
$ mplayer -really-quiet -vo caca fireplace.mp4
|
||||
```
|
||||
|
||||
And, there you go!
|
||||

|
||||
|
||||
Do you have a favorite command-line toy that we should have included? It's a little late to submit a suggestion for this year, but we'd still love to feature some cool command-line toys in the new year. Let me know in the comments below, and I'll check it out. And let me know what you thought of today's amusement.
|
||||
|
||||
Be sure to check out yesterday's toy, [Listen to the radio at the Linux terminal][2], and come back tomorrow for another!
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/18/12/linux-toy-youtube-dl
|
||||
|
||||
作者:[Jason Baker][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/jason-baker
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/article/18/12/linux-toy-boxes
|
||||
[2]: https://opensource.com/article/18/12/linux-toy-mplayer
|
||||
[3]: https://rg3.github.io/youtube-dl/
|
||||
[4]: https://github.com/rg3/youtube-dl/blob/master/README.md#readme
|
||||
[5]: https://unlicense.org/
|
||||
[6]: https://creativecommons.org/share-your-work/public-domain/cc0/
|
||||
[7]: https://opensource.org/faq#public-domain
|
||||
[8]: https://github.com/rg3/youtube-dl/blob/master/README.md#installation
|
||||
[9]: https://www.youtube.com/watch?v=pec8P5K4s8c
|
||||
[10]: https://www.youtube.com/channel/UCwwaepmpWZVDd605MIRC20A
|
||||
Reference in New Issue
Block a user