Before we dive into that, let's understand what CentOS Stream is,CentOS Stream is a rolling-release Linux distribution that exists between Fedora Linux's upstream development and RHEL's downstream development.
It serves as a platform to experience the latest features of the Red Hat Linux ecosystem. According to the CentOS project, CentOS Stream is the future, and they are gradually shifting their development focus from CentOS Linux to CentOS Stream.
The open-source trend's main difference lies in the development model, which emphasizes the concept of community and relies on a strong open-source community. Fedora, as an upstream project, gives birth to RHEL and CentOS Linux. After undergoing version 1.0 and 2.0, CentOS Linux has evolved into version 3.0, which is known as CentOS Stream.
Now, let's explore the various methods to set up an overseas HTTP proxy on CentOS Stream:
Using Environment Variables: One way to set up an overseas HTTP proxy is by configuring the environment variables. You can set the HTTP_PROXY and HTTPS_PROXY environment variables to the proxy address and port. For example:
export HTTP_PROXY=http://proxy_server:port
export HTTPS_PROXY=http://proxy_server:port
Configuring Yum Proxy: If you want to configure the proxy for Yum, you can modify the Yum configuration file located at /etc/yum.conf. Add the following lines to the file, replacing proxy_server and port with the actual proxy details:
proxy=http://proxy_server:port
proxy_username=your_username (if required)
proxy_password=your_password (if required)
Using DNF Proxy Plugin: CentOS Stream uses DNF as the package manager. To configure the proxy for DNF, you can use the DNF plugin called dnf-plugin-proxy. Install the plugin using:
sudo dnf install dnf-plugin-proxy
Then, edit the DNF configuration file /etc/dnf/dnf.conf and add the following line:
proxy=http://proxy_server:port
Configuring Environment for System Services: To set up the proxy for system services, you can create a file named /etc/profile.d/proxy.sh and add the proxy settings there. For example:
export http_proxy=http://proxy_server:port
export https_proxy=http://proxy_server:port
Using Network Manager (GNOME Desktop): If you are using CentOS Stream with the GNOME desktop environment, you can configure the proxy settings through the Network Manager GUI. Go to Settings > Network > Network Proxy and provide the necessary proxy details.
Remember to replace proxy_server and port with the actual overseas HTTP proxy server address and port.
In conclusion, there are multiple ways to set up an overseas HTTP proxy on CentOS Stream, catering to various user preferences and system configurations.