Merge remote-tracking branch 'LCTT/master'

This commit is contained in:
Xingyu Wang 2020-04-16 20:01:32 +08:00
commit 53e3e8030a
19 changed files with 2089 additions and 743 deletions

View File

@ -0,0 +1,84 @@
[#]: collector: (lujun9972)
[#]: translator: (geekpi)
[#]: reviewer: (wxy)
[#]: publisher: (wxy)
[#]: url: (https://linux.cn/article-12114-1.html)
[#]: subject: (New Linux Distribution UbuntuDDE Brings The Beautiful Deepin Desktop to Ubuntu)
[#]: via: (https://itsfoss.com/ubuntudde/)
[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/)
新的 Linux 发行版 UbuntuDDE 将漂亮的深度桌面带到 Ubuntu
======
深度是一个漂亮桌面环境,拥有直观的 UI。UbuntuDDE 项目结合了 Ubuntu 的强大和深度之美。
[深度桌面环境][1]DDE是由[深度 Linux][2] 的开发人员创建的漂亮桌面环境。最初,深度 Linux 基于 [Ubuntu][3],但后来他们切换到了 [Debian][4]。
![Deepin Desktop Environment in Ubuntu][5]
深度 Linux 的一个主要问题是它的下载服务器速度较慢。常规系统需要花几个小时才能下载,因为他们的所有服务器都在中国,而这些服务器很不幸的是速度极慢。
如果你想使用深度桌面,那没有什么可以阻止你将其安装在常规 Ubuntu 系统上。[UbuntuDDE][6] 试图通过在 Ubuntu 之上为你提供开箱即用的深度桌面体验来使其更简单。这样可以节省你在 Ubuntu 上安装和配置深度桌面的时间和精力。
![Screenshot of UbuntuDDE][7]
### Ubuntu DDEUbuntu 的强大和深度桌面的漂亮
请注意UbuntuDDE 不是 Ubuntu 的官方变种。UbuntuDDE 的开发人员与 Ubuntu 团队无关。UbuntuDDE 目前一个混合发行版,其目标是在未来的发行版中被接纳为 Ubuntu 的官方变种。
UbuntuDDE 开发人员得到了 Ubuntu Snapcraft 团队的 Alan Pope、Ubuntu Budgie 团队和 [Ubuntu Cinnamon][8] 团队,以及其他开发者,如 Hualet Wang 和 Felix Yan 的帮助。
在与 FOSS 的对话中,其主要开发人员 Arun 强调说,该项目的重点是定期维护 Ubuntu 的 DDE 软件包,并帮助用户享受 DDE深度桌面环境的全部乐趣。
![Ubuntu Deepin Edition login screen][9]
Arun 还提到,这个 Ubuntu 和深度的混合项目首先是维护和打包来自上游(即深度仓库)的最新版本。然后,它最终与 Ubuntu 20.04 focal 结合,生成了一个镜像文件,每个人都可以安装,而不必麻烦地先安装常规的 Ubuntu然后再安装深度桌面。UbuntuDDE 不仅是 DDE 和 Ubuntu 的组合,而且还是 UbuntuDDE 团队的软件包选择和设计变更的融合。
![UbuntuDDE screenshot][10]
与 Deepin Linux 不同UbuntuDDE 不使用深度应用商店。它改用 Ubuntu 软件中心。如果你被[这个来自武汉的深度 Linux 的间谍软件谣言][11]吓到了,这应该是一个好消息。
### 下载 UbuntuDDE 20.04 Beta
UbuntuDDE 的目标是与 Ubuntu 20.04 一起发布第一个正式的稳定版本。像[其他 Ubuntu 变种][12]一样UbuntuDDE 20.04 beta 也可供你下载并尝试。
> 警告!
>
> 一句话警告。 UbuntuDDE 是正在开发的新手项目。请不要在你的主用系统上使用它。如果要尝试,请在虚拟机或备用系统中使用它。
- [下载 Ubuntu 20.04 DDE Beta][13]
![Installing UbuntuDDE][14]
由于本质上是 Ubuntu因此安装 UbuntuDDE 与安装 Ubuntu 相同。你可以参考这篇教程,其中展示了[如何在 VirtualBox 内安装 Ubuntu][15]。
我知道你可能会认为这“不过是另一个 Ubuntu” 或者“只是 Ubuntu 上的深度,任何人都可以做到的”。但是我也知道有一小部分用户喜欢像 UbuntuDDE 这样的项目,这对他们来说使事情变得容易。我的意思是有许多 Ubuntu 变种就是这样出现的。你怎么看?
--------------------------------------------------------------------------------
via: https://itsfoss.com/ubuntudde/
作者:[Abhishek Prakash][a]
选题:[lujun9972][b]
译者:[geekpi](https://github.com/geekpi)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/abhishek/
[b]: https://github.com/lujun9972
[1]: https://www.deepin.org/en/dde/
[2]: https://www.deepin.org/en/
[3]: https://ubuntu.com/
[4]: https://www.debian.org/
[5]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/ubuntu-deepin-edition-screenshot.jpg?ssl=1
[6]: https://ubuntudde.com/
[7]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/ubuntu-deepin-edition-screenshot-1.jpg?ssl=1
[8]: https://itsfoss.com/ubuntu-cinnamon/
[9]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/ubuntu-deepin-edition-screenshot-5.jpg?ssl=1
[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/ubuntu-deepin-edition-screenshot-2.jpg?ssl=1
[11]: https://www.deepin.org/en/2018/04/14/linux-deepin-is-not-spyware/
[12]: https://itsfoss.com/which-ubuntu-install/
[13]: https://ubuntudde.com/download/
[14]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/ubuntu-deepin-edition-screenshot-4.jpg?ssl=1
[15]: https://itsfoss.com/install-linux-in-virtualbox/

View File

@ -0,0 +1,126 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Fedora Origins Part 01)
[#]: via: (https://fedoramagazine.org/fedora-origins-part-01/)
[#]: author: (Sylvia Sánchez https://fedoramagazine.org/author/lailah/)
Fedora Origins Part 01
======
![][1]
_Editors comment:_ The format of this article is different from the usual article that Fedora Magazine has published: a Fedora origins story told from the point of view of a Fedora user. The author has chosen to tell a story, since to simply present the bare facts is akin to just reading the wiki page about it.
### Hello World!
Hello, I am… no, Im not going to give my real name. Lets say Im female, probably shorter and older than you. I used to go by the nick of Isadora, more on that later.
![Here you have one of the old RH boxes][2]
Now some context. Back in the late 90s, internet became popular and PCs started to be a thing. However, most people didnt have either because it was very expensive and often you could do better with the traditional methods. Yes, computers were very basic back then. I used to play with these pocket games that were fascinating at the time, but totally lame now. Monochrome screens with pixelated flat animations. Not going to dive there, just giving an idea how it was.
In the mid-90s a company named Red Hat emerged and slowly started to make a profit of its own by selling its own business-oriented distribution and software utilities. The name comes from one of its founders, Marc Ewing, who used to wear a red lacrosse in university so other students could spot him easily and ask him questions.
Of course, as it was a business-oriented distribution, and I was busy with multiple other things, I didnt pay much attention to it. It lacked the software I needed and since I wasnt a customer, I was nobody to ask for additions. However, it was Linux and as such Open Source. People started to package stuff for RHL and put it in repositories. I was invited to join the community project, Fedora.us. I promptly declined, misunderstanding the name. It was the second time I got invited that I asked what is with the “US” there (in the name)?` Another user explained it was us as in we not as in the United States. They explained a bit about how the community worked and I decided to give it a go.
Then my studies got in the way, and I had to shelve it.
![Login Screen in Fedora Core][3]
### Press Return
By the time I came back to Fedora.us it had changed its name to Fedora Project and was actively being worked on from within Red Hat. Now, I wasnt there so my direct knowledge of how this happened is a bit foggy. Some say that Fedora existed separately and Red Hat added/invited them, some say that Fedora was completely RHs idea, some say they existed independently and at some point met or joined. Choose the version you like, Ill put some links down there so you can know more details and decide for yourself. As far as Im concerned, they worked together.
Well, as usual someone dropped some CDs with ISOs for me. If I had an euro for every ISO Ive been offered, or had tossed at my desk, for me to try it, I would be rich. As a matter of fact, Im not rich but I do have a big rack full of old distros.
_Anyways_…
Now its the early 2000s and things have changed dramatically. Computers prices have dropped and internet speed is increasing, plus a set of new technologies make it cheaper and more reliable. Computers now can do so much more than just a decade ago, and theyre smaller too. Screens are bigger, with better colors and resolution. Laptops are starting to become popular though still expensive and less powerful than desktop PCs.
During this time, I tried both Fedora and Red Hat. Now, as has been said before, Red Hat focuses on businesses and companies. Their main concern is having exactly the software their customers need, with the features their customers need, delivered as rock solid stability and a reliable update & support cycle. A lot of customization, variety of options and many cool new features are not their main core. More software means more testing and development work and bigger chances of things failing. Yet the technology industry is constantly changing and innovating. Sticking too much to older versions or proven formulas can be fatal for a company.
So what to do? Well, they solved it with Fedora. Fedora Project would be the innovative, looking ahead test bed, and Red Hat Enterprise Linux was the more conservative, rock solid operating system for businesses. Yes, they changed the name from Red Hat Linux to Red Hat _Enterprise_ Linux. Sounds better, doesnt it?
Unsurprisingly, Fedora had a fame of being difficult, unstable and for “hackers only”. Whenever I said I was using Fedora, they would give me odd looks or say something like “I want something stable” or “Im not into _that_” (meaning they didnt fancy programming/hacking activities). Countless individuals suggested I might want to use one of the other, beginner-friendly distributions, without themselves even giving Fedora a try! Many would disregard Linux as a whole as an amateur thing, only valid for playing but not good for serious work and companies. To each their own, I suppose.
![Note the F and the bubble already there][4]
### Yes, but why?
Those early versions were called Fedora Core and had a very uncertain release pattern. The six months cycle came much later. Fedora Core got its name because there were two repositories, Core and Extras. Core had the essentials, so to speak, and was maintained by Red Hat. Extras was, well, everything else. Any software that most users would want or need was included there, and it was maintained by a wide range of contributors.
From the beginning, one of the most powerful reasons for me to use it was the community and its core values. The _Four Foundations_ of Fedora, _Freedom, Features, First & Friends_ were lived and breathed and not just a catchy line on a website or a leaflet. Fedora Project strove (and still does) to deliver the newest features first, caring for freedom (of choice and software) and keeping a good open community, making friends as we contribute to the project.
I also liked the fact that Fedora, as its purpose was testing for Red Hat, delivered a lot of new software and technologies; it was like opening the window to see the future today.
The downside was its unreliable upgrade cycle. You could get a new version in a few months or next year… nobody knew, there was no agreed schedule.
![Note how, despite being Fedora, RHs logo and signature is omnipresent][5]
### What was in the box
Fedora Core kept this name up to the sixth version. From the start, it was meant to be a distribution you could use right after installing it, so it came with Gnome 2, KDE 3, OpenOffice and some browser I forgot, possibly Firefox.
I remember it being the first to introduce SELinux and SystemD by default, and to replace LILO with GRUB. I also remember the hardware requirements were something at the time, although they now sound laughable: Pentium II 400MHz, 256MB RAM (yes, you read it right) and 2GB of space in disk. It even had an option for terminal only! This would require only 64MB RAM and Pentium II 200MHz. Amazing, isnt it?
It had codenames. Not publicly, but it had, and they were quite peculiar. Fedora Core 1 was code named «Yarrow» which is a medium size plant with yellow or white crown-like flowers. Core 2 was Tettnang which is a small town in Baden-Württemberg, Germany. Not sure about Core 3, I think it was Heidelberg, but maybe Im mixing with later releases. Core 4 was Stentz, if I recall correctly (no idea what it means), Core 5 was a colour, I think Bordeaux, and Core 6 was Zod that _I think_ it was a comic character but I could be wrong. If there was a method in their madness I have no idea. I thought the names amusing but didnt give a second thought to it as they didnt affect anything, not even the design of each release.
![Ah… good ol` genetic helix][6]
### So what now?
Well, of course, Fedora Project has evolved from where we have stopped. But thats for later articles or this one will be too long. For now, I leave you with an extract of an interview with Matthew Miller, current Project Leader and some links in case you want to know more.
_**Extracts to interview with Matthew Miller, Project Leader.**_
Matthew Miller tells about the beginnings in Eduard Lucenas podcast (transcription [here][7]): _“Fedora started about 15 years ago, really. It actually started as a thing called Fedora.us.” Back in those days, there was Red Hat Linux.” “Meanwhile, there was this thing called Fedora.us which was basically a project to make additional software available to users of Red Hat Linux. Find things that werent part of Red Hat Linux, and package them up, and make them available to everybody. That was started as a community project.”_
_“Red Hat_ (then) _merged with this [Fedora.us][8] project to form Fedora Project that produces an upstream operating system that Red Hat Enterprise Linux is derived from but then moves on a slower pace.”_
_“We were then two parts, Fedora Core, which was basically inherited from the old Red Hat Linux and only Red Hat employees could do anything with and then Fedora Extras, where community could come together to add things on top of that Fedora Core. It took a little while to get off the ground but it was fairly successful”_
“_Around the time of Fedora Core 6, those were actually merged together into one big Fedora where all of the packages were all part of the same thing. There was no more distinction of Core and Extras, and everything was all together and, more importantly, all the community was all together._
_They invited the community to take ownership of the whole thing and for Red Hat to become part of the community rather than separate. That was a huge success.”_
_**Links of interest**_
**Fedora, a visual history**
[https://www.phoronix.com/scan.php?page=article&item=678&num=1][9]
**Red Hat Videos Fedoras anniversary**
<https://youtu.be/DOFXBGh6DZ0>
**Red Hat Videos Default to open**
<https://youtu.be/vhYMRtqvMg8>
**Fedoras Mission &amp; Foundations**
<https://docs.fedoraproject.org/en-US/project/>
**A short history of Fedora**
<https://youtu.be/NlNlcLD2zRM>
--------------------------------------------------------------------------------
via: https://fedoramagazine.org/fedora-origins-part-01/
作者:[Sylvia Sánchez][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/lailah/
[b]: https://github.com/lujun9972
[1]: https://fedoramagazine.org/wp-content/uploads/2020/04/fedora-origins-816x352.png
[2]: https://fedoramagazine.org/wp-content/uploads/2020/03/IMG_0554-768x1024.jpeg
[3]: https://fedoramagazine.org/wp-content/uploads/2020/04/15112-1.png
[4]: https://fedoramagazine.org/wp-content/uploads/2020/04/Fedora_Core_5.png
[5]: https://fedoramagazine.org/wp-content/uploads/2020/04/Fedora_Core_3.png
[6]: https://fedoramagazine.org/wp-content/uploads/2020/04/Artwork_FC7Themes_Fc7ThemeProposalFlyingHigh_Fc7ThemeProposalFlyingHighRhgl_rhgb-core6-1.png
[7]: https://x3mboy.fedorapeople.org/podcast/transcripts/transcriptFedoraPodcastEpisode01.html
[8]: http://fedora.us/
[9]: https://www.phoronix.com/scan.php?page=article&item=678&num=1

View File

@ -0,0 +1,102 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (How to dispose of IT hardware without hurting the environment)
[#]: via: (https://www.networkworld.com/article/3537928/how-to-dispose-of-it-hardware-without-hurting-the-environment.html)
[#]: author: (Andy Patrizio https://www.networkworld.com/author/Andy-Patrizio/)
How to dispose of IT hardware without hurting the environment
======
Find certified recyclers and disposal firms in order to know that the retirement of your old electronics gear is handled safely.
[Angelo Tsirekas][1] [(CC BY 3.0)][2]
Many enterprises dont think much about where their obsolete IT gear winds up, but its possible to be green-minded, not bust the budget, and even benefit a little from proper disposal. Here is how.
### Go back to where you bought
The first option to consider is returning the equipment the vendor or reseller you bought it from, says Susan Middleton, research director, financing strategies at IDC. “Every year we ask customers, How do you handle end-of-lease? Overwhelmingly, they return to vendor or partner who are better equipped to handle recycling,” she says.
[[Get regularly scheduled insights by signing up for Network World newsletters.]][3]
Vendors often give a fair-market buyout for the devices that can go toward new products, Middleton says. “The big players like IBM and HPE do a great job because they can clean them up and resell them, and the facilities to do that are pretty big,” she says.
### Vet disposal firms
If thats not an option,  and you have to find a disposal company an IT Asset Disposition (ITAD) service on your own, the first thing to check is whether it is properly certified, says Mike Satter, CEO of IT asset disposal and [data-center][4]-decommissioning provider OceanTech. Proper certification starts with a [Responsible Recycling (R2) certification][5].
R2s are administered by [Sustainable Electronics Recycling International][6] (SERI), a non-profit organization dedicated to the responsible reuse, repair, and recycling of electronic products. It sets the R2 standard and audits ITAD providers that carry the standard to make sure they are in compliance with the standard. Being responsible means creating a paper trail that shows the electronic waste which contains heavy metals including arsenic, beryllium, cadmium, chromium, cobalt, indium, lead, mercury, nickel, and thallium, and are toxic in high enough doses is reused, recovered or recycled.
Some disposal firms dump old gear in general landfills or export them to other countries where regulations arent as strong.  
“Any ITAD service provider that does not carry an R2 certification cannot fully guarantee zero landfill or zero export of materials,” says Satter. “Many recyclers will say they are compliant, but without verified certifications youre taking a chance.”
[][7]
Mark Dobson, IT asset disposal security specialist with NextUse, a firm that removes and the resells second-hand IT assets, cites six disposal certifications that companies should look for: [R2][5],  [e-Stewards][8],  [NAID][9], [NAID AAA][10] (which has greater certification of regulatory compliance), [ISO 14001][11], and ISO 18001. “R2 would be the floor,” he says.
Briefly, heres what these certifications do.
* **e-Stewards** is a standard set by the Basel Action Network in Sweden, which recognizes electronics recyclers that adhere to the most stringent environmentally and socially responsible practices when recovering hazardous electronic materials. In particular it is focused on making sure it was not shipped off to poor countries, where underage workers were exposed to toxic materials in careless work conditions.
* **NAID and NAID** AAA certification are set by The National Association of Information Destruction, a standards body that sets rules for the proper disposal of information devices, like hard drives.
* **ISO 14001** is a management framework for organizations to “achieve the intended outcomes of its environmental management system, which provide value for the environment, the organization itself and interested parties.” Outcomes of the framework should enhance environmental performance, fulfill compliance obligations and achieve environmental objectives. ISO is the International Organization of Standards, a global standards body.
* **ISO 18001** is the international standard for health and safety management systems.
Dobson says ITAD companies that do it right are using one or more of the certification standards for data security and responsible recycling, and getting and maintaining those standard takes substantial initial and on-going investment in facilities, equipment, hardware, software, personnel, policies and procedures.
“When those vendors charge more for their services, it is to cover those expenses, not to be excessively profitable,” he says. “Companies that do it the cheap way are skipping many if not all of those investments.”
If an e-waste company says they will take retired equipment for free, consider that a red flag, says Satter. “Compliant e-waste companies have to hire vetted/credentialed employees, which must pass background checks to ensure compliance is delivered,” Satter says. “All of that costs money.”
But the additional cost of using a certified company is minor. “Were not talking hundreds of thousands of dollars,” says Dobson. “Even on the biggest job, its a few thousand dollars difference between the right way and the cheap way. For your average client, youre talking thousands of dollars between the best vendors possible and totally half-assing it with the cheapest vendor thats not operating in anyones best interest but their own.”
### Penalties
State environmental laws about illegal disposal are mainly enforced by state attorneys general. In addition, various federal agencies enforce violations of their agency's laws and regulations.
Satter thinks enforcement needs to be tougher. “It will take the federal government to create extreme enforcement measures to ensure our e-waste is handled properly. The CEO or owner of companies should be arrested if they violate illegal e-waste dumping laws or knowingly exports e-waste to developing countries,” he says.
In one case, two executives of a Seattle e-waste recycling company got [28 months in jail][12] for improper disposal of e-waste. In that case, it was e-Stewards that got wise to their illegal activities and turned them in to the Washington state AG.
But thats an exception, not the rule. Dobson says he sees very little enforcement. “The regulations are in place but spotily enforced, and penalties are not incentivizing. A lot of this is viewed as the cost of doing business. They build the fines for if they get caught into the cost of disposal,” he says.
Fines for illegal dumping of old IT assets, are determined by the size of the violation, the clean-up cost, and the guidelines in the state or federal law. AT&amp;T got one of the largest fines on record in 2014 for illegal disposal of e-waste, socked with a [$52 million fine][13]. Two years later, Apple got a spanking of $450,000 for its own [illegal dumping][14].
Middleton says first and foremost companies should ask for a paper trail to verify proper handling and disposal of assets from the moment they are picked up. “Ask about who certifies that your [disposal] partners are doing it correctly. When you dont get a good answer, you walk away,” she says.
But she says she thinks most firms are legit. “Anyone thats lasted in this business isnt shady. The majority that have been around a while are responsible,” says Middleton.
Join the Network World communities on [Facebook][15] and [LinkedIn][16] to comment on topics that are top of mind.
--------------------------------------------------------------------------------
via: https://www.networkworld.com/article/3537928/how-to-dispose-of-it-hardware-without-hurting-the-environment.html
作者:[Andy Patrizio][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.networkworld.com/author/Andy-Patrizio/
[b]: https://github.com/lujun9972
[1]: https://en.wikipedia.org/wiki/Kerbside_collection#/media/File:ACT_recycling_truck.jpg
[2]: https://creativecommons.org/licenses/by/3.0/legalcode
[3]: https://www.networkworld.com/newsletters/signup.html
[4]: https://www.networkworld.com/article/3223692/what-is-a-data-centerhow-its-changed-and-what-you-need-to-know.html
[5]: https://sustainableelectronics.org/r2-standard
[6]: https://sustainableelectronics.org/
[7]: https://www.networkworld.com/blog/itaas-and-the-corporate-storage-technology/?utm_source=IDG&utm_medium=promotions&utm_campaign=HPE22140&utm_content=sidebar (ITAAS and Corporate Storage Strategy)
[8]: http://e-stewards.org/
[9]: https://naidonline.org/
[10]: https://naidonline.org/certifications/why-become-certified/
[11]: https://www.iso.org/iso-14001-environmental-management.html
[12]: https://www.theverge.com/2019/12/4/20992240/e-waste-recycling-electronic-basel-convention-crime-total-reclaim-fraud
[13]: https://www.reuters.com/article/us-usa-at-t-california/att-to-pay-california-52-million-in-hazardous-waste-disposal-settlement-idUSKCN0J50AG20141121
[14]: https://www.mercurynews.com/2016/12/06/apple-to-pay-450000-after-allegations-of-hazardous-waste-violations/
[15]: https://www.facebook.com/NetworkWorld/
[16]: https://www.linkedin.com/company/network-world

View File

@ -0,0 +1,75 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (IBM extends z15 mainframe family, intensifies Linux security)
[#]: via: (https://www.networkworld.com/article/3537678/ibm-extends-z15-mainframe-family-intensifies-linux-security.html)
[#]: author: (Michael Cooney https://www.networkworld.com/author/Michael-Cooney/)
IBM extends z15 mainframe family, intensifies Linux security
======
IBM continued to reshape the mainframe with an eye toward further integrating it within hybrid clouds and further securing Linux-based workloads.
Kali Linux / nevarpp / Getty Images
IBM continued to reshape the [mainframe][1] with an eye toward further integrating it within hybrid clouds and securing [Linux][2]-based workloads.
On the hardware side, IBM rolled out two entry-level, 19” single-frame, air-cooled platforms, the  [z15 Model T02][3] and [LinuxONE III Model LT2][4]. The new machines are extensions of the IBM z15 family that [Big Blue rolled out in September][5] of last year. 
Both can fit in cloud [data-center][6] racks and can be outfitted with a second drawer, should customers need to grow capacity.  Both feature 65 cores using commercial processors running at 4.5GHz and can be configured to support all manner of workloads. 
[[Get regularly scheduled insights by signing up for Network World newsletters.]][7]
IBM said new machines support z/OS Container Extensions that enable access to an ecosystem of open-source and Linux-on-IBM Z applications that may be deployed within the native z/OS environment without requiring a separate Linux server, using Docker container skills and patterns. In addition customers can use the latest open-source tools, popular NoSQL databases, analytics frameworks and application servers, IBM said.
The LinuxONE Model LT2 can run a number of Linux systems including [Red Hat Enterprise Linux][8], SUSE and Ubuntu, alone or side by side with IBM z/VM environments on a single physical server. The IBM LinuxONE server can run Linux workloads independently on a single server.
Both systems support IBMs prepackaged Cloud Paks, which include a secured Kubernetes container and containerized IBM middleware designed to let customers quickly spin-up enterprise-ready containers, the company said. IBM has standard Cloud Paks for data, application, integration, automation and multicloud management and security. The idea is to help customers develop, deploy, and manage cloud-native applications for the z15 family, IBM stated.
Security and privacy features are key for the z15 and those have been extended with the introduction of IBM Secure Execution for Linux for the all z15 models.  In a [blog post][9] about the security extensions, IBM stated that at its core, a Secure Execution provides a KVM-based virtual machine that is fully isolated and protected from the hypervisor with encryption keys that only the IBM Z hardware and firmware have access to.
[][10]
“In practice, an encrypted Linux image is created using the host public key and a customer-specific key. Since the encryption keys are stored on the IBM Z hardware and firmware, the encrypted image can only be executed in a virtual machine on the host(s) it has been prepared for, and the image cant be decrypted or tampered with outside of the designated host(s). In addition, your unencrypted virtual machine memory cannot be accessed by the host operating system either,” IBM stated. “Applications are then run inside of that virtual machine, allowing the owner of the application to focus on just disk and network data encryption, both of which can be easily handled in userland.”
In an environment where [customers are running Kubernetes][11] across servers running on x86 and Linux on Z systems, you can deploy the Secure Execution containers specifically for the applications you want to have protected, like sensitive databases and blockchain services. In this model, Kubernetes still manages the orchestration of containers, both on x86 and IBM Z, but it has no access to the data inside the Secure Execution environment container, IBM stated. 
With Secure Execution IBM is trying to mitigate insider threats to enterprise data.
From 2016 to 2019, the average number of incidents involving employee or contractor negligence has increased from 10.5 to 14.5and the average number of credential theft incidents per company has tripled over the past three years, from 1.0 to 3.2, According to the [Ponemon Institutes 2020 Cost of an Insider Breach Report][12], IBM stated.  “IBM Secure Execution for Linux helps to mitigate these concerns by enabling clients to isolate large numbers of workloads with granularity and at scale, within a trusted execution environment.”
The z15 family already supports what IBM calls [Data Privacy Passports][13] that promise to let customers control privacy and security by defining how all data is accessed, stored and shared. The idea is to let customers  protect and provision data and revoke access to that data at any time, not only within the z15 environment but across an enterprise's hybrid [multicloud][14] environment, IBM stated. 
The new systems and software are expected to be available by mid-May.  z15 T02 pricing starts at $160,000 but each machine is built to order so prices vary.
Join the Network World communities on [Facebook][15] and [LinkedIn][16] to comment on topics that are top of mind.
--------------------------------------------------------------------------------
via: https://www.networkworld.com/article/3537678/ibm-extends-z15-mainframe-family-intensifies-linux-security.html
作者:[Michael Cooney][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.networkworld.com/author/Michael-Cooney/
[b]: https://github.com/lujun9972
[1]: https://www.networkworld.com/article/3446140/enterprises-find-a-new-use-for-mainframes-blockchain-and-containerized-apps.html
[2]: https://www.networkworld.com/article/3215226/what-is-linux-uses-featres-products-operating-systems.html
[3]: https://www-01.ibm.com/common/ssi/cgi-bin/ssialias?infotype=AN&subtype=CA&htmlfid=897/ENUS120-006&appname=USN
[4]: https://www-01.ibm.com/common/ssi/cgi-bin/ssialias?infotype=AN&subtype=CA&htmlfid=897/ENUS120-014&appname=USN
[5]: https://www.networkworld.com/article/3438542/ibm-z15-mainframe-amps-up-cloud-security-features.html
[6]: https://www.networkworld.com/article/3223692/what-is-a-data-centerhow-its-changed-and-what-you-need-to-know.html
[7]: https://www.networkworld.com/newsletters/signup.html
[8]: https://www.redhat.com/en/blog/enterprise-linux-all-architectures-bringing-red-hat-enterprise-linux-ibm-z15-and-linuxone-iii-single-frame-systems?sc_cid=701f2000000txokAAA&utm_source=bambu&utm_medium=social&utm_campaign=Partner
[9]: https://developer.ibm.com/blogs/inside-the-new-ibm-z15-t02-and-linuxone-iii-lt2/
[10]: https://www.networkworld.com/blog/itaas-and-the-corporate-storage-technology/?utm_source=IDG&utm_medium=promotions&utm_campaign=HPE22140&utm_content=sidebar (ITAAS and Corporate Storage Strategy)
[11]: https://www.networkworld.com/article/3536654/ibm-taps-new-leaders-for-hybrid-cloud-battles-ahead.html
[12]: https://www.ibm.com/downloads/cas/LQZ4RONE
[13]: https://developer.ibm.com/blogs/data-privacy-passports-for-developers/
[14]: https://www.networkworld.com/article/3429258/real-world-tools-for-multi-cloud-management.html
[15]: https://www.facebook.com/NetworkWorld/
[16]: https://www.linkedin.com/company/network-world

View File

@ -0,0 +1,96 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Network World 2020 State of the Network: SD-WAN, edge networking and security are hot)
[#]: via: (https://www.networkworld.com/article/3537559/state-of-the-network-sd-wan-edge-networking-and-security-issues-heat-things-up.html)
[#]: author: (Michael Cooney https://www.networkworld.com/author/Michael-Cooney/)
Network World 2020 State of the Network: SD-WAN, edge networking and security are hot
======
Network World survey finds 5G, IoT, server consolidation and WAN optimization top priorities.
[orna wachman / Pixabay][1] [(CC0)][2]
Networking trends including [SD-WAN][3], edge and [5G][4] technology dominate the plans of IT executives and management as they look to develop efficient, bulletproof enterprise communications strategies for the future.
Those trends and others such as network security, server consolidation and WAN optimization were cited as primary IT drivers of future investment, according to Network World's 2020 State of the Network report.
[[Get regularly scheduled insights by signing up for Network World newsletters.]][5]
The  survey tapped 268 IT executives and management personnel with primary networking responsibilities for their organization to find out what initiatives are motivating the move to a more digital business environment.
### SD-WAN and WAN optimization
The survey found that 58% of respondents said SD-WAN can improve bandwidth efficiency, and 55% said it will expand connectivity options. 48% said it will encourage [hybrid cloud][6] and 41% said it would encourage multi-cloud adoption. The Network World survey found that the increased use of containers and cloud-based applications that need access from the edge is also driving the use of SD-WAN technologies.
There are a few differences by company size: 63% of enterprises say SD-WAN will improve the bandwidth efficiency for its cloud resources compared to 55% of SMBs. Close to half (46%) of enterprises expect SD-WAN to encourage multi-cloud, while only 26% of SMBs agree, perhaps because multicloud is less prevalent in smaller organizations, the survey stated.
The State of the Network survey found that 44% of organizations are currently piloting or using SD-WAN, and another 28% have it on their radar. Organizations expect SD-WAN to improve management and monitoring (52%), increase resiliency (51%), improve network security (50%) and prioritize business-critical traffic (46%), the survey stated.
It will probably come as little surprise that the technologies around SD-WAN are hot. In separate recent survey reports, analyst firm IDC says that 95% of enterprises will be using [SD-WAN][7] technology within two years, and that 42% have already deployed it. IDC also says the SD-WAN infrastructure market will hit $4.5 billion by 2022, growing at a more than 40% yearly clip between now and then.
[][8]
“The growth of SD-WAN is a broad-based trend that is driven largely by the enterprise desire to optimize cloud connectivity for remote sites,” Rohit Mehra, vice president, network infrastructure at IDC [said recently][9]. Going forward, the addition of features such as cloud-based application insights and performance monitoring will be a key part of SD-WAN rollouts, Mehra said.
Cisco has talked about the growth of multicloud networking motivating many businesses to re-tool their networks in favor of SD-WAN technology, Cisco wrote recently. SD-WAN is critical for businesses adopting cloud services, acting as a connective fabric between the campus, branch, [IoT][10], [data center][11] and cloud.
While SD-WAN is popular, its predecessor, WAN optimiization, is still in heavy use. The IDG survey found that more than half of organizations (53%) are currently piloting or using WAN optimization, which was traditionally centered around a single centralized hub or data center where an organizations applications and data are hosted. With widely disparate user communities, many enterprises are now viewing new application-centric or regionally distributed architecture as a way to replace MPLS sprawl with purpose-built regional hubs, the survey stated.
### Edge is big
Often associated with SD-WAN, edge computing is also a high priority for customers in the Network World study, which found that more than one-third of organizations surveyed (36%) already have edge computing tools in production or are piloting initiatives, and another 25% are actively researching the technology.
Edge computing is driven by a number of factors. Gartner research says that by 2023, more than 50% of enterprise-generated data will be created and processed outside the [data center][11] or cloud, up from less than 10% in 2019.
Hand-in-hand with that change is a shift in what technologies are supported at the edge of the network, and that means information processing, content collection and delivery are placed closer to the sources, repositories and consumers of this information. Edge networking tries to keep the traffic and processing local to reduce latency, exploit the capabilities of the edge and enable greater autonomy at the edge, Gartner says.
The Network World survey stated that [edge-computing][12] adopters expect the technologies  to reduce network latency and operational expenses, allow real-time data processing and save bandwidth. It is also expected to preserve uptime and resilience by reducing the number of network failures, providing an [IoT][10] security framework and reducing the impact of data-center outages.
Despite all of the virtues of edge computing, security concerns are still on the minds of the vast majority of respondents (77%). More than half of those surveyed believe that  edge devices were not built with security in mind (55%), that the need for middleware creates an additional attack surface (51%) and that there are many other potential attack vectors due to the heterogeneous computing environment (51%).
The survey stated that 69% of respondents implementing edge computing said network security has already been or will be affected, and 55% said their network management will be affected. Additionally, 49% said their cloud will be affected, perhaps because edge computing has the ability to reduce the amount of data that needs to be processed in theh cloud.
### Security is a hot spot
The "State of the Network" survey found there are a variety of data-center security concerns. Topping the list are DDoS attacks, which are aimed at disrupting and disabling internet services, and web application attacks where attackers target vulnerable web servers and install malicious code.
Organizations are taking a variety of actions when it comes to mitigating these security risks, according to the study. For example the survey found that for 88% of respondents, [firewalls][10] are still the front-line defense. Access-control technologies are being used by about 81% of respondents and anti-malware is being used by 70% of enterprise customers with intrusion prevention being used by 66%.
With the increasing number and complexity of cyber threats, its not surprising that almost three-quarters of respondents (71%) are either piloting, currently using or upgrading network security-monitoring technology. Network security monitoring helps to identify slowdowns and problem areas as well as allows administrators to attack problems as they happen and help prevent future attacks, the survey stated.
### 5G is on the radar
51% of respondents say their organization is actively researching 5G, but just 11% are piloting or using it in any capacity. Uses interested organizations are considering include broadband mobile (51%), IoT connectivity (43%), [branch or remote site connectivity][13] (41%) and low-latency communications and fixed wireless access (40% each), the survey stated.
Join the Network World communities on [Facebook][14] and [LinkedIn][15] to comment on topics that are top of mind.
--------------------------------------------------------------------------------
via: https://www.networkworld.com/article/3537559/state-of-the-network-sd-wan-edge-networking-and-security-issues-heat-things-up.html
作者:[Michael Cooney][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.networkworld.com/author/Michael-Cooney/
[b]: https://github.com/lujun9972
[1]: https://pixabay.com/photos/young-man-student-studying-learning-4053324/
[2]: https://creativecommons.org/publicdomain/zero/1.0/
[3]: https://www.networkworld.com/article/3031279/sd-wan-what-it-is-and-why-you-ll-use-it-one-day.html
[4]: https://www.networkworld.com/article/3203489/what-is-5g-how-is-it-better-than-4g.html
[5]: https://www.networkworld.com/newsletters/signup.html
[6]: https://www.networkworld.com/article/3429258/real-world-tools-for-multi-cloud-management.html
[7]: https://www.networkworld.com/article/3489938/what-s-hot-at-the-edge-for-2020-everything.html
[8]: https://www.networkworld.com/blog/itaas-and-the-corporate-storage-technology/?utm_source=IDG&utm_medium=promotions&utm_campaign=HPE22140&utm_content=sidebar (ITAAS and Corporate Storage Strategy)
[9]: https://www.networkworld.com/article/3527194/multicloud-security-integration-drive-massive-sd-wan-adoption.html
[10]: https://www.networkworld.com/article/3207535/what-is-iot-the-internet-of-things-explained.html
[11]: https://www.networkworld.com/article/3223692/what-is-a-data-centerhow-its-changed-and-what-you-need-to-know.html
[12]: https://www.networkworld.com/article/3224893/what-is-edge-computing-and-how-it-s-changing-the-network.html
[13]: https://www.networkworld.com/article/3250664/sd-branch-what-it-is-and-why-youll-need-it.html
[14]: https://www.facebook.com/NetworkWorld/
[15]: https://www.linkedin.com/company/network-world

View File

@ -1,104 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: (wxy)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Relive Linux history with the ROX desktop)
[#]: via: (https://opensource.com/article/19/12/linux-rox-desktop)
[#]: author: (Seth Kenlon https://opensource.com/users/seth)
Relive Linux history with the ROX desktop
======
This article is part of a special series of 24 days of Linux desktops.
If you're looking for a fun trip back in time, the ROX desktop is well
worth a go.
![Person typing on a 1980's computer][1]
The [ROX][2] desktop is no longer being actively developed, but its legacy resounds today, and even when it was active, it was a unique take on what a Linux desktop could be. While other desktops felt roughly similar to old Unix or Windows interfaces, ROX belongs solidly in the BeOS, AmigaOS, and [RISC OS][3] desktop camps.
It focuses on drag-and-drop actions (which makes its accessibility non-optimal for some users), point-and-click actions, pop-up contextual menus, and a unique system of app directories for running local applications with no installation required.
### Installing ROX
Today, ROX is mostly abandoned and left in fragments that the user is left to sort out. Luckily, the puzzle is relatively easy to solve, but don't get confused when you find bits and pieces of the ROX desktop in your distribution's repository—but not _every_ bit of the ROX desktop. The popular parts of ROX—the file manager ([ROX-Filer][4]) and the terminal ([ROXTerm][5])—seem to have endured in most of the popular distribution repositories, and you can install (and use) them as standalone applications. However, to run the ROX desktop, you must also install ROX-Session and the libraries it depends on.
I installed ROX on Slackware 14.2, but it should work on any Linux or BSD system.
First, you must install [ROX-lib2][6] from its repository. True to its philosophy of minimal installs, all you have to do to install ROX-lib2 is download the tarball, [unarchive it][7], and move the **ROX-Lib** directory to **/usr/local/lib**.
Next, you have to install [ROX-Session][8]. This probably needs to be compiled from source code, as it's not likely to be in your software repository. The compile process requires build tools, which ship by default on Slackware but are often omitted in other distributions to save space on the initial download. The names of the packages you must install to build from source code vary depending on your distro, so refer to the documentation for specifics. For example, on Debian-based distributions, you can learn about build requirements in [Debian's wiki][9], and on Fedora-based distributions, refer to [Fedora's docs][10]. Once you have the build tools installed, execute the custom ROX-Session build script:
```
`$ ./AppRun`
```
This manages its own build and installation and prompts you for root permissions to add itself as an option on your login screen.
If you have not installed ROX-Filer from your software repository, do that before continuing.
Together, these components create a complete ROX desktop. To log into your new desktop, log out of your current desktop session. By default, your session manager (KDM, GDM, LightDM, or XDM, depending on your setup) will continue to log you into your previous desktop, so you must override that before logging in.
With SDDM:
![][11]
With GDM:
![][12]
### ROX desktop features
The ROX desktop is simple by default, with a single panel at the bottom of the screen and a shortcut icon to your home directory on the desktop. The panel contains shortcuts to common locations. That's all there is to the ROX desktop, at least as it's configured out of the box. If you want a clock or a calendar or a system tray, you need to find applications that provide them.
![Default ROX desktop][13]
There is no taskbar, as such, but when you minimize a window, it becomes a temporary icon on your desktop. You can click the icon to bring its window back to its former size and placement.
The panel can be modified some, as well. You can place different shortcuts into it and even create your own applets.
There's no application menu, either, nor are there shortcuts to applications in a contextual menu. Instead, you can navigate manually to **/usr/share/applications**, or you can add your application directory or directories to the ROX panel.
![ROX desktop][14]
The ROX desktop's workflow concentrates on being mouse-driven, reminiscent of Mac OS 7.5 and 8. With ROX-filer, you can manage permissions, file management, introspection, script launching, background setting, and nearly anything else you can think of, provided that you're patient enough for the point-and-click style of interaction. For power users, this seems slow, but ROX manages to make it relatively painless and very intuitive.
### App directories, AppRun, and AppImage
The ROX desktop has an elegant convention by which a directory containing a script named **AppRun** is executed as if it were an application. This means that in order to make a ROX app, all you have to do is compile code into a directory, place a script called **AppRun** at the root of that directory to execute the binary you've compiled, and then mark the directory executable. ROX-Filer displays a directory configured in the manner you set with a special icon and color. When you click on an app directory, ROX-Filer automatically runs the **AppRun** script inside. It looks and behaves exactly like an application that has been installed, but it's local to the user's home directory and requires no special permissions.
This is a convenience feature, but it's one of those small features that feels great when you use it because it's so easy to implement. It's by no means essential, and it's only a few steps ahead of building an application locally, hiding the directory somewhere out of the way, and drumming up a quick **.desktop** file to act as your launcher. However, the concept of an application directory has been [cited][15] as an inspiration for the [AppImage][16] packaging system.
### Why you should try ROX desktop
Getting ROX set up and usable is somewhat difficult, and it appears to truly be abandoned. However, its legacy lives on in many ways today, and it's a fascinating and fun bit of Linux history. It may not become your primary desktop, but if you're looking for a fun trip back in time, then ROX is well worth a go. Explore it, customize it, and see what clever ideas it contains. There may yet be hidden gems that the open source community can benefit from.
--------------------------------------------------------------------------------
via: https://opensource.com/article/19/12/linux-rox-desktop
作者:[Seth Kenlon][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/seth
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/1980s-computer-yearbook.png?itok=eGOYEKK- (Person typing on a 1980's computer)
[2]: http://rox.sourceforge.net/desktop/
[3]: https://www.riscosopen.org/content/
[4]: http://rox.sourceforge.net/desktop/ROX-Filer
[5]: http://roxterm.sourceforge.net/
[6]: http://rox.sourceforge.net/desktop/ROX-Lib
[7]: https://opensource.com/article/17/7/how-unzip-targz-file
[8]: http://rox.sourceforge.net/desktop/ROX-Session.html
[9]: https://wiki.debian.org/BuildingTutorial
[10]: https://docs.pagure.org/docs-fedora/installing-software-from-source.html
[11]: https://opensource.com/sites/default/files/advent-kdm_0.jpg
[12]: https://opensource.com/sites/default/files/advent-gdm_1.jpg
[13]: https://opensource.com/sites/default/files/uploads/advent-rox.jpg (Default ROX desktop)
[14]: https://opensource.com/sites/default/files/uploads/advent-rox-custom.jpg (ROX desktop)
[15]: https://github.com/AppImage/AppImageKit/wiki/AppDir
[16]: https://appimage.org/

View File

@ -1,373 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: (lxbwolf)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Build a private social network with a Raspberry Pi)
[#]: via: (https://opensource.com/article/20/3/raspberry-pi-open-source-social)
[#]: author: (Giuseppe Cassibba https://opensource.com/users/peppe8o)
Build a private social network with a Raspberry Pi
======
Step-by-step instructions on how to create your own social network with
low-cost hardware and simple setup.
![Team of people around the world][1]
Social networks have revolutionized people's lives in the last several years. People use social channels every day to stay connected with friends and family. But a common question remains regarding privacy and data security. Even if social networks have created complex privacy policies to protect users, maintaining your data in your own server is always the best option if you don't want to make them available to the public.
Again, a Raspberry Pi—Raspbian Lite version can be very versatile to help you put a number of useful home services (see also my [Raspberry Pi projects][2] article) in place. Some addictive features can be achieved by searching for open source software and testing it with this fantastic device. An interesting example to try is installing OpenSource Social Network in your Raspberry Pi.
### What Is OpenSource Social Network?
[OpenSource Social Network][3] (OSSN) is a rapid-development social networking software written in PHP, that essentially allows you to make a social networking website. OSSN can be used to build different types of social apps, such as:
* Private Intranets
* Public/Open Networks
* Community
OSSN supports features like:
* Photos
* Profile
* Friends
* Smileys
* Search
* Chat
OSSN runs on a LAMP server. It has very poor hardware requirements, but an amazing user interface, which is also mobile-friendly.
### What we need
This project is very simple and, because we're installing only remote web services, we only need a few cheap parts. I'm going to use a Raspberry Pi 3 model B+, but it should also work with Raspberry Pi 3 model A+ or newer boards.
Hardware:
* Raspberry Pi 3 model B+ with its power supply
* a micro SD card (better if it is a performing card, at least 16GB)
* a Desktop PC with an SFTP software (for example, the free [Filezilla][4]) to transfer installation packages into your RPI.
### Step-by-step procedure
We'll start by setting up a classic LAMP server. We'll then set up database users and install OpenSource Social Network.
#### 1\. Install Raspbian Buster Lite OS
For this step, you can simply follow my [Install Raspbian Buster Lite in your Raspberry Pi][5] article.
Make sure that your system is up to date. Connect via ssh terminal and type following commands:
```
sudo apt-get update
sudo apt-get upgrade
```
2\. Install LAMP server
LAMP (LinuxApacheMysqlPhp) servers usually come with the MySQL database. In our project, we'll use MariaDB instead, because it is lighter and works with Raspberry Pi. 
#### 3\. Install Apache server:
```
`sudo apt-get install apache2 -y`
```
You should now be able to check that Apache installation has gone correctly by browsing http://&lt;&lt;YouRpiIPAddress&gt;&gt;:
![][6]
#### 4\. Install PHP:
```
`sudo apt-get install php -y`
```
5\. Install MariaDB server and PHP connector:
```
`sudo apt-get install mariadb-server php-mysql -y`
```
6\. Install PhpMyAdmin:
PhpMyAdmin is not mandatory in OpenSource Social Network, but I suggest that you install it because it simplifies database management.
```
`sudo apt-get install phpmyadmin`
```
In the phpMyAdmin setup screen, take the following steps:
* Select apache (mandatory) with space and press OK.
* Select Yes to configure the database for phpMyAdmin with dbconfig-common.
* Enter your favorite phpMyAdmin password and press OK.
* Enter your phpMyAdmin password again to confirm and press OK
#### 7\. Grant phpMyAdmin user DB privileges to manage DBs:
We'll connect to MariaDB with root user (default password is empty) to grant permissions. Remember to use semicolons at the end of each command row as shown below:
```
sudo mysql -uroot -p
grant all privileges on *.* to 'phpmyadmin'@'localhost';
flush privileges;
quit
```
8\. Finally, restart Apache service:
```
`sudo systemctl restart apache2.service`
```
And check that phpMyAdmin is working by browsing http://&lt;&lt;YouRpiIPAddress&gt;&gt;/phpmyadmin/. 
![][7]
Default phpMyAdmin login credentials are:
* user: phpmyadmin
* password: the one you set up in the phpMyAdmin installation step
### Installing other open source social network-required packages and setting up PHP
We need to prepare our system for OpenSource Social Network's first setup wizard. Required packages are:
* PHP version any of 5.6, 7.0, 7.1
* MYSQL 5 OR &gt;
* APACHE
* MOD_REWRITE
* PHP Extensions cURL &amp; Mcrypt should be enabled
* PHP GD Extension
* PHP ZIP Extension
* PHP settings allow_url_fopen enabled
* PHP JSON Support
* PHP XML Support
* PHP OpenSSL
So we'll install them with following terminal commands:
```
`sudo apt-get install php7.3-curl php7.3-gd php7.3-zip php7.3-json php7.3-xml`
```
#### 1\. Enable MOD_REWRITE:
```
`sudo a2enmod rewrite`
```
2\. Edit default Apache config to use mod_rewrite:
```
`sudo nano /etc/apache2/sites-available/000-default.conf`
```
3\. Add the section so that your **000-default.conf** file appears like the following (excluding comments):
```
&lt;VirtualHost *:80&gt;
    ServerAdmin webmaster@localhost
    DocumentRoot /var/www/html
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
    # SECTION TO ADD --------------------------------
        &lt;Directory /var/www/html&gt;
            Options Indexes FollowSymLinks MultiViews
            AllowOverride All
            Require all granted
        &lt;/Directory&gt;
    # END SECTION TO ADD --------------------------------
&lt;/VirtualHost&gt;
```
4\. Install Mcrypt:
```
sudo apt install php-dev libmcrypt-dev php-pear
sudo pecl channel-update pecl.php.net
sudo pecl install mcrypt-1.0.2
```
5\. Enable Mcrypt module by adding (or uncommenting) “extension=mcrypt.so" in "/etc/php/7.3/apache2/php.ini":
```
`sudo nano /etc/php/7.3/apache2/php.ini`
```
**allow_url_fopen** should be already enabled in "/etc/php/7.3/apache2/php.ini". OpenSSL should be already installed in php7.3.
#### 6\. Another setting that I suggest is editing the PHP max upload file size up to 16 MB:
```
`sudo nano /etc/php/7.3/apache2/php.ini`
```
7\. Look for the row with the **upload_max_filesize** parameter and set it as the following:
```
`upload_max_filesize = 16M`
```
8\. Save and exit. Restart Apache:
```
`sudo systemctl restart apache2.service`
```
### Install OSSN
#### 1\. Create DB and set up user:
Go back to phpmyadmin web page (browse "http://&lt;&lt;YourRpiIPAddress&gt;&gt;/phpmyadmin/") and login:
User: phpmyadmin
Password: the one set up in phpmyadmin installation step
Click on database tab:
![][8]
Create a database and take note of the database name, as you will be required to enter it later in the installation process.
![][9]
It's time to create a database user for OSSN. In this example, I'll use the following credentials:
User: ossn_db_user
Password: ossn_db_password
So, terminal commands will be (root password is still empty, if not changed by you before):
```
sudo mysql -uroot -p
CREATE USER 'ossn_db_user'@'localhost' IDENTIFIED BY 'ossn_db_password';
GRANT ALL PRIVILEGES ON ossn_db.* TO 'ossn_db_user'@'localhost';
flush privileges;
quit
```
2\. Install OSSN software:
Download the OSSN installation zip file from the [OSSN download page][10] on your local PC. At the time of this writing, this file is named "ossn-v5.2-1577836800.zip."
Using your favorite SFTP software, transfer the entire zip file via SFTP to a new folder in the path "/home/pi/download" on your Raspberry Pi. Common (default) SFP connection parameters are:
* Host: your Raspberry Pi IP address
* User: pi
* Password: raspberry (if you didn't change the pi default password)
* Port: 22
Back to terminal:
```
cd /home/pi/download/ #Enter directory where OSSN installation files have been transferred
unzip ossn-v5.2-1577836800.zip #Extracts all files from zip
cd /var/www/html/ #Enter Apache web directory
sudo rm index.html #Removes Apache default page - we'll use OSSN one
sudo cp -R /home/pi/download/ossn-v5.2-1577836800/* ./ #Copy installation files to web directory
sudo chown -R www-data:www-data ./
```
Create a data folder:OSSN requires a folder to store data. OSSN suggests, for security reasons, to create this folder outside of the published document root. So, we'll create this opt-in folder and give grants:
```
sudo mkdir /opt/ossn_data
sudo chown -R www-data:www-data /opt/ossn_data/
```
Browse http://&lt;&lt;YourRpiIPAddress&gt;&gt; to start the installation wizard:
![][11]
All checks should be fine. Click the Next button at the end of the page.
![][12]
Read the license validation and click the Next button at the end of the page to accept.
![][13]
Enter the database user, password, and the DB name you chose. Remember also to enter the OSSN data folder. Press Install.
![][14]
Enter your admin account information and press the Create button.
![][15]
Everything should be fine now. Press Finish to access the administration dashboard.
![][16]
So, administration panel can be reached with URL "http://&lt;&lt;YourRpiIPAddress&gt;&gt;/administrator" while user link will be "http://&lt;&lt;YourRpiIPAddress&gt;&gt;".
![][17]
_This article was originally published at [peppe8o.com][18]. Reposted with permission._
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/3/raspberry-pi-open-source-social
作者:[Giuseppe Cassibba][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/peppe8o
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/team_global_people_gis_location.png?itok=Rl2IKo12 (Team of people around the world)
[2]: https://peppe8o.com/2019/04/best-raspberry-pi-projects-with-open-source-software/
[3]: https://www.opensource-socialnetwork.org/
[4]: https://filezilla-project.org/
[5]: https://peppe8o.com/2019/07/install-raspbian-buster-lite-in-your-raspberry-pi/
[6]: https://opensource.com/sites/default/files/uploads/ossn_1_0.jpg
[7]: https://opensource.com/sites/default/files/uploads/ossn_2.jpg
[8]: https://opensource.com/sites/default/files/uploads/ossn_3.jpg
[9]: https://opensource.com/sites/default/files/uploads/ossn_4.jpg
[10]: https://www.opensource-socialnetwork.org/download
[11]: https://opensource.com/sites/default/files/uploads/ossn_5.jpg
[12]: https://opensource.com/sites/default/files/uploads/ossn_6.jpg
[13]: https://opensource.com/sites/default/files/uploads/ossn_7.jpg
[14]: https://opensource.com/sites/default/files/uploads/ossn_8.jpg
[15]: https://opensource.com/sites/default/files/uploads/ossn_9.jpg
[16]: https://opensource.com/sites/default/files/uploads/ossn_10.jpg
[17]: https://opensource.com/sites/default/files/uploads/ossn_11.jpg
[18]: https://peppe8o.com/private-social-network-with-raspberry-pi-and-opensource-social-network/

View File

@ -1,89 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: (qfzy1233 )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (How to Create Templates in LibreOffice to Save Time and Increase Productivity)
[#]: via: (https://itsfoss.com/create-templates-libreoffice/)
[#]: author: (Dimitrios Savvopoulos https://itsfoss.com/author/dimitrios/)
How to Create Templates in LibreOffice to Save Time and Increase Productivity
======
Creating a template in [LibreOffice][1] can save you some time for the documents that you use often. It can be a letter, a financial spreadsheet or even a presentation.
Time is one factor that a template can save and on the other hand it provides consistency where a group of people in an organization work together at the same project.
For example, if you are a small organization that has to often issue certificates of experience, instead of copy-pasting from a saved document somewhere, you can create a template. When you need to issue a new certificate of experience, you create a new one from the template, edit it slightly and you are good to go.
LibreOffice comes with a few templates by default but you are not restricted to use just them. You are free to create your own as per your requirements.
I think templates are one of the [essential LibreOffice tips][2] that every user should know. Let me show you how to do it.
### How to create a template in LibreOffice
First, create the document that you want to reuse with minimal editing. It could be a document, spreadsheet or presentation. I am using a word document in the example but the steps are the same for all of them.
Now go to file and select Save as Template. You will be prompted to give a name and a category from the menu, the press save.
![Creating a new template in LibreOffice][3]
This file will be saved in the LibreOffice template folder in .ots format. You can use these .ots files on other systems that have LibreOffice installed and use the same templates on those systems as well.
### How to use templates in LibreOffice
To use a template, select File and then Templates.
Dont worry! Opening a template LibreOffice creates a copy without affecting the original template. You can edit the document without worrying about your template getting changed.
![Using templates][4]
Once you choose your template, click open. You can edit it as you like.
### How to change a template in LibreOffice
Needs may change from time to time and adjustments to your templates can be necessary.
To edit an existing template go to File -&gt; Templates and then right click on the desired template and click edit.
![edit Template][5]
When you finish editing the template, click on save to make the changes permanent.
**Recommended Read:**
![][6]
#### [7 LibreOffice Tips To Get More Out of It][2]
LibreOffice is an excellent office suite. These LibreOffice tips will enable you to use it more effectively.
All in all templates are great not only at reducing the workload on repetitive tasks but also for user mistake proofing. You can take advantage of your computers ability to handle a repetitive task but with flexibility. It increases your efficiency.
Bonus Tip!
You can find tons of additional templates on the [LibreOffice website][7]. You can search for the ones you need, download them and use them. Be advised that these are from third-party, unverified users. So use them at your risk.
Ill keep on sharing more such tips in future. Meanwhile, you may also learn about creating templates to [add the “create new document” option in the right click menu context in GNOME][8].
--------------------------------------------------------------------------------
via: https://itsfoss.com/create-templates-libreoffice/
作者:[Dimitrios Savvopoulos][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/dimitrios/
[b]: https://github.com/lujun9972
[1]: https://www.libreoffice.org/
[2]: https://itsfoss.com/libreoffice-tips/
[3]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/1.Template-save-as.png?resize=800%2C567&ssl=1
[4]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/2.Use-a-template.png?ssl=1
[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/3.edit-template.png?ssl=1
[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2017/12/LibreOffice-logo.jpeg?fit=800%2C450&ssl=1
[7]: https://extensions.libreoffice.org/templates
[8]: https://itsfoss.com/add-new-document-option/

View File

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

View File

@ -1,92 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: (geekpi)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (How to Add Multiple Time Zones in Ubuntu)
[#]: via: (https://itsfoss.com/add-multiple-time-zones-ubuntu/)
[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/)
How to Add Multiple Time Zones in Ubuntu
======
_**This quick tutorial shows the steps for adding additional clocks for multiple time zones in Ubuntu and other distributions using GNOME desktop environment.**_
If you have family members or colleagues in another country or if you live in a country with multiple time zones, keeping a track of the time difference becomes important. After all, you dont want to disturb someone by calling at 4o clock in the morning.
Some Linux users also keep a tab on the [UTC time][1] because an overwhelming majority of servers use UTC.
Situations like these can be managed better if you have multiple clocks. You can set one clock to your local time and sync other clock(s) to other time zone(s). It makes keep an eye on the different times easier.
In this quick tutorial, Ill show you how to add additional clocks in Ubuntu and other Linux distributions that use GNOME desktop environment.
### Adding multiple time zone clocks in Ubuntu (and other Linux using GNOME)
Please [check which desktop environment you are using][2]. This tutorial is suitable for GNOME desktop only.
To add additional clocks, you can use a nifty little app unsurprisingly called [GNOME Clocks][3].
GNOME Clocks is a simple application that shows the time and date in multiple locations. You can also use it to set alarms or timers. Stopwatch feature is also included.
GNOME Clocks is available in the universe repository in Ubuntu. So please make sure to [enable universe repository][4] first.
You can search for GNOME Clocks in Software Center and install it from there.
![Gnome Clocks Ubuntu Software Center][5]
Alternatively, you can open a terminal and use the following command to install GNOME Clocks:
```
sudo apt install gnome-clocks
```
If you are using some other Linux distribution, please use your distributions software center or package manager to install this application.
Once you have installed it, search for it by pressing the super key (Windows key) and typing clocks:
![Gnome Clocks App Search Ubuntu][6]
Start the application and you should see an interface that provides you a few options like adding world clock, setting alarms, use stopwatch and timer.
Click on the + sign in the top left corner it will give you an option to search for a geographical location. Search it, select it and add it.
![Adding additional clocks][7]
Once you have added the required time zone(s) via its geographical location, you can see that this new clock is now added in the message try. It also shows the time difference between your local time and other time zones.
![Multiple clocks for multiple time zones][8]
You can use Super + M keys to quickly open the message tray. There are some more [useful Ubuntu shortcuts][9] you may master and save your time.
If you want to remove the additional clocks, you can do that from the GNOME Clocks application interface:
![Remove Additional Clocks][10]
You cannot delete your current time zone and set it to something else. There are other ways [to change your current time zone in Linux][11].
I hope you liked this quick tip. Questions and suggestions are always welcome.
--------------------------------------------------------------------------------
via: https://itsfoss.com/add-multiple-time-zones-ubuntu/
作者:[Abhishek Prakash][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/abhishek/
[b]: https://github.com/lujun9972
[1]: https://en.wikipedia.org/wiki/Coordinated_Universal_Time
[2]: https://itsfoss.com/find-desktop-environment/
[3]: https://wiki.gnome.org/Apps/Clocks
[4]: https://itsfoss.com/ubuntu-repositories/
[5]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/gnome-clocks-ubuntu-software-center.jpg?ssl=1
[6]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/gnome-clocks-app-search-ubuntu.jpg?ssl=1
[7]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/add-multiple-time-zones-gnome.jpg?ssl=1
[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/multiple-clocks-ubuntu.jpg?ssl=1
[9]: https://itsfoss.com/ubuntu-shortcuts/
[10]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/remove-additional-clocks-ubuntu.jpg?ssl=1
[11]: https://itsfoss.com/change-timezone-ubuntu/

View File

@ -0,0 +1,96 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (6 open source teaching tools for virtual classrooms)
[#]: via: (https://opensource.com/article/20/4/open-source-remote-teaching-tools)
[#]: author: (Mathias Hoffmann https://opensource.com/users/mhopensource)
6 open source teaching tools for virtual classrooms
======
Create podcasts, online lectures, tutorials, and other teaching
resources for learning at home with open source tools.
![Person reading a book and digital copy][1]
As schools and universities are shutting down around the globe due to COVID-19, many of us in academia are wondering how we can get up to speed and establish a stable workflow to get our podcasts, online lectures, and tutorials out there for our students.
Open source software (OSS) has a key role to play in this situation for many reasons, including:
* **Speed:** OSS can roll out quickly and in large numbers (e.g., to an army of teaching assistants for multiple tutorial sessions in big lectures) without licensing issues and in a decentralized manner.
* **Cost:** OSS does not cost anything upfront, which is important for financially stretched schools and universities that need solutions to complex challenges on very short notice.
With everything going online, we need new ways to engage with students. Here is a list of tools that I have found useful to share my own lectures. 
### Create podcasts, videos, or live streams with OBS
[Open Broadcast Studio (OBS)][2] is a professional, open source audio and video recording tool that allows you to record, stream instantly, and do much more. OBS is available for all major platforms (Windows, macOS, and Linux), so interoperability with your colleagues and their various devices is ensured.
Even if you're already using online conferencing software as a recording system, OBS can be a great backup solution. Since it records locally, you're protected against any network lags or disconnections. You also have complete control over your data, so many educational institutions may find it to be a more secure solution than some other options.
Compatibility is also an advantage: OBS stores recordings in a standard intermediate format (MKV), which can be transferred to MP4 or other formats. Also, support for Nvidia graphics cards under OBS is great, as the company is one of the main sponsors of the OBS project. This allows you to make full use of your hardware and speed up the recording process.
### Video and sound editing
After you record your podcast or video, you may find that it needs editing. There are many reasons you may need to edit your audio or video. For example, many university online platforms restrict the size of files you can upload, so you may have to cut long videos. Or, the sound may be too quiet, or maybe it was too noisy when you recorded it, so you need to make adjustments to the audio.
Two of the open source apps to explore are [OpenShot][3] and [Shotcut][4]. Of the two, Shotcut is a more advanced program, which implies a slightly steeper learning curve. Both are cross-platform and have full support for hardware encoding with NVidia and other graphics cards, which will substantially lower processing time compared to CPU-only processing.
You can also extract a soundtrack in either program (although I have found it to be much faster with Shotcut) and export it to an audio-editing program. I find [Audacity][5], another open source, cross-platform (Mac, Linux, Windows) tool, to work extremely well.
My typical workflow looks something like this:
* Import the recording into Shotcut
* Extract the audio, save it to an audio file
* Import it into Audacity, normalize and amplify the audio, maybe do some noise reduction
* Save the audio to a new file
* Import the new audio file into Shotcut, align it with the audio-free video, and cut appropriately
* Export into an MP4 video (this last step usually takes some time, so have a coffee…)
### Electronic blackboards
If you want to annotate your slides or develop ideas on an electronic blackboard, you need note-taking software and a device with a touchscreen or a graphics tablet. A great open source tool (developed with Swiss taxpayer funding) for blackboarding is [OpenBoard][6]. It is cross-platform; although it is officially only available for Linux on Ubuntu 16.04, you can install a [Flatpak][7] and it will work on any Linux flavor. It is really a nice tool; its only shortcoming is that annotating slides is not very good.
My main open source annotation and electric blackboard tool is [Xournal++][8], which is available in some Linux distros repos (e.g., Linux Mint) and otherwise via [Flathub][9]. Like all the tools mentioned earlier, it is also available on Mac and Windows. If you know of any open source, cross-platform note-taking tools, please share them in the comments.
### Built-in solutions have their limits
You might wonder why you should bother with alternative recording software in the first place. After all, most modern operating systems have built-in screen recorders that will also capture audio. However, these built-in solutions have their limits. One key limitation is that you cannot usually capture more than one video source at a time (e.g., a webcam with your talking head and a set of slides plus a whiteboard from a graphics tablet).
The ability to use multiple video sources is very useful, though, since it can be dull for students to just listen to your voice and see your slides for extended periods. Face-to-face interactions—even if done virtually—help keep listeners' attention and make it easier for them to cope with imperfect recording quality and background noise. In addition, many of the built-in tools do not allow you to capture selected areas of the screen, and in general, you cannot change the resolution or the number of frames per second, which can be important for keeping your podcast's memory and bandwidth usage in check.
### Conclusion
When planning your online teaching, you will want to use a blend of audio, video, slides, and electronic blackboards to create an immersive experience even while students are learning remotely. Open source software offers advanced, effective tools for creating such online educational experiences.
* * *
_This article is based on "[Open source software for online teaching in the times of corona][10]" on Mathias Hoffman's blog and is reused with permission._
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/4/open-source-remote-teaching-tools
作者:[Mathias Hoffmann][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/mhopensource
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/read_book_guide_tutorial_teacher_student_apaper.png?itok=_GOufk6N (Person reading a book and digital copy)
[2]: https://obsproject.com/
[3]: http://www.openshot.org/
[4]: http://www.shotcut.org/
[5]: https://www.audacityteam.org/
[6]: http://www.openboard.ch/
[7]: http://www.flathub.org
[8]: https://github.com/xournalpp/xournalpp
[9]: https://flathub.org/apps/details/com.github.xournalpp.xournalpp
[10]: http://mathiashoffmann.net/2020/03/22/open-source-software-for-online-teaching-in-the-times-of-corona

View File

@ -0,0 +1,424 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (How to automate your cryptocurrency trades with Python)
[#]: via: (https://opensource.com/article/20/4/python-crypto-trading-bot)
[#]: author: (Stephan Avenwedde https://opensource.com/users/hansic99)
How to automate your cryptocurrency trades with Python
======
In this tutorial, learn how to set up and use Pythonic, a graphical
programming tool that makes it easy for users to create Python
applications using ready-made function modules.
![scientific calculator][1]
Unlike traditional stock exchanges like the New York Stock Exchange that have fixed trading hours, cryptocurrencies are traded 24/7, which makes it impossible for anyone to monitor the market on their own.
Often in the past, I had to deal with the following questions related to my crypto trading:
* What happened overnight?
* Why are there no log entries?
* Why was this order placed?
* Why was no order placed?
The usual solution is to use a crypto trading bot that places orders for you when you are doing other things, like sleeping, being with your family, or enjoying your spare time. There are a lot of commercial solutions available, but I wanted an open source option, so I created the crypto-trading bot [Pythonic][2]. As [I wrote][3] in an introductory article last year, "Pythonic is a graphical programming tool that makes it easy for users to create Python applications using ready-made function modules." It originated as a cryptocurrency bot and has an extensive logging engine and well-tested, reusable parts such as schedulers and timers.
### Getting started
This hands-on tutorial teaches you how to get started with Pythonic for automated trading. It uses the example of trading [Tron][4] against [Bitcoin][5] on the [Binance][6] exchange platform. I choose these coins because of their volatility against each other, rather than any personal preference.
The bot will make decisions based on [exponential moving averages][7] (EMAs).
![TRX/BTC 1-hour candle chart][8]
TRX/BTC 1-hour candle chart
The EMA indicator is, in general, a weighted moving average that gives more weight to recent price data. Although a moving average may be a simple indicator, I've had good experiences using it.
The purple line in the chart above shows an EMA-25 indicator (meaning the last 25 values were taken into account).
The bot monitors the pitch between the current EMA-25 value (t0) and the previous EMA-25 value (t-1). If the pitch exceeds a certain value, it signals rising prices, and the bot will place a buy order. If the pitch falls below a certain value, the bot will place a sell order.
The pitch will be the main indicator for making decisions about trading. For this tutorial, it will be called the _trade factor_.
### Toolchain
The following tools are used in this tutorial:
* Binance expert trading view (visualizing data has been done by many others, so there's no need to reinvent the wheel by doing it yourself)
* Jupyter Notebook for data-science tasks
* Pythonic, which is the overall framework
* PythonicDaemon as the pure runtime (console- and Linux-only)
### Data mining
For a crypto trading bot to make good decisions, it's essential to get open-high-low-close ([OHLC][9]) data for your asset in a reliable way. You can use Pythonic's built-in elements and extend them with your own logic.
The general workflow is:
1. Synchronize with Binance time
2. Download OHLC data
3. Load existing OHLC data from the file into memory
4. Compare both datasets and extend the existing dataset with the newer rows
This workflow may be a bit overkill, but it makes this solution very robust against downtime and disconnections.
To begin, you need the **Binance OHLC Query** element and a **Basic Operation** element to execute your own code.
![Data-mining workflow][10]
Data-mining workflow
The OHLC query is set up to query the asset pair **TRXBTC** (Tron/Bitcoin) in one-hour intervals.
![Configuration of the OHLC query element][11]
Configuring the OHLC query element
The output of this element is a [Pandas DataFrame][12]. You can access the DataFrame with the **input** variable in the **Basic Operation** element. Here, the **Basic Operation** element is set up to use Vim as the default code editor.
![Basic Operation element set up to use Vim][13]
Basic Operation element set up to use Vim
Here is what the code looks like:
```
import pickle, pathlib, os
import pandas as pd
outout = None
if isinstance(input, pd.DataFrame):
    file_name = 'TRXBTC_1h.bin'
    home_path = str(pathlib.Path.home())
    data_path = os.path.join(home_path, file_name)
    try:
        df = pickle.load(open(data_path, 'rb'))
        n_row_cnt = df.shape[0]
        df = pd.concat([df,input], ignore_index=True).drop_duplicates(['close_time'])
        df.reset_index(drop=True, inplace=True)
        n_new_rows = df.shape[0] - n_row_cnt
        log_txt = '{}: {} new rows written'.format(file_name, n_new_rows)
    except:
        log_txt = 'File error - writing new one: {}'.format(e)
        df = input
    pickle.dump(df, open(data_path, "wb" ))
    output = df
```
First, check whether the input is the DataFrame type. Then look inside the user's home directory (**~/**) for a file named **TRXBTC_1h.bin**. If it is present, then open it, concatenate new rows (the code in the **try** section), and drop overlapping duplicates. If the file doesn't exist, trigger an _exception_ and execute the code in the **except** section, creating a new file.
As long as the checkbox **log output** is enabled, you can follow the logging with the command-line tool **tail**:
```
`$ tail -f ~/Pythonic_2020/Feb/log_2020_02_19.txt`
```
For development purposes, skip the synchronization with Binance time and regular scheduling for now. This will be implemented below.
### Data preparation
The next step is to handle the evaluation logic in a separate grid; therefore, you have to pass over the DataFrame from Grid 1 to the first element of Grid 2 with the help of the **Return element**.
In Grid 2, extend the DataFrame by a column that contains the EMA values by passing the DataFrame through a **Basic Technical Analysis** element.
![Technical analysis workflow in Grid 2][14]
Technical analysis workflow in Grid 2
Configure the technical analysis element to calculate the EMAs over a period of 25 values.
![Configuration of the technical analysis element][15]
Configuring the technical analysis element
When you run the whole setup and activate the debug output of the **Technical Analysis** element, you will realize that the values of the EMA-25 column all seem to be the same.
![Missing decimal places in output][16]
Decimal places are missing in the output
This is because the EMA-25 values in the debug output include just six decimal places, even though the output retains the full precision of an 8-byte float value.
For further processing, add a **Basic Operation** element:
![Workflow in Grid 2][17]
Workflow in Grid 2
With the **Basic Operation** element, dump the DataFrame with the additional EMA-25 column so that it can be loaded into a Jupyter Notebook;
![Dump extended DataFrame to file][18]
Dump extended DataFrame to file
### Evaluation logic
Developing the evaluation logic inside Juypter Notebook enables you to access the code in a more direct way. To load the DataFrame, you need the following lines:
![Representation with all decimal places][19]
Representation with all decimal places
You can access the latest EMA-25 values by using [**iloc**][20] and the column name. This keeps all of the decimal places.
You already know how to get the latest value. The last line of the example above shows only the value. To copy the value to a separate variable, you have to access it with the **.at** method, as shown below.
You can also directly calculate the trade factor, which you will need in the next step.
![Buy/sell decision][21]
Buy/sell decision
### Determine the trading factor
As you can see in the code above, I chose 0.009 as the trade factor. But how do I know if 0.009 is a good trading factor for decisions? Actually, this factor is really bad, so instead, you can brute-force the best-performing trade factor.
Assume that you will buy or sell based on the closing price.
![Validation function][22]
Validation function
In this example, **buy_factor** and **sell_factor** are predefined. So extend the logic to brute-force the best performing values.
![Nested for loops for determining the buy and sell factor][23]
Nested _for_ loops for determining the buy and sell factor
This has 81 loops to process (9x9), which takes a couple of minutes on my machine (a Core i7 267QM).
![System utilization while brute forcing][24]
System utilization while brute-forcing
After each loop, it appends a tuple of **buy_factor**, **sell_factor**, and the resulting **profit** to the **trading_factors** list. Sort the list by profit in descending order.
![Sort profit with related trading factors in descending order][25]
Sort profit with related trading factors in descending order
When you print the list, you can see that 0.002 is the most promising factor.
![Sorted list of trading factors and profit][26]
Sorted list of trading factors and profit
When I wrote this in March 2020, the prices were not volatile enough to present more promising results. I got much better results in February, but even then, the best-performing trading factors were also around 0.002.
### Split the execution path
Start a new grid now to maintain clarity. Pass the DataFrame with the EMA-25 column from Grid 2 to element 0A of Grid 3 by using a **Return** element.
In Grid 3, add a **Basic Operation** element to execute the evaluation logic. Here is the code of that element:
![Implemented evaluation logic][27]
Implemented evaluation logic
The element outputs a **1** if you should buy or a **-1** if you should sell. An output of **0** means there's nothing to do right now. Use a **Branch** element to control the execution path.
![Branch element: Grid 3 Position 2A][28]
Branch element: Grid 3, Position 2A
Due to the fact that both **0** and **-1** are processed the same way, you need an additional Branch element on the right-most execution path to decide whether or not you should sell.
![Branch element: Grid 3 Position 3B][29]
Branch element: Grid 3, Position 3B
Grid 3 should now look like this:
![Workflow on Grid 3][30]
Workflow on Grid 3
### Execute orders
Since you cannot buy twice, you must keep a persistent variable between the cycles that indicates whether you have already bought.
You can do this with a **Stack element**. The Stack element is, as the name suggests, a representation of a file-based stack that can be filled with any Python data type.
You need to define that the stack contains only one Boolean element, which determines if you bought (**True**) or not (**False**). As a consequence, you have to preset the stack with one **False**. You can set this up, for example, in Grid 4 by simply passing a **False** to the stack.
![Forward a False-variable to the subsequent Stack element][31]
Forward a **False** variable to the subsequent Stack element
The Stack instances after the branch tree can be configured as follows:
![Configuration of the Stack element][32]
Configuring the Stack element
In the Stack element configuration, set **Do this with input** to **Nothing**. Otherwise, the Boolean value will be overwritten by a 1 or 0.
This configuration ensures that only one value is ever saved in the stack (**True** or **False**), and only one value can ever be read (for clarity).
Right after the Stack element, you need an additional **Branch** element to evaluate the stack value before you place the **Binance Order** elements.
![Evaluate the variable from the stack][33]
Evaluating the variable from the stack
Append the Binance Order element to the **True** path of the Branch element. The workflow on Grid 3 should now look like this:
![Workflow on Grid 3][34]
Workflow on Grid 3
The Binance Order element is configured as follows:
![Configuration of the Binance Order element][35]
Configuring the Binance Order element
You can generate the API and Secret keys on the Binance website under your account settings.
![Creating an API key in Binance][36]
Creating an API key in the Binance account settings
In this tutorial, every trade is executed as a market trade and has a volume of 10,000 TRX (~US$ 150 on March 2020). (For the purposes of this tutorial, I am demonstrating the overall process by using a Market Order. Because of that, I recommend using at least a Limit order.)
The subsequent element is not triggered if the order was not executed properly (e.g., a connection issue, insufficient funds, or incorrect currency pair). Therefore, you can assume that if the subsequent element is triggered, the order was placed.
Here is an example of output from a successful sell order for XMRBTC:
![Output of a successfully placed sell order][37]
Successful sell order output
This behavior makes subsequent steps more comfortable: You can always assume that as long the output is proper, the order was placed. Therefore, you can append a **Basic Operation** element that simply writes the output to **True** and writes this value on the stack to indicate whether the order was placed or not.
If something went wrong, you can find the details in the logging message (if logging is enabled).
![Logging output of Binance Order element][38]
Logging output from Binance Order element
### Schedule and sync
For regular scheduling and synchronization, prepend the entire workflow in Grid 1 with the **Binance Scheduler** element.
![Binance Scheduler at Grid 1, Position 1A][39]
Binance Scheduler at Grid 1, Position 1A
The Binance Scheduler element executes only once, so split the execution path on the end of Grid 1 and force it to re-synchronize itself by passing the output back to the Binance Scheduler element.
![Grid 1: Split execution path][40]
Grid 1: Split execution path
Element 5A points to Element 1A of Grid 2, and Element 5B points to Element 1A of Grid 1 (Binance Scheduler).
### Deploy
You can run the whole setup 24/7 on your local machine, or you could host it entirely on an inexpensive cloud system. For example, you can use a Linux/FreeBSD cloud system for about US$5 per month, but they usually don't provide a window system. If you want to take advantage of these low-cost clouds, you can use PythonicDaemon, which runs completely inside the terminal.
![PythonicDaemon console interface][41]
PythonicDaemon console
PythonicDaemon is part of the basic installation. To use it, save your complete workflow, transfer it to the remote running system (e.g., by Secure Copy [SCP]), and start PythonicDaemon with the workflow file as an argument:
```
`$ PythonicDaemon trading_bot_one`
```
To automatically start PythonicDaemon at system startup, you can add an entry to the crontab:
```
`# crontab -e`
```
![Crontab on Ubuntu Server][42]
Crontab on Ubuntu Server
### Next steps
As I wrote at the beginning, this tutorial is just a starting point into automated trading. Programming trading bots is approximately 10% programming and 90% testing. When it comes to letting your bot trade with your money, you will definitely think thrice about the code you program. So I advise you to keep your code as simple and easy to understand as you can.
If you want to continue developing your trading bot on your own, the next things to set up are:
* Automatic profit calculation (hopefully only positive!)
* Calculation of the prices you want to buy for
* Comparison with your order book (i.e., was the order filled completely?)
You can download the whole example on [GitHub][2].
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/4/python-crypto-trading-bot
作者:[Stephan Avenwedde][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/hansic99
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/calculator_money_currency_financial_tool.jpg?itok=2QMa1y8c (scientific calculator)
[2]: https://github.com/hANSIc99/Pythonic
[3]: https://opensource.com/article/19/5/graphically-programming-pythonic
[4]: https://tron.network/
[5]: https://bitcoin.org/en/
[6]: https://www.binance.com/
[7]: https://www.investopedia.com/terms/e/ema.asp
[8]: https://opensource.com/sites/default/files/uploads/1_ema-25.png (TRX/BTC 1-hour candle chart)
[9]: https://en.wikipedia.org/wiki/Open-high-low-close_chart
[10]: https://opensource.com/sites/default/files/uploads/2_data-mining-workflow.png (Data-mining workflow)
[11]: https://opensource.com/sites/default/files/uploads/3_ohlc-query.png (Configuration of the OHLC query element)
[12]: https://pandas.pydata.org/pandas-docs/stable/getting_started/dsintro.html#dataframe
[13]: https://opensource.com/sites/default/files/uploads/4_edit-basic-operation.png (Basic Operation element set up to use Vim)
[14]: https://opensource.com/sites/default/files/uploads/6_grid2-workflow.png (Technical analysis workflow in Grid 2)
[15]: https://opensource.com/sites/default/files/uploads/7_technical-analysis-config.png (Configuration of the technical analysis element)
[16]: https://opensource.com/sites/default/files/uploads/8_missing-decimals.png (Missing decimal places in output)
[17]: https://opensource.com/sites/default/files/uploads/9_basic-operation-element.png (Workflow in Grid 2)
[18]: https://opensource.com/sites/default/files/uploads/10_dump-extended-dataframe.png (Dump extended DataFrame to file)
[19]: https://opensource.com/sites/default/files/uploads/11_load-dataframe-decimals.png (Representation with all decimal places)
[20]: https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.iloc.html
[21]: https://opensource.com/sites/default/files/uploads/12_trade-factor-decision.png (Buy/sell decision)
[22]: https://opensource.com/sites/default/files/uploads/13_validation-function.png (Validation function)
[23]: https://opensource.com/sites/default/files/uploads/14_brute-force-tf.png (Nested for loops for determining the buy and sell factor)
[24]: https://opensource.com/sites/default/files/uploads/15_system-utilization.png (System utilization while brute forcing)
[25]: https://opensource.com/sites/default/files/uploads/16_sort-profit.png (Sort profit with related trading factors in descending order)
[26]: https://opensource.com/sites/default/files/uploads/17_sorted-trading-factors.png (Sorted list of trading factors and profit)
[27]: https://opensource.com/sites/default/files/uploads/18_implemented-evaluation-logic.png (Implemented evaluation logic)
[28]: https://opensource.com/sites/default/files/uploads/19_output.png (Branch element: Grid 3 Position 2A)
[29]: https://opensource.com/sites/default/files/uploads/20_editbranch.png (Branch element: Grid 3 Position 3B)
[30]: https://opensource.com/sites/default/files/uploads/21_grid3-workflow.png (Workflow on Grid 3)
[31]: https://opensource.com/sites/default/files/uploads/22_pass-false-to-stack.png (Forward a False-variable to the subsequent Stack element)
[32]: https://opensource.com/sites/default/files/uploads/23_stack-config.png (Configuration of the Stack element)
[33]: https://opensource.com/sites/default/files/uploads/24_evaluate-stack-value.png (Evaluate the variable from the stack)
[34]: https://opensource.com/sites/default/files/uploads/25_grid3-workflow.png (Workflow on Grid 3)
[35]: https://opensource.com/sites/default/files/uploads/26_binance-order.png (Configuration of the Binance Order element)
[36]: https://opensource.com/sites/default/files/uploads/27_api-key-binance.png (Creating an API key in Binance)
[37]: https://opensource.com/sites/default/files/uploads/28_sell-order.png (Output of a successfully placed sell order)
[38]: https://opensource.com/sites/default/files/uploads/29_binance-order-output.png (Logging output of Binance Order element)
[39]: https://opensource.com/sites/default/files/uploads/30_binance-scheduler.png (Binance Scheduler at Grid 1, Position 1A)
[40]: https://opensource.com/sites/default/files/uploads/31_split-execution-path.png (Grid 1: Split execution path)
[41]: https://opensource.com/sites/default/files/uploads/32_pythonic-daemon.png (PythonicDaemon console interface)
[42]: https://opensource.com/sites/default/files/uploads/33_crontab.png (Crontab on Ubuntu Server)

View File

@ -0,0 +1,189 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Tweaking history on Linux)
[#]: via: (https://www.networkworld.com/article/3537214/tweaking-history-on-linux.html)
[#]: author: (Sandra Henry-Stocker https://www.networkworld.com/author/Sandra-Henry_Stocker/)
Tweaking history on Linux
======
The bash shell's history command in Linux makes it easy to review and reuse commands, but there's a lot you do to control how much it remembers and how much forgets.
[Claudio Testa][1] [(CC0)][2]
The bash **history** command on Linux systems helps with remembering commands youve previously run and repeating those commands without having to retype them.
You could decide, however, that youd be just as happy to forget that you referenced a dozen man pages, listed your files every 10 minutes or viewed previously run commands by typing “history”. In this post, were going to look at how you can get the history command to remember just what you want it to remember and forget commands that are likely to be of little "historic value".
### Viewing your command history
To view previously run commands, you simply type “history”. Youll probably see a long list of commands. The number of commands remembered depends on an environment variable called **$HISTSIZE** that is set up in your **~/.bashrc** file, but theres nothing stopping you from changing this setting if you want to save more or fewer commands.
To view history, use the **history** command:
```
$ history
209 uname -v
210 date
211 man chage
...
```
To see the maximum number of commands that will be displayed:
```
$ echo $HISTSIZE
500
```
You can change **$HISTSIZE** and make the change permanent by running commands like these:
```
$ export HISTSIZE=1000
$ echo “HISTSIZE=1000” >> ~/.bashrc
```
Theres also a difference between how much history is preserved for you and how much is displayed when you type “history”. The **$HISTSIZE** variable controls how much history is displayed while the **$HISTFILESIZE** variable controls how many commands are retained in your **.bash_history** file.
[][3]
```
$ echo $HISTSIZE
1000
$ echo $HISTFILESIZE
2000
```
You can verify the second variable by counting the lines in your history file:
```
$ wc -l .bash_history
2000 .bash_history
```
One thing to keep in mind is that commands that you enter during a login session arent added to your **.bash_history** file until you log off, even though they show up in the **history** command output right away.
### Using history
There are three ways to reissue commands that you find in your history. The simplest way, especially if the command you want to reuse was run recently, is often to type a ! followed by enough of the first letters in the command's name to uniquely identify it.
```
$ !u
uname -v
#37-Ubuntu SMP Thu Mar 26 20:41:27 UTC 2020
```
Another easy way to repeat a command is to simply press your up-arrow key until the command is displayed and then press enter.
Alternately, if you run the history command and see the command you want to rerun listed, you can type an ! followed by the sequence number shown to the left of the command.
```
$ !209
uname -v
#37-Ubuntu SMP Thu Mar 26 20:41:27 UTC 2020
```
### Hiding history
If you want to stop recording commands for some period of time, you can use this command:
```
$ set +o history
```
Commands will not show up when you type "history" nor will they be added to your **.bash_history** file when you exit the session by logging off or exiting the terminal.
To reverse this setting, use **set -o history**. To make it permanent, you can add it to your **.bashrc** file, though failing to make use of command history altogether is generally not a good idea.
```
$ echo 'set +o history' >> ~/.bashrc
```
To temporarily clear history, so that only commands that you enter afterwards show up when you type "history", use the **history -c** (clear) command:
```
$ history | tail -3
209 uname -v
210 date
211 man chage
$ history -c
$ history
1 history
```
NOTE: The commands entered after typing "history -c" will not be added to your .bash_history file.
### Controlling history
The command history settings on many systems will default to including one called **$HISTCONTROL** that ensures that, even if you run the same command seven times in a row, it will only be remembered once. It also ensures that commands that you type after first entering one or more blanks will be omitted from your command history.
```
$ grep HISTCONTROL .bashrc
HISTCONTROL=ignoreboth
```
The "ignoreboth" means "ignore both duplicate commands and command starting with blanks". For example, if you type these commands:
```
$ echo try this
$ date
$ date
$ date
$ pwd
$ history
```
your history command should report something like this:
```
$ history
$ echo try this
$ date
$ history
```
Notice that the sequential date commands were reduced to one and the indented command was omitted.
### Overlooking history
To ignore certain commands so that they never show up when you type "history" and are never added to your **.bash_history** file, use the **$HISTIGNORE** setting. For example:
```
$ export HISTIGNORE=”history:cd:exit:ls:pwd:man”
```
This setting will cause all **history**, **cd**, **exit**, **ls**, **pwd** and **man** commands to be omitted from your **history** output and your **.bash_history** file.
If you want to make this setting permanent, you have to add it to your **.bashrc** file.
```
$ echo 'HISTIGNORE="history:cd:exit:ls:pwd:man"' >> .bashrc
```
This setting just means that when you look back through previously run commands, the list wont be cluttered by commands that you're unlikely to be looking for when you are looking through your command history.
### Remembering, ignoring and forgetting the past
Command history is useful because it helps you remember what commands youve recently used and reminds you about changes youve recently made. It also makes it easier to rerun commands, especially those with a string of arguments that you don't necessarily want to recreate. Tailoring your history settings can make your use of command history a little easier and more efficient.
Join the Network World communities on [Facebook][4] and [LinkedIn][5] to comment on topics that are top of mind.
--------------------------------------------------------------------------------
via: https://www.networkworld.com/article/3537214/tweaking-history-on-linux.html
作者:[Sandra Henry-Stocker][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.networkworld.com/author/Sandra-Henry_Stocker/
[b]: https://github.com/lujun9972
[1]: https://unsplash.com/photos/iqeG5xA96M4
[2]: https://creativecommons.org/publicdomain/zero/1.0/
[3]: https://www.networkworld.com/blog/itaas-and-the-corporate-storage-technology/?utm_source=IDG&utm_medium=promotions&utm_campaign=HPE22140&utm_content=sidebar (ITAAS and Corporate Storage Strategy)
[4]: https://www.facebook.com/NetworkWorld/
[5]: https://www.linkedin.com/company/network-world

View File

@ -0,0 +1,239 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Writing Java with Quarkus in VS Code)
[#]: via: (https://opensource.com/article/20/4/java-quarkus-vs-code)
[#]: author: (Daniel Oh https://opensource.com/users/daniel-oh)
Writing Java with Quarkus in VS Code
======
In this tutorial, I'll walk you through how to rebuild, package, and
deploy cloud-native applications automatically with Quarkus.
![Person drinking a hat drink at the computer][1]
In the previous articles in this series about cloud-native [Java][2] applications, I shared [_6 requirements of cloud-native software_][3] and [_4 things cloud-native Java must provide_][4]. But now you might want to implement these advanced Java applications in your local machine without climbing a steep learning curve. In this article, I will walk through using the open source technologies [Quarkus][5] and [Visual Studio Code][6] (VS Code) to accelerate the development of both traditional cloud-native Java stacks and also serverless, reactive applications with easier and more familiar methods.
Quarkus is a Kubernetes-native Java stack tailored for GraalVM and OpenJDK HotSpot. It's crafted from best-of-breed Java libraries and standards with live coding, unified configuration, superfast startup, small memory footprint, and unified imperative and reactive development. VS Code is an open source integrated development environment (IDE) for editing code.
### Generate a Quarkus project
Begin by navigating to Quarkus' [Start coding][7] page to generate a Quarkus project that includes a RESTful endpoint. Leave all variables (i.e., Group, Artifact, Build Tool, Extensions) on the default settings, then click **Generate your application** at the top-right of the page. Note that the RESTEasy JAX-RS extension is preselected as default.
![Quarkus Generate application button][8]
The ZIP file will automatically download on your local machine. Extract the file with the following command:
```
$ unzip code-with-quarkus.zip
Archive: code-with-quarkus.zip
    creating: code-with-quarkus/
   inflating: code-with-quarkus/pom.xml
   ...
```
### Install VS Code
Download and install VS Code in your preferred way, whether that's [from the website][9] or through your package manager (dnf, apt, brew, etc). Once that's done, open the unzipped Quarkus project using VS Code's command-line tool:
```
$ cd code-with-quarkus/
$ code .
```
You will see the [Apache Maven][10] project structure with:
* **ExampleResource** exposed on **/hello**
* Associated JUnit test
* Accessible landing page via <http://localhost:8080>
* Dockerfiles for both [native compilation][11] and JVM HotSpot
* A unified application configuration file
Add Quarkus tools to your IDE through the VS Code's extension feature.
![Add Quarkus tools to VS Code IDE][12]
### Start coding
Run the application using Quarkus development mode. To run the application, you need:
* JDK 1.8+ installed with JAVA_HOME configured appropriately
* Apache Maven 3.6.3+
Move to the **code-with-quarkus** directory then type **mvn compile quarkus:dev** in VS Code's terminal.
![Run application][13]
You will see that the Java application is running well with:
* About one second to startup
* Live coding activated
* EnabledCDI and RESTEASY features
When you access the endpoint via a web browser, you will see the return code, **hello**.
!["Hello" return][14]
Now, you're ready to change the code! Move back to VS Code, then open the **ExampleResource.java** file in **src/main/java/org/acme**. Replace the return code with "**Welcome, Cloud-Native Java with Quarkus!"** Don't forget to **Save** the file.
![Editing the return][15]
Go back to the web browser and reload the page.
![New return][16]
_It's like magic!_ Behind the scenes, Quarkus rebuilt, packaged, and deployed the application for you automatically, and it only took half a second. This is one of the essential cloud-native Java runtime features for increasing development productivity.
![Quarkus output][17]
Continue running your cloud-native Java application in Quarkus.
### Integrate data transactions via Quakrus Tool
To add an in-memory database (H2) transaction capability, press **F1** then click on **Quarkus: Add extensions to the current project**.
![Adding extensions in Quarkus][18]
Enter **h2** in the search bar, then double-click on **JDBC Driver - H2 Data** in the result.
![JDBC Driver - H2 Data extension][19]
Select the following three extensions, which will simplify your persistence code and return JSON format data:
* Hibernate ORM with Panache Data
* JDBC Driver - H2
* RESTEasy JSON-B Web
Press **Enter** to add those dependencies.
![Add Quarkus extensions][20]
You should see the following in a new VS Code terminal:
![VS Code adding extensions][21]
You should also find the following pulled dependencies in **POM.xml**:
![dependencies in POM.xml][22]
### Create an Inventory entity
With your project in place, you can get to work defining the business logic.
The first step is to define the model (entity) of an Inventory object. Since Quarkus uses Hibernate ORM Panache, create an **Inventory.java** file in the **src.main.java.org.acme** directory, and paste the following code into it:
```
package org.acme;
import javax.persistence.Cacheable;
import javax.persistence.Entity;
import io.quarkus.hibernate.orm.panache.PanacheEntity;
@[Entity][23]
@Cacheable
public class Inventory extends PanacheEntity {
   
    public [String][24] itemId;
    public [String][24] location;
    public int quantity;
    public [String][24] link
    public Inventory() {
    }
   
}
```
#### Define the RESTful endpoint of Inventory
Next, mirror the abstraction of service so that you can inject the Inventory service into various places (like a RESTful resource endpoint) in the future. Create an **InventoryResource.java** file in the **src.main.java.org.acme** directory and add this code to it:
```
package org.acme;
import java.util.List;
import javax.enterprise.context.ApplicationScoped;
import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
@Path("/services/inventory")
@ApplicationScoped
@Produces("application/json")
@Consumes("application/json")
public class InventoryResource {
    @GET
    <http://localhost:8080/services/inventory>
    public List&lt;Inventory&gt; getAll() {
        return Inventory.listAll();
    }
}
```
Don't forget to save these files. Go back to your web browser and access a new endpoint, <http://localhost:8080/services/inventory>. You will see:
![Inventory endpoint][25]
### Wrapping up
If you have an issue or get an error when you implement this, you can find and reuse the [code in my GitHub repository][26].
If you want to learn more, Quarkus has some [practical and useful guides][27] that show how to develop advanced cloud-native Java applications using Quarkus extensions with event-driven programming, serverless development, and Kubernetes deployment.
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/4/java-quarkus-vs-code
作者:[Daniel Oh][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/daniel-oh
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/coffee_tea_laptop_computer_work_desk.png?itok=D5yMx_Dr (Person drinking a hat drink at the computer)
[2]: https://opensource.com/resources/java
[3]: https://opensource.com/article/20/1/cloud-native-software
[4]: https://opensource.com/article/20/1/cloud-native-java
[5]: https://quarkus.io/
[6]: https://code.visualstudio.com/
[7]: https://code.quarkus.io/
[8]: https://opensource.com/sites/default/files/uploads/quarkus_generateapplication.png (Quarkus Generate application button)
[9]: https://code.visualstudio.com/download
[10]: https://maven.apache.org/
[11]: https://quarkus.io/guides/building-native-image
[12]: https://opensource.com/sites/default/files/uploads/add-quarkus-to-ide.png (Add Quarkus tools to VS Code IDE)
[13]: https://opensource.com/sites/default/files/uploads/run-application.png (Run application)
[14]: https://opensource.com/sites/default/files/uploads/endpoint-hello.png ("Hello" return)
[15]: https://opensource.com/sites/default/files/uploads/edit-return-code.png (Editing the return)
[16]: https://opensource.com/sites/default/files/uploads/new-return-code.png (New return)
[17]: https://opensource.com/sites/default/files/uploads/quarkus-magic.png (Quarkus output)
[18]: https://opensource.com/sites/default/files/uploads/quarkus-add-extensions.png (Adding extensions in Quarkus)
[19]: https://opensource.com/sites/default/files/uploads/jbdc-driver-h2-data.png (JDBC Driver - H2 Data extension)
[20]: https://opensource.com/sites/default/files/uploads/add-extensions.png (Add Quarkus extensions)
[21]: https://opensource.com/sites/default/files/uploads/vscode-adding-extensions.png (VS Code adding extensions)
[22]: https://opensource.com/sites/default/files/uploads/dependencies-pomxml.png (dependencies in POM.xml)
[23]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+entity
[24]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+string
[25]: https://opensource.com/sites/default/files/uploads/inventory-endpoint.png (Inventory endpoint)
[26]: https://github.com/danieloh30/code-with-quarkus
[27]: https://quarkus.io/guides/

View File

@ -0,0 +1,103 @@
[#]: collector: (lujun9972)
[#]: translator: (wxy)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Relive Linux history with the ROX desktop)
[#]: via: (https://opensource.com/article/19/12/linux-rox-desktop)
[#]: author: (Seth Kenlon https://opensource.com/users/seth)
用 ROX 桌面版重温 Linux 历史
======
> 这篇文章是 Linux 桌面 24 天特别系列的一部分。如果你想来一次有趣的时光之旅ROX 桌面非常值得一试。
![Person typing on a 1980's computer][1]
[ROX][2] 桌面已经不再积极开发,而它的遗留问题至今仍然存在,即使在它活跃开发的时候,它也是一个另类的 Linux 桌面。当其他的桌面感觉与旧的 Unix 或 Windows 界面大致相似时ROX 则属于 BeOS、AmigaOS 和 [RISC OS][3] 桌面阵营。
它专注于拖放式操作(这使得它的可访问性对某些用户来说并不理想)、点击式操作、弹出式上下文菜单,以及一个独特的应用程序目录系统,无需安装即可运行本地应用程序。
### 安装 ROX
如今ROX 基本上都被遗弃了,只剩下一点残渣碎片留给用户自己去收集整理。幸运的是,这个难题相对来说比较容易解决,但是当你在发行版的软件仓库中找到 ROX 桌面的碎片时,不要被迷惑了,因为那并不是 ROX 桌面所有的碎片。ROX 常用的部分 —— 文件管理器([ROX-Filer][4])和终端([ROXTerm][5] —— 似乎在大多数流行的发行版软件仓库中都有存在,你可以将它们作为独立的应用程序安装(和使用)。然而,要运行 ROX 桌面,你必须同时安装 ROX-Session 和它所依赖的库。
我在 Slackware 14.2 上安装了 ROX但它应该可以在任何 Linux 或 BSD 系统上运行。
首先,你必须从其版本库中安装 [ROX-lib2][6]。按照它的理念,你要安装 ROX-lib2只需下载tarball、[解压][7],然后将 `ROX-lib` 目录移动到 `/usr/local/lib` 下。
接下来,你要安装 [ROX-Session][8]。这可能需要从源码中编译,因为它很可能不在你的软件仓库中。编译过程需要编译工具,这些工具在 Slackware 上是默认提供的,但在其他发行版中往往会被省略,以节省初始下载空间。根据你的发行版不同,你必须安装的包的名称也不同,所以请参考文档来了解具体内容。例如,在 Debian 发行版中,你可以在 [Debian 的 wiki][9] 中了解构建需求,而在 Fedora 发行版中,请参考 [Fedora 的文档][10]。安装了构建工具后,执行自定义的 ROX-Session 构建脚本。
```
$ ./AppRun
```
这个脚本会自己管理构建和安装,并提示你需要 root 权限,以在你的登录屏上将其添加为一个选项。
如果你还没有从你的软件库中安装 ROX-Filer请在继续之前安装。
这些组件共同组成了一个完整的 ROX 桌面。要登录到新桌面请从当前桌面会话中注销。默认情况下你的会话管理器KDM、GDM、LightDM 或 XDM视你的设置而定会继续登录到您之前的桌面所以在登录前必须覆盖。
使用 SDDM
![][11]
使用 GDM
![][12]
### ROX桌面特性
ROX 桌面默认情况下很简单,屏幕底部有一个面板,桌面上有一个通往主目录的快捷方式图标。面板中包含了一些常用位置的快捷方式。这就是 ROX 桌面的全部功能,至少在安装后就是这样。如果你想要时钟或日历或系统托盘,你需要找到提供这些功能的应用程序。
![Default ROX desktop][13]
虽然没有任务栏,但当你将窗口最小化时,它就会成为桌面上的一个临时图标。你可以点击该图标,将其窗口恢复到以前的大小和位置。
面板也可以进行一些修改。你可以在其中放置不同的快捷方式,甚至可以创建自己的小程序。
没有应用菜单,也没有上下文菜单中的应用快捷方式。相反,你可以手动导航到 `/usr/share/applications`,或者你可以将你的应用目录或目录添加到 ROX 面板中。
![ROX desktop][14]
ROX 桌面的工作流程集中在鼠标驱动上,让人联想到 Mac OS 7.5 和 8 系统。通过 ROX-filer你可以管理权限、文件管理、<ruby>内省<rt>introspection</rt></ruby>、脚本启动、后台设置,以及几乎所有你能想到的东西,只要你有足够的耐心,就可以实现点击式的交互。对于高级用户来说,这似乎很慢,但 ROX 设法让它变得相对无痛,而且非常直观。
### 应用程序目录、AppRun 和 AppImage
ROX 桌面有一个优雅的惯例,在这个惯例中,包含一个名为 `AppRun` 的脚本的目录就可以像一个应用程序一样被执行。这意味着,要制作一个 ROX 应用程序,你所要做的就是将代码编译到一个目录中,将一个名为`AppRun` 的脚本放在该目录的根目录下执行你所编译的二进制文件然后将该目录标记为可执行。ROX-Filer 会按照你设置的方式来显示一个目录并以特殊的图标和颜色显示一个目录。当你点击一个应用程序目录ROX-Filer 会自动运行里面的 `AppRun` 脚本。它的外观和行为就像一个已经安装好的应用程序,但它是在用户的主目录下的本地目录,不需要特殊的权限。
这是一个方便的功能,但它是那些你使用时感觉很好的小功能之一,因为它很容易做到。它绝不是必要的,它只是比在本地建立一个应用程序,将目录隐藏在某个不显眼的地方,并建立一个快速的 `.desktop` 文件作为你的启动器,要领先了几步。然而,应用程序目录的概念已经当做灵感被 [AppImage][16] 打包系统所 [借鉴][15] 。
### 为什么应该试试 ROX 桌面
把 ROX 设置好并使用是有些困难的,它似乎真的被抛弃了。然而,它的遗产在今天以多种方式继续存在,它是 Linux 历史上的一段迷人而有趣的历史。它可能不会成为你的主要桌面,但如果你想来一次有趣的回溯之旅,那么 ROX 非常值得一试。探索它、定制它,看看它包含了哪些巧妙的想法。也许还有一些隐藏的宝石可以让开源社区受益。
--------------------------------------------------------------------------------
via: https://opensource.com/article/19/12/linux-rox-desktop
作者:[Seth Kenlon][a]
选题:[lujun9972][b]
译者:[wxy](https://github.com/wxy)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/seth
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/1980s-computer-yearbook.png?itok=eGOYEKK- (Person typing on a 1980's computer)
[2]: http://rox.sourceforge.net/desktop/
[3]: https://www.riscosopen.org/content/
[4]: http://rox.sourceforge.net/desktop/ROX-Filer
[5]: http://roxterm.sourceforge.net/
[6]: http://rox.sourceforge.net/desktop/ROX-Lib
[7]: https://opensource.com/article/17/7/how-unzip-targz-file
[8]: http://rox.sourceforge.net/desktop/ROX-Session.html
[9]: https://wiki.debian.org/BuildingTutorial
[10]: https://docs.pagure.org/docs-fedora/installing-software-from-source.html
[11]: https://opensource.com/sites/default/files/advent-kdm_0.jpg
[12]: https://opensource.com/sites/default/files/advent-gdm_1.jpg
[13]: https://opensource.com/sites/default/files/uploads/advent-rox.jpg (Default ROX desktop)
[14]: https://opensource.com/sites/default/files/uploads/advent-rox-custom.jpg (ROX desktop)
[15]: https://github.com/AppImage/AppImageKit/wiki/AppDir
[16]: https://appimage.org/

View File

@ -0,0 +1,372 @@
[#]: collector: (lujun9972)
[#]: translator: (lxbwolf)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Build a private social network with a Raspberry Pi)
[#]: via: (https://opensource.com/article/20/3/raspberry-pi-open-source-social)
[#]: author: (Giuseppe Cassibba https://opensource.com/users/peppe8o)
用树莓派搭建一个私人社交网络
======
手把手教你怎样以低硬件成本和简易步骤搭建自己的社交网络。
![Team of people around the world][1]
近年来,社交网络已经革新了人们的生活习惯。为了维持与朋友和家人的联系,人们每天都会使用社交频道。但是涉及到隐私和数据安全时,仍有一些普遍问题。尽管社交网络创建了复杂的隐私策略来保护用户的信息,但如果你不想自己的信息被泄露,最好的办法还是把数据保存在自己的服务器上。
一个树莓派 — 多才多艺的 Raspbian Lite 版本就可以让你搭建很多有用的家庭服务(参照我的文章[树莓派项目][2])。通过搜索开源软件你就可以实现一些令人痴迷的功能,你也可以用这个神奇的设备来感受那些功能。其中一个有趣的尝试就是在你的树莓派上安装 OSSN译注OpenSource Social Network
### OSSN是什么
[OSSN][3] 是用 PHP 写的一个快速开发社交网络软件让你可以搭建自己的社交网站。OSSN 可以用来搭建不同类型的社交应用,如:
* 私人内部网
* 公用/公开网络
* 社区
OSSN 支持的功能:
* 照片
* 个人资料
* 朋友圈
* 表情
* 搜索
* 聊天
OSSN 运行在 LAMP 服务器上。硬件需求很简单,却能提供强大的用户界面,也友好支持移动端。
### 我们需要准备什么
这个项目很简单,而且由于我们只安装远程 web 服务,因此我们只需要一些便宜的零件就够了。我使用的是树莓派 3B+,但是用树莓派 3A+ 或其他更新的板应该也可以。
硬件:
* 带有电源模块的树莓派 3B+
* 一张 SD 卡(最好是性能好点的卡,至少 16 GB
* 一台有 SFTP 软件(如免费的 [Filezilla][4])的桌面 PC用来把安装包传到你的树莓派上
### 操作步骤
我们首先搭建一个传统的 LAMP 服务器,然后配置数据库用户和安装 OSSN。
#### 1\. 安装 Raspbian Buster Lite 操作系统
你可以直接参照我的文章[在你的树莓派上安装 Raspbian Buster Lite][5]。
为了确保你的系统是最新的ssh 登录到树莓派后在终端输入下面的命令:
```bash
sudo apt-get update
sudo apt-get upgrade
```
#### 2\. 安装 LAMP 服务
LAMPLinuxApacheMysqlPhp服务通常与 MySQL 数据库配合。在我们的项目中,我们选择 MariaDB因为它更轻量完美支持树莓派。
#### 3\. 安装 Apache 服务:
```
`sudo apt-get install apache2 -y`
```
你可以通过在浏览器输入 `http://<<YouRpiIPAddress>>` 来检查 Apache 是否安装正确:
![][6]
#### 4\. 安装 PHP:
```
`sudo apt-get install php -y`
```
#### 5\. 安装 MariaDB 服务和 PHP connector:
```
`sudo apt-get install mariadb-server php-mysql -y`
```
#### 6\. 安装 phpMyAdmin:
在 OSSN 中 phpMyAdmin 不是强制安装的,但我建议你安装,因为它可以简化数据库的管理。
```
`sudo apt-get install phpmyadmin`
```
在 phpMyAdmin 配置界面,执行以下步骤:
* 按下空格和 OK 选择 apache强制
* 在 dbconfig-common 选择是,配置 phpMyAdmin 的数据库。
* 输入想设置的密码,按下 OK。
* 再次输入 phpMyAdmin 密码来确认,按下 OK。
#### 7\. 为 phpMyAdmin 用户添加数据库权限来管理数据库:
我们用 root 用户连接 MariaDB默认没有密码来设置权限。
```
sudo mysql -uroot -p
grant all privileges on *.* to 'phpmyadmin'@'localhost';
flush privileges;
quit
```
#### 8\. 最后,重启 Apache 服务:
```
`sudo systemctl restart apache2.service`
```
在浏览器输入 `http://<<YouRpiIPAddress>>/phpmyadmin/` 来检查 phpMyAdmin 是否正常:
![][7]
默认的 phpMyAdmin 登录凭证:
* 用户名phpmyadmin
* 密码:在 phpMyAdmin 安装步骤中你设置的密码
### 安装 OSSN 所需的其他包和配置 PHP
在第一次配置 OSSN 前,我们还需要在系统上安装一些所需的包:
* PHP 版本 5.67.0 或 7.1
* MYSQL 5 及以上
* APACHE
* MOD_REWRITE
* 需要打开 PHP 扩展 cURL 和 Mcrypt
* PHP GD 扩展
* PHP ZIP 扩展
* 打开 PHP 设置 allow_url_fopen
* PHP JSON 支持
* PHP XML 支持
* PHP OpenSSL
在终端输入以下命令来安装上述包:
```
`sudo apt-get install php7.3-curl php7.3-gd php7.3-zip php7.3-json php7.3-xml`
```
#### 1\. 打开 MOD_REWRITE:
```
`sudo a2enmod rewrite`
```
#### 2\. 修改默认的 Apache 配置,使用 mod_rewrite:
```
`sudo nano /etc/apache2/sites-available/000-default.conf`
```
#### 3\. 在 **000-default.conf** 文件中添加下面的内容:
```ini
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
# SECTION TO ADD --------------------------------
<Directory /var/www/html>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all granted
</Directory>
# END SECTION TO ADD --------------------------------
</VirtualHost>
```
#### 4\. 安装 Mcrypt:
```bash
sudo apt install php-dev libmcrypt-dev php-pear
sudo pecl channel-update pecl.php.net
sudo pecl install mcrypt-1.0.2
```
#### 5\. 在 `/etc/php/7.3/apache2/php.ini` 文件中添加 `extension=mcrypt.so`(或取消注释)打开 Mcrypt 模块:
```bash
sudo nano /etc/php/7.3/apache2/php.ini
```
**allow_url_fopen** 应该已经在 `/etc/php/7.3/apache2/php.ini` 文件中打开了。OpenSSL 应该在 php7.3 中安装了。
#### 6\. 我建议的另一个设置是把 PHP 最大上传文件数修改为 16 MB
```
`sudo nano /etc/php/7.3/apache2/php.ini`
```
#### 7\. 搜索到 **upload_max_filesize** 所在的行,参照下面的设置:
```
`upload_max_filesize = 16M`
```
#### 8\. 保存并退出,重启 Apache
```
`sudo systemctl restart apache2.service`
```
### 安装 OSSN
#### 1\. 创建数据库,设置用户:
回到 phpmyadmin web页面浏览器输入 `http://<<YouRpiIPAddress>>/phpmyadmin/`)并登录:
用户名: phpmyadmin
密码:在 phpMyAdmin 安装步骤中你设置的密码
点击数据库标签页:
![][8]
创建一个数据库,记下数据库的名字,因为在之后的安装过程中,你要手动输入它。
![][9]
现在为 OSSN 创建一个数据库用户,我使用下面的凭证:
用户名: ossn_db_user
密码: ossn_db_password
在终端输入下面的命令如果你没有修改过密码root 密码应该仍然是空):
```bash
sudo mysql -uroot -p
CREATE USER 'ossn_db_user'@'localhost' IDENTIFIED BY 'ossn_db_password';
GRANT ALL PRIVILEGES ON ossn_db.* TO 'ossn_db_user'@'localhost';
flush privileges;
quit
```
#### 2\. 安装 OSSN 软件:
在你 PC 上从 [OSSN 下载页面][10] 下载 OSSN 安装压缩文件,保存为文件 `ossn-v5.2-1577836800.zip`
使用你习惯的 SFTP 软件把整个压缩文件通过 SFTP 传到树莓派的新目录 `/home/pi/download` 下。常用的默认SFP 连接参数是:
* 主机:你树莓派的 IP 地址
* 用户名pi
* 密码raspberry如果没有修改过默认密码
* 端口: 22
在终端输入:
```bash
cd /home/pi/download/ #Enter directory where OSSN installation files have been transferred
unzip ossn-v5.2-1577836800.zip #Extracts all files from zip
cd /var/www/html/ #Enter Apache web directory
sudo rm index.html #Removes Apache default page - we'll use OSSN one
sudo cp -R /home/pi/download/ossn-v5.2-1577836800/* ./ #Copy installation files to web directory
sudo chown -R www-data:www-data ./
```
创建数据文件夹OSSN 需要一个文件夹来存放数据。出于安全目的OSSN 建议这个文件夹创建在公开文档根目录之外。所以,我们在 `/opt` 下创建。
```bash
sudo mkdir /opt/ossn_data
sudo chown -R www-data:www-data /opt/ossn_data/
```
在浏览器输入 `http://<<YourRpiIPAddress>>` 来开始安装向导。
![][11]
所有项都检查完后,点击页面最下面的下一步按钮。
![][12]
阅读证书验证并点击页面最下面的下一步按钮来接受证书。
![][13]
输入数据库用户名,密码和你选择的数据库名字,记得也要输入 OSSN 数据文件夹名称。点击安装。
![][14]
输入你的管理员账号信息,点击创建按钮。
![][15]
现在所有的工作应该都完成了。点击结束,进入管理员首页。
![][16]
你可以通过 URL `http://<<YourRpiIPAddress>>/administrator` 进入管理员控制面板,普通用户可以访问链接是 `http://<<YourRpiIPAddress>>`
![][17]
*本文首发在 [peppe8o.com][18]。已获得转载授权。*
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/3/raspberry-pi-open-source-social
作者:[Giuseppe Cassibba][a]
选题:[lujun9972][b]
译者:[lxbwolf](https://github.com/lxbwolf)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/peppe8o
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/team_global_people_gis_location.png?itok=Rl2IKo12 (Team of people around the world)
[2]: https://peppe8o.com/2019/04/best-raspberry-pi-projects-with-open-source-software/
[3]: https://www.opensource-socialnetwork.org/
[4]: https://filezilla-project.org/
[5]: https://peppe8o.com/2019/07/install-raspbian-buster-lite-in-your-raspberry-pi/
[6]: https://opensource.com/sites/default/files/uploads/ossn_1_0.jpg
[7]: https://opensource.com/sites/default/files/uploads/ossn_2.jpg
[8]: https://opensource.com/sites/default/files/uploads/ossn_3.jpg
[9]: https://opensource.com/sites/default/files/uploads/ossn_4.jpg
[10]: https://www.opensource-socialnetwork.org/download
[11]: https://opensource.com/sites/default/files/uploads/ossn_5.jpg
[12]: https://opensource.com/sites/default/files/uploads/ossn_6.jpg
[13]: https://opensource.com/sites/default/files/uploads/ossn_7.jpg
[14]: https://opensource.com/sites/default/files/uploads/ossn_8.jpg
[15]: https://opensource.com/sites/default/files/uploads/ossn_9.jpg
[16]: https://opensource.com/sites/default/files/uploads/ossn_10.jpg
[17]: https://opensource.com/sites/default/files/uploads/ossn_11.jpg
[18]: https://peppe8o.com/private-social-network-with-raspberry-pi-and-opensource-social-network/

View File

@ -1,84 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: (geekpi)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (New Linux Distribution UbuntuDDE Brings The Beautiful Deepin Desktop to Ubuntu)
[#]: via: (https://itsfoss.com/ubuntudde/)
[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/)
新的 Linux 发行版 UbuntuDDE 将漂亮的 Deepin 桌面带到 Ubuntu
======
Deepin 是有直观 UI 的漂亮桌面环境。UbuntuDDE 项目结合了 Ubuntu 的强大和 Deepin 之美。
[Deepin 桌面环境][1]DDE是由 [Deepin Linux][2] 的开发人员创建的漂亮桌面环境。最初Deepin Linux 基于 [Ubuntu][3],但后来他们切换到了 [Debian][4]。
![Deepin Desktop Environment in Ubuntu][5]
Deepin Linux 的一个主要问题是服务器速度较慢。常规系统需要花几个小时才能下载,因为它们的所有服务器都在中国,而且这些服务器非常慢。
如果你想使用 Deepin 桌面,那没有什么可以阻止你将其安装在常规 Ubuntu 系统上。[UbuntuDDE][6] 试图通过在 Ubuntu 之上为你提供开箱即用的 Deepin 桌面体验来使其更简单。这样可以节省你在 Ubuntu 上安装和配置 Deepin 的时间和精力。
![Screenshot of UbuntuDDE][7]
### Ubuntu DDEUbuntu 的强大和 Deepin 桌面的漂亮
请注意UbuntuDDE 不是 Ubuntu 的官方变种。UbuntuDDE 的开发人员与 Ubuntu 团队无关。UbuntuDDE 目前一个混合发行版,其目标是在未来的发行版中被公认为 Ubuntu 的官方变种。
UbuntuDDE 开发人员得到了 Ubuntu Snapcraft 团队的 Alan Pope 以及 Ubuntu Budgie 团队和 [Ubuntu Cinnamon][8] 团队以及其他开发者的帮助。
在与 FOSS 的对话中,其主要开发人员 Arun 强调说,该项目的重要方面是定期维护 Ubuntu 的 DDE 软件包,并帮助用户享受 DDE深度桌面环境的全部乐趣。
![Ubuntu Deepin Edition login screen][9]
Arun 还提到,这个 Ubuntu Deepin 混合项目首先是维护和打包来自上游(即 Deepin 仓库)的最新版本。然后,它最终与 Ubuntu 20.04 focal 结合,生成了一个镜像文件,每个人都可以安装,而不必麻烦地先安装常规的 Ubuntu然后再安装 Deepin Desktop。UbuntuDDE 不仅是 DDE 和 Ubuntu 的组合,而且还是 UbuntuDDE 团队软件包选择和设计变更的融合。
![UbuntuDDE screenshot][10]
与 Deepin Linux 不同UbuntuDDE 不使用 Deepin Appstore。它改用 Ubuntu 软件中心。如果你对[基于武汉的 Deepin Linux 的间谍软件标签][11]感到不满意,这将是一个好消息。
### 下载 UbuntuDDE 20.04 Beta
UbuntuDDE 的目标是与 Ubuntu 20.04 一起发布第一个正式的稳定版本。像[其他 Ubuntu 变种][12]一样UbuntuDDE 20.04 beta 也可供你下载并尝试。
警告!
一句话警告。 UbuntuDDE 是正在开发的新手项目。请不要在你的主系统上使用它。如果要尝试,请在虚拟机或备用系统中使用它。
[Download Ubuntu 20.04 DDE Beta][13]
![Installing UbuntuDDE][14]
由于本质上是 Ubuntu因此安装 UbuntuDDE 与安装 Ubuntu 相同。你可以参考本教程,其中展示了[如何在 VirtualBox 内安装 Ubuntu][15]。
我知道你可能会认为这“不是另一个 Ubuntu” 或者“只是 Ubuntu 上的 Deepin任何人都可以做”。但是我也知道有一小部分用户喜欢像 UbuntuDDE 这样的项目,这对他们来说使事情变得容易。我的意思是有许多 Ubuntu 变种出现了。你怎么看?
--------------------------------------------------------------------------------
via: https://itsfoss.com/ubuntudde/
作者:[Abhishek Prakash][a]
选题:[lujun9972][b]
译者:[geekpi](https://github.com/geekpi)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/abhishek/
[b]: https://github.com/lujun9972
[1]: https://www.deepin.org/en/dde/
[2]: https://www.deepin.org/en/
[3]: https://ubuntu.com/
[4]: https://www.debian.org/
[5]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/ubuntu-deepin-edition-screenshot.jpg?ssl=1
[6]: https://ubuntudde.com/
[7]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/ubuntu-deepin-edition-screenshot-1.jpg?ssl=1
[8]: https://itsfoss.com/ubuntu-cinnamon/
[9]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/ubuntu-deepin-edition-screenshot-5.jpg?ssl=1
[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/ubuntu-deepin-edition-screenshot-2.jpg?ssl=1
[11]: https://www.deepin.org/en/2018/04/14/linux-deepin-is-not-spyware/
[12]: https://itsfoss.com/which-ubuntu-install/
[13]: https://ubuntudde.com/download/
[14]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/ubuntu-deepin-edition-screenshot-4.jpg?ssl=1
[15]: https://itsfoss.com/install-linux-in-virtualbox/

View File

@ -0,0 +1,90 @@
[#]: collector: (lujun9972)
[#]: translator: (qfzy1233 )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (How to Create Templates in LibreOffice to Save Time and Increase Productivity)
[#]: via: (https://itsfoss.com/create-templates-libreoffice/)
[#]: author: (Dimitrios Savvopoulos https://itsfoss.com/author/dimitrios/)
如何在 LibreOffice 中创建模板以实现省时高效
======
在 [LibreOffice][1] 中为你经常使用的文档创建模板可以为你节省一些时间。它可以是信件,是财务表格抑或是简报。
模板不仅可以为你节省时间,另一方面它可以保证在同一机构内参与统一项目的小组成员文档的一致性。
举例而言,如果你是一家需要经常开具工作经验证明的企业,你可以创建一个模板,而不再需要从某个地方复制粘贴已保存的文档。当你需要开具一个新的经验证明时,你可以从模板中创建,稍微编辑一下就可以了。
LibreOffice 默认情况下提供了一些模板,但并不仅仅局限于使用这些,你可以根据自己的需求自由定制。
我认为模板是每个用户都应该了解的 [LibreOffice 基础技巧之一][2]。下面我将为你演示如何使用。
###如何在 LibreOffice 中创建一个模板
首先,创建你希望通过最少的编辑就可以重复使用的文档。它可以是文档、电子表格或演示文稿。我在示例中使用的是 word 文档,但是所有步骤都是相同的。
然后转到文件选项卡并选择存储为模板。你将被提示输入名称及选择类别,再单击保存。
![Creating a new template in LibreOffice][3]
此文件将以 .ots 格式保存在 LibreOffice 的模板文件夹中。你可以在其他安装了 LibreOffice 的系统上使用这些 .ots 文件,并在这些系统上使用相同的模板。
### 如何在 LibreOffice 中使用模板
要使用模板,请选择 “文件选项卡”,然后选择 “模板”。
不要担心! LibreOffice 在打开一个模板时会在不影响原始模板的情况下创建一个副本。你可以随意编辑文档而不必担心模板发生改动。
![Using templates][4]
选择模板后,单击打开。你就可以随意编辑了。
### 如何在LibreOffice中更改模板
我们需求可能会不时变化,所以需要对模板进行相应。
编辑一个现有的模板,单击文件>然后右键单击所需的模板,然后单击编辑。
![edit Template][5]
当您完成对模板的编辑时,单保存以使更改生效。
**推荐阅读:**
![][6]
#### [7 个高效使用 LibreOffice 的小技巧][2]
LibreOffice 是一个优秀的办公套件。这些 LibreOffice 技巧将帮助你使用时更为高效。
总之,模板不仅可以减少重复任务的工作量,还可以防止用户出错。你可以利用电脑优势来灵活的处理重复性的任务,并以此提高你的效率。
福利小贴士
你可以在[LibreOffice网站][7]上找到大量的附加模板。你可以搜索你需要的,下载并使用它们。请注意,这些模板来自第三方和未经验证的用户。所以使用它们的风险需要自己承担。
之后我会继续分享更多这样的技巧。同时,您还可以学习如何创建模板[在GNOME的右键菜单上下文中添加“创建新文档”选项][8]。
--------------------------------------------------------------------------------
via: https://itsfoss.com/create-templates-libreoffice/
作者:[Dimitrios Savvopoulos][a]
选题:[lujun9972][b]
译者:[qfzy1233](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/dimitrios/
[b]: https://github.com/lujun9972
[1]: https://www.libreoffice.org/
[2]: https://itsfoss.com/libreoffice-tips/
[3]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/1.Template-save-as.png?resize=800%2C567&ssl=1
[4]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/2.Use-a-template.png?ssl=1
[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/3.edit-template.png?ssl=1
[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2017/12/LibreOffice-logo.jpeg?fit=800%2C450&ssl=1
[7]: https://extensions.libreoffice.org/templates
[8]: https://itsfoss.com/add-new-document-option/

View File

@ -0,0 +1,92 @@
[#]: collector: (lujun9972)
[#]: translator: (geekpi)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (How to Add Multiple Time Zones in Ubuntu)
[#]: via: (https://itsfoss.com/add-multiple-time-zones-ubuntu/)
[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/)
如何在 Ubuntu 中添加多个时区
======
_**此教程展示了使用 GNOME 桌面环境在 Ubuntu 和其他发行版中为多个时区添加其他时钟的步骤。**_
如果你的家人或同事在另一个国家,或者你居住在一个有多个时区的国家,那么了解时差就变得很重要。毕竟,你不想在凌晨 4 点打电话打扰别人。
一些 Linux 用户还会加一个 [UTC 时间][1]标签,因为大多数服务器都使用 UTC。
如果你有多个时钟,那么可以更好地管理此类情况。你可以将一个时钟设置为本地时间,并将其他时钟同步到其他时区。这使得了解不同时间变得更加容易。
在本教程中,我将向你展示如何在 Ubuntu 和其他使用 GNOME 桌面环境的 Linux 发行版中添加其他时钟。
### 在 Ubuntu以及其他使用 GNOME 的 Linux中添加多个时区时钟
请[检查你正在使用的桌面环境][2]。本教程仅适用于 GNOME 桌面。
要添加其他时钟,可以使用一个叫 [GNOME Clocks][3] 的小程序。
GNOME Clocks 是一个简单的应用,它可以显示多个位置的时间和日期。你也可以使用它来设置闹钟或计时器。还包括秒表功能。
GNOME Clocks 存在于 Ubuntu 的 Universe 仓库中。因此,请确保首先[启用 Universe 仓库][4]。
你可以在软件中心中搜索 GNOME Clocks 并从那里安装它。
![Gnome Clocks Ubuntu Software Center][5]
或者,你可以打开终端并使用以下命令来安装 GNOME Clocks
```
sudo apt install gnome-clocks
```
如果你使用的是其他 Linux 发行版,那么请使用发行版的软件中心或软件包管理器来安装此程序。
安装后,请按 super 键Windows 键)并搜索 clocks
![Gnome Clocks App Search Ubuntu][6]
启动程序,你应该会看到一个提供一些选项的界面,例如添加世界时钟、设置闹钟、使用秒表和计时器。
单击左上角的 + 号,它将为你提供搜索地理位置的选项。搜索,选择并添加。
![Adding additional clocks][7]
通过地理位置添加所需的时区后,你可以看到现在在消息托盘中添加了这个新时钟。它还显示了你当地时间与其他时区之间的时差。
![Multiple clocks for multiple time zones][8]
你可以使用 Super + M 键快速打开消息托盘。你可以掌握这些[有用的 Ubuntu 快捷方式][9]来节省时间。
如果要删除其他时钟,你可以从 GNOME Clocks 应用界面执行以下操作:
![Remove Additional Clocks][10]
你无法删除当前时区并设置为其他时区。有其他方法[更改 Linux 中的当前时区][11]。
我希望你喜欢这个快速技巧。欢迎提出问题和建议。
--------------------------------------------------------------------------------
via: https://itsfoss.com/add-multiple-time-zones-ubuntu/
作者:[Abhishek Prakash][a]
选题:[lujun9972][b]
译者:[geekpi](https://github.com/geekpi)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://itsfoss.com/author/abhishek/
[b]: https://github.com/lujun9972
[1]: https://en.wikipedia.org/wiki/Coordinated_Universal_Time
[2]: https://itsfoss.com/find-desktop-environment/
[3]: https://wiki.gnome.org/Apps/Clocks
[4]: https://itsfoss.com/ubuntu-repositories/
[5]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/gnome-clocks-ubuntu-software-center.jpg?ssl=1
[6]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/gnome-clocks-app-search-ubuntu.jpg?ssl=1
[7]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/add-multiple-time-zones-gnome.jpg?ssl=1
[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/multiple-clocks-ubuntu.jpg?ssl=1
[9]: https://itsfoss.com/ubuntu-shortcuts/
[10]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/remove-additional-clocks-ubuntu.jpg?ssl=1
[11]: https://itsfoss.com/change-timezone-ubuntu/