过时文章

This commit is contained in:
Xingyu Wang 2023-06-15 17:18:23 +08:00
parent 1d7a35f21d
commit c71e69d76c
3 changed files with 0 additions and 555 deletions

View File

@ -1,238 +0,0 @@
[#]: subject: "How to Install HAProxy on Ubuntu 20.04 LTS (Focal Fossa)"
[#]: via: "https://www.linuxtechi.com/how-to-install-haproxy-ubuntu-20-04/"
[#]: author: "Pradeep Kumar https://www.linuxtechi.com/author/pradeep/"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
How to Install HAProxy on Ubuntu 20.04 LTS (Focal Fossa)
======
In this guide, we will cover how to install latest version of HAProxy on Ubuntu 20.04 LTS (Focal Fossa) step-by-step.
HAProxy is a free & open source solution for High availability and load balancing, it can also be used for proxying TCP & HTTP based applications. HAProxy can be installed and configured on Linux, Solaris & FreeBSD. HAProxy is best recommended solution for the websites which has huge traffic as it improves performance & reliability of the server by means of load balancing the servers & using its high availability capabilities.
HAProxy is used by a number of most popular websites including GitHub, Bitbucket, Stack Overflow, Reddit, Tumblr, Twitter and it is also used in the OpsWorks product from Amazon Web Services.
##### Prerequisites
* Minimal Installed Ubuntu 20.04 System
* Local User with sudo rights
* Internet connectivity
Without any further delay, lets deep dive into HAProxy installation steps.
### Step 1) Install Updates
Login to Ubuntu 20.04 system and install all the available updated using beneath apt command,
```
$ sudo apt update
$ sudo apt upgrade -y
```
Once all the updates are installed, reboot the system once.
```
$ sudo reboot
```
### Step 2) Install latest HAProxy
HAProxy package is available in the default package repositories but it is not the latest and stable version. So to install latest version, enable HAProxy PPA, run
```
$ sudo apt install software-properties-common
$ sudo add-apt-repository ppa:vbernat/haproxy-2.6 -y
```
Now, run following apt command to install haproxy
Note: At the time of writing this article, HAProxy 2.6 is available via PPA.
```
$ sudo apt update$ sudo apt install haproxy -y
```
To verify the haproxy version, run
```
$ haproxy -v'
```
![Haproxy-version-check-ubuntu][1]
Haproxy service starts automatically when we install haproxy package. To validate the haproxy service status, run following
```
$ sudo systemctl status haproxy
```
output,
![Haproxy-Service-Status-Ubuntu-20-04][2]
### Step 3) Configure HAProxy
Now we have haproxy ready. For purpose of this guide, we will configure HAProxy to load balance the requests from a mail server & a web server.
##### Load balancing a Mail server with HAProxy
For this example, we will be using two SMTP servers with the IP adresse 192.168.1.10 & 192.168.1.20 respectively.
The IP address for haproxy server is 192.168.1.100.
We will now make the changes to main HAProxy configuration file i.e. /etc/haproxy/haproxy.cfg and then make the configuration changes for load balancing the two SMTP servers,
Before making the changes, take backup of its configuration file using cp command.
```
$ sudo cp /etc/haproxy/haproxy.cfg /etc/haproxy/haproxy.cfg-org
```
Now the make the changes, add the following **frontend** & **backend** section at the end of the file.
```
$ sudo vi /etc/haproxy/haproxy.cfg
-------------------------------
frontend front_smtp
     bind *:25
    mode tcp
    default_backend back_smtp
backend back_smtp
    mode tcp
    balance roundrobin
    server smtp1 192.168.1.10:25 check
    server smtp2 192.168.1.20:25 check
```
Here most of the options have been set by default, main things to change here are **frontend** & **backend** sections.
frontend front_smtp
bind *:25
mode tcp
default_backend back_smtp
Here we have defined a name for frontend i.e. front_smtp & have asked to take all the request from port 25 with bind parameter, laslty we have mentioned the backend section with the name back_smtp where all the requests will be distributed.
backend back_smtp
mode tcp
balance roundrobin
server smtp1 192.168.1.10:25 check
server smtp2 192.168.1.20:25 check
In this section, we have established a name for backend i.e. back_smtp & mode for the transmission will be tcp load balancing method to be used is **roundrobin**. Other load balancing methods that can be used are **Weighted round robin**, **Dynamic round robin algorithm**,**Least connection algorithm**, Source. Lastly we have mentioned the server addresses for both SMTP servers.
Once the changes have been made, save the file & restart the haproxy service to implement the changes,
```
$ sudo systemctl restart haproxy
```
Our Haproxy server is now ready to work as load balancer for mail server. Now rather than using the SMTP server addresses, we need to use the server address for HAPROXY i.e. 192.168.1.100:25 for haproxy loadbalancing to work.
To check out if the load balancing for our smtp server is working we can use telnet,
Output of telnet command should be something like below:
```
$ telnet 192.168.1.100 25
Trying 192.168.1.100..
Connected to 192.168.1.100.
Escape character is ^].
220 smtp1.linuxtechi.com ESMTP Postfix
```
Now again run the telnet command,
```
$ telnet 192.168.1.100 25
Trying 192.168.1.100..
Connected to 192.168.1.100.
Escape character is ^].
220 smtp2.linuxtechi.com ESMTP Postfix
```
Notice the change in the server of the mail servers in both the outputs, which shows that the load balancing is working fine. Now lets discuss a harpoxy example for load balancing a web server.
##### Load balancing a Web server with HAProxy
Same file will be edited /etc/haproxy/haproxy.cfg. We will be using two web servers (192.168.1.10 & 192.168.1.20) on backend.  IP address for the haproxy server is 192.168.1.100.
Open the haproxy main configuration file and append following changes at the end of file
```
$ sudo vi /etc/haproxy/haproxy.cfg
------------
frontend www-http
  bind *:80
    mode http
    default_backend apache
backend apache
    mode http
    balance roundrobin
     server web1 192.168.1.10
    server web2 192.168.1.20
```
Save the file & restart the haproxy service to implement the changes,
```
$ sudo systemctl restart haproxy
```
To test out if the load balancing is working, we can place two different web pages on both server. Like for example, we can modify index.html on Webserver 1,
```
[[email protected] ~]$ sudo vi /var/www/html/index.html
This is WEB SERVER 1
```
& similarly on Web server 2, we can edit the index.html to say,
```
[[email protected] ~]$ sudo vi /var/www/html/index.html
This is WEB SERVER 2
```
Dont forget to restart the web service to implement the changes that have been made.
Now, use the haproxy IP address, 192.168.1.100 & access it using a web browser.
![Web1][3]
Every time we refresh the browser, we should the alternating web pages from both web servers.
![web2][4]
This shows that our webserver load balancing also working fine. Thats all from from this guide, I hope, you have successfully installed HAProxy on Ubuntu 20.04 LTS (Focal Fossa). Please feel free to send in your queries or suggestions using the comment box below.
--------------------------------------------------------------------------------
via: https://www.linuxtechi.com/how-to-install-haproxy-ubuntu-20-04/
作者:[Pradeep Kumar][a]
选题:[lkxed][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.linuxtechi.com/author/pradeep/
[b]: https://github.com/lkxed
[1]: https://www.linuxtechi.com/wp-content/uploads/2017/12/Haproxy-version-check-ubuntu.png
[2]: https://www.linuxtechi.com/wp-content/uploads/2017/12/Haproxy-Service-Status-Ubuntu-20-04.png
[3]: https://www.linuxtechi.com/wp-content/uploads/2017/12/Web1.jpg
[4]: https://www.linuxtechi.com/wp-content/uploads/2017/12/web2.jpg

View File

@ -1,79 +0,0 @@
[#]: subject: "Drupal 10 is worth a fresh look"
[#]: via: "https://opensource.com/article/22/12/drupal-10-fresh-look"
[#]: author: "Martin Anderson-Clutz https://opensource.com/users/mandclu"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Drupal 10 is worth a fresh look
======
The popular Drupal open source content management system (CMS) reaches a significant milestone when version 10 is released on December 14. Personally, I think Drupal X sounds way cooler, but so far, my calls to name it that haven't gotten much traction. I enlisted the help of my friend Aaron Judd of [Northern Commerce][1] to give us a sense of how cool Drupal X could look:
![New Drupal 10 racing 10 logo][2]
### What's a Drupal, anyway?
Drupal is an open source CMS and development framework. While other CMS options focus on simple long-form content (think blogs) or entirely free-form content (like in Wix or Squarespace), Drupal has made a name for itself in handling more complex content architectures, in multiple languages, with robust content governance. Drupal sites (like this site, Opensource.com!) benefit from a strong role-based access control (RBAC) system, unlimited custom roles and workflows, and a powerful and extensible media library.
Here's a rundown for anyone who hasn't kept tabs on what's coming in the newest major version.
### A fresh face
Most Drupal sites use custom themes to give them a unique look and feel. Still, the initial experience you have when installing a CMS matters. In Drupal, themes define the look and feel of a site, and you can use different themes for public and administrative experiences. Until recently, the Bartik and Seven themes had been the default face of Drupal for more than a decade. To put that in context, when Bartik was released, the most popular browser in the world was Internet Explorer 8. A lot has changed since then, particularly around best practices for building websites.
In fact, a significant change in Drupal 10 will be the removal of support for Internet Explorer (IE), which is itself no longer supported by Microsoft and hasn't seen major updates since 2013. That may not sound like an improvement, but continued support for IE kept the community from adopting modern markup and styling. For example, thanks to being unencumbered by support for legacy browsers, Drupal 10 includes a new responsive grid layout that's so innovative it got a writeup in [CSS Tricks][3].
![Responsive grid configuration][4]
The new faces of Drupal are two brand new themes: Olivero for visitors and Claro for admins. In addition to being fresh and modern designs, both were developed with accessibility as a top priority.
### Improvements under the hood
More than a decade ago, the Drupal community decided to "Get Off the Drupal Island." That meant adopting solutions shared across popular projects and frameworks instead of ones developed and maintained exclusively by the Drupal community. Today Drupal leverages a variety of projects and libraries whose names will be familiar to open source developers who have never touched Drupal: Symfony, Composer, CKEditor, Twig, Nightwatch, and more.
That has brought a variety of powerful capabilities to Drupal and allowed it to contribute back to those solutions, benefitting a broader set of developers. It has also become a determining factor for the cadence of Drupal's major version releases.
To illustrate, consider that Drupal 7 was released in early 2011. Drupal 8 was released almost five years later, towards the end of 2015. Drupal 9 was released in June of 2020, with a key motivator being the move to supported versions of underlying dependencies and removing deprecated code. And now, roughly two and half years later, we're already planning to release Drupal 10. This new major version will leverage updated versions of PHP, Symfony, and Composer, among others.
### An all-new editor
An upgrade of particular note is the move to CKEditor 5. Although notionally an incremental update, under the hood CKEditor 5 was completely rewritten, much the same as the transition from Drupal 7 to 8. In addition to a sleeker interface, CKEditor 5 has the potential for exciting new capabilities, such as real-time collaboration. Drupal's CKEditor integration for version 5 has already been augmented with a number of UI enhancements. For example, media placed within content can be configured using an overlaid toolbar ribbon instead of needing to launch a modal dialog to access these settings. Also, the styles dropdown now includes a preview of each type available.
![Real-time collaboration][5]
### A look ahead
Earlier in 2022, Drupal creator and project lead Dries Buytaert announced a focus on "ambitious site builders." This means that while the community will continue to work on making the developer experience better in general, moving forward there is a particular focus on making it easier to create engaging experiences in Drupal without having to write code or use command-line tools. Three strategic initiatives embody this new focus: Automatic Updates, the Project Browser, and Recipes.
**Automatic Updates** will reduce the total cost of ownership for Drupal sites and help them be more secure by ensuring they always have the latest core security patches. This will be a major benefit for site owners and Drupal development teams everywhere. However, judging by personal experience, Wednesday night pizza sales may take a hit (traditionally, the Drupal security team releases updates on the third Wednesday of the month). There is now a stable release of Automatic Updates as a contrib module. Work has begun to move this into Drupal core, so all Drupal sites will eventually be able to leverage this capability.
The **[Project Browser][6]** makes Drupal sites easier to build, maintain, and evolve by allowing site builders to search and browse through a subset of Drupal's vast catalog of available modules, prefiltered to the site's Drupal version, for security, stability, and more. A site builder can select, download, and install a module without leaving the site's web interface. In fact, there's an "app store" like interface meant to promote the most popular modules available that are compatible with the current site's version of Drupal. While other CMS options have had similar offerings, this advancement means you don't need to sacrifice ease-of-use to take advantage of the power of Drupal. Also, all of the thousands of modules listed are 100% free.
For many years Drupal has had a concept of distributions. These are opinionated versions of Drupal designed to meet specific use cases such as media publishing, fundraising, intranet portals, and more. While distributions have proven an excellent way to accelerate initial development, in practice, they have been known to require significant work to maintain and create extra work for site owners during maintenance. The **Recipes** initiative aims to make more granular, composable functionality available when building a site. Want to add a staff directory, events calendar, or locations map to your site? In the future, this will be as easy as installing a recipe and then customizing it to meet your site's specific needs.
### It's an exciting time to try Drupal
Drupal 10 is the culmination of work contributed by thousands of dedicated and talented community members worldwide. If you're not already using Drupal, we hope you'll try it out for your next project. There's a common saying among Drupalists: "Come for the code, stay for the community."
--------------------------------------------------------------------------------
via: https://opensource.com/article/22/12/drupal-10-fresh-look
作者:[Martin Anderson-Clutz][a]
选题:[lkxed][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/mandclu
[b]: https://github.com/lkxed
[1]: https://www.northern.co/
[2]: https://opensource.com/sites/default/files/2022-12/DrupalX-RacerSticker-DrupalBlue-300ppi.png
[3]: https://css-tricks.com/an-auto-filling-css-grid-with-max-columns
[4]: https://opensource.com/sites/default/files/2022-11/responsive-grid-config.png
[5]: https://opensource.com/sites/default/files/2022-11/realtime-collaboration_0.gif
[6]: https://www.drupal.org/project/project_browser

View File

@ -1,238 +0,0 @@
[#]: subject: "10 Things to Do after Installing Fedora 38 Workstation"
[#]: via: "https://www.debugpoint.com/10-things-to-do-fedora-38-after-install/"
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
[#]: collector: "lkxed"
[#]: translator: " "
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
10 Things to Do after Installing Fedora 38 Workstation
======
**We are presenting our traditional Fedora release article “10 Things to Do After Installing Fedora 38”, with post-install tweaks.**
This post-install guide is primarily for Fedora 38 workstation edition. These tips are not ideal for all. But it should be a good starting for all types of Fedora user base. Here are the ten things you can do after installing Fedora 38 Workstation Edition (GNOME).
### 10 things to do after installing Fedora 38 (GNOME Edition)
#### 1. Update DNF Configuration
If you are a long-time Fedora user, you might know that dnf the default Fedora package manager is sometimes slow. This is because of some default configurations which were set.
To make it faster, you can change several settings. Here are some of them.
Open a terminal window and open the dnf configuration file via the default text editor.
```
sudo gnome-text-editor /etc/dnf/dnf.conf
```
Add the following line at the end of the file and save/close. This allows dnf to download that many packages in parallel. You can use any value from 3 to 20.
```
max_parallel_downloads=10
```
![Updating dnf configuration][1]
#### 2. Switch to a faster dnf mirror
In addition to the above change, in the same dnf configuration file, add the following line at the end:
```
fastestmirror=True
```
Save and close the text editor. This is sufficient to make the dnf app performance faster.
#### 3. Update your system
Once you make the above changes, its a good idea to refresh your system. This is to ensure that you have all the latest packages and modules before you start using them or making further changes.
To do that, you can open the Software app and hit check for updates.
Or, I would recommend you open a terminal and run these simple commands.
```
sudo dnf update && sudo dnf upgrade
```
![dnf update][2]
#### 4. Learn to use new version dnf5
The new and advanced version of dnf package manager dnf5 is included in the official Fedora 38 repo. It will be available by default from the next release onwards.
However, you can install it today and take advantage of the fastest dnf ever. Heres how you can install it.
```
sudo dnf install dnf5 dnf5-plugins
```
![Installing dnf5][3]
After installation, you can start using `dnf5` instead of `dnf` from the command line. You can check man pages dnf5 help for more commands.
**A few points you should note before using dnf5:**
- **Be cautious** while using dnf5 since its not enabled by default.
- Dnf and dnf5 do not share history, or cache.
- Transactions performed by dnf and dnf5 are not visible to each other.
- The autoremove may not work correctly with dnf5 if a package is installed by dnf.
- Learn more about dnf5 commands in the [documentation][4].
#### 5. Firmware Updates
If your hardware manufacturer supports a special firmware package for Linux, you can quickly check them and get those updates via the following sequence of commands. However, it may not always be available, but it is worth trying.
```
sudo fwupdmgr refresh --forcesudo fwupdmgr get-updatessudo fwupdmgr update
```
#### 6. Enable RPM Fusion
I recommend enabling the RPM Fusion repo since it provides additional packages (including non-free ones). It would help with the future installation of several applications. The RPM Fusion is a community-contributed repo, a collection of non-free and additional packages Fedora Linux can not ship in its official ISO file due to license and other terms.
To enable RPM Fusion in Fedora 38, open a terminal and run the following commands in sequence.
```
sudo dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm
```
```
sudo dnf install https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
```
After completing the above commands, run the following to update your system.
```
sudo dnf upgrade --refreshsudo dnf groupupdate core
```
#### 7. Install GNOME Tweaks
The GNOME Tweaks is the essential application for Fedora 38 Workstation. It helps you manage many areas of your GNOME desktop, such as changing fonts, applying GTK themes, etc. To install it, open a terminal and run the following command.
```
sudo dnf install gnome-tweak-tool
```
#### 8. Explore unrestricted flathub apps
Fedora 38 pre-loads Flatpak by default. It also enables unrestricted access to all Flathub apps. All you need to do is to [enable][5] the flathub remote (which is disabled by default) using the below command.
```
flatpak remote-modify --enable flathub
```
![Flathub is pre-loaded in Fedora 38][6]
So, you can now visit Flathubs [official website][7] to install thousands of Flatpak apps. Alternatively, you can use GNOME Software to install Flathub apps.
#### 9. Install Extension Manager App
After you set up Flathub in the above step, install the most needed app, i.e. [“Extensions”][8]. It allows you to search, install and remove hundreds of GNOME extensions right from the desktop. You do not need to visit the official web page to install it.
To install the Extension app, open a terminal and run the following.
```
flatpak install org.gnome.Extensions
```
Wondering which extensions to install? Check out the next tip.
#### 10. Install these recommended GNOME Extensions
GNOME 44 in Fedora 38 brings several updates, such as background apps and more. You can extend GNOME 44 experience with more extensions.
- [Quick Settings Tweaker][9]: Add media controls, volume mixer, and remove buttons.
- [Bluetooth Quick Connect][10]: This lets you connect to paired Bluetooth devices from the quick settings.
- [Battery time][11]: Shows in `hour:minutes` the status of your battery both charging and discharging mode.
- [Avatar in quick settings][12]: Enables your user account avatar image in the quick settings.
You can also check out specific customizations of quick settings and GNOMEs top bar using the guides below.
> [Best Extensions for GNOME Quick Settings][13]
> [Best Extensions for GNOME Top Bar][14]
### Bonus Tip(s)
And finally, here are four bonus tips exclusively for you.
**11. Install Recommended Applications**
Default Fedora 38 workstation brings only default applications which are not sufficient for the functioning of the desktop. Heres a quick set of commands which enables you to install them. They include a torrent client, a good media player, a little advanced photo editor, etc.
Copy and paste these into the terminal to install.
```
sudo dnf install -y vlcsudo dnf install -y steamsudo dnf install -y transmissionsudo dnf install -y gimpsudo dnf install -y gearysudo dnf install -y dropbox nautilus-dropboxsudo dnf install -y unzip p7zip p7zip-plugins unrar
```
If you prefer Flatpaks, heres the command for that.
```
flatpak install flathub org.videolan.VLC
flatpak install flathub com.valvesoftware.Steam
flatpak install flathub com.transmissionbt.Transmission
flatpak install flathub org.gimp.GIMP
flatpak install flathub org.gnome.Geary
```
**12. Enable Battery percentage in tray (not in quick settings)**
If you want to view the battery percentage at the system tray, run the following command to show it via settings.
```
gsettings set org.gnome.desktop.interface show-battery-percentage true
```
**13. Install nice-looking fonts**
GNOME desktops default font on Fedora 38 is perfect. But if you crave more, here are some of the cool fonts you can install. After installation, you can use GNOME Tweak Tool to change.
```
sudo dnf install -y 'google-roboto*' 'mozilla-fira*' fira-code-fonts
```
**14. TLP**
Last but not least, you should install TLP if you are a Laptop user. TLP is a great utility to help optimise your Laptops battery. This utility comes with various command-line options to tweak and view reports about power consumption. All you need to do is install and forget it. It takes care of the basic power-saving optimisations. Remember not to use TLP with any other power management tweaks.
```
sudo dnf install tlp tlp-rdw
```
### Closing Notes
I hope you enjoyed reading these tips and applying some of them. So, what is your favourite must-do post-install tip? Let me know in the comment box down below!
--------------------------------------------------------------------------------
via: https://www.debugpoint.com/10-things-to-do-fedora-38-after-install/
作者:[Arindam][a]
选题:[lkxed][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.debugpoint.com/author/admin1/
[b]: https://github.com/lkxed/
[1]: https://www.debugpoint.com/wp-content/uploads/2023/04/Updating-dnf-configuration.jpg
[2]: https://www.debugpoint.com/wp-content/uploads/2020/10/dnf-update.png
[3]: https://www.debugpoint.com/wp-content/uploads/2023/04/Installing-dnf5.jpg
[4]: https://dnf5.readthedocs.io/en/latest/
[5]: https://www.debugpoint.com/fix-disabled-remote-flathub/
[6]: https://www.debugpoint.com/wp-content/uploads/2023/04/Flathub-is-pre-loaded-in-Fedora-38.jpg
[7]: https://flathub.org/
[8]: https://flathub.org/apps/details/org.gnome.Extensions
[9]: https://extensions.gnome.org/extension/5446/quick-settings-tweaker/
[10]: https://extensions.gnome.org/extension/1401/bluetooth-quick-connect/
[11]: https://extensions.gnome.org/extension/5425/battery-time/
[12]: https://extensions.gnome.org/extension/5506/user-avatar-in-quick-settings/
[13]: https://www.debugpoint.com/gnome-quick-settings-extensions/
[14]: https://www.debugpoint.com/gnome-top-bar-extensions/