Home » Linux: How to configure the proxy on Linux

Linux: How to configure the proxy on Linux

by Pring

Introduction:

This article describes How to config proxy on Linux with PuTTY.

I. Prerequisites

1. Login to your system via SSH. You can use PuTTY tool.
2. Login with root user.  If you are logged in as another user, you will need to add sudo before each command.

II. How to config proxy on Linux with PuTTY step by step.

To config proxy on Linux with PuTTY, following these steps:

Step 1. Edit profile.
Step 2. Update profile.
Step 3. Config proxy for yum.
Step 4. Config proxy for wget.

To config proxy on Linux with PuTTY as below.
[Sorry, the video we will update later]

Or you also can see details as below.

Step 1. Edit profile.

Open profile, enter the command below :

vi /etc/profile

Edit content as below :

# add follows to the end (set proxy settings to the environment variables)
YOUR_PROXY_URL="http://your-url:port/"
HTTP_PROXY=$YOUR_PROXY_URL
HTTPS_PROXY=$YOUR_PROXY_URL
FTP_PROXY=$YOUR_PROXY_URL
http_proxy=$YOUR_PROXY_URL
https_proxy=$YOUR_PROXY_URL
ftp_proxy=$YOUR_PROXY_URL
export HTTP_PROXY HTTPS_PROXY FTP_PROXY http_proxy https_proxy

Step 2. Update profile.

Enter the command below :

source /etc/profile

Step 3. Config proxy for yum.

Open yum config, enter the command :

vi /etc/yum.conf

Edit content as below :

proxy=http://your-url:port/

Step 4. Config proxy for wget.

Open yum config, enter the command :

vi /etc/wgetrc

Edit content as below :

# add to the end
http_proxy=http://your-url:port/
https_proxy=http://your-url:port/
ftp_proxy=http://your-url:port/

IV. Conclusion.

In this tutorial, we was how to config proxy on Linux with PuTTY on RHEL 7/CentOS 7 server. If you hit a problem or have feedback, leave a comment below.


How to config proxy on Linux with PuTTY is complete. Wish you success and luck.
Thanks and best regards!
— Pring —

Related Articles

Leave a Comment