Solution for Linux YUM unavailability in proxy surfing

Source: Internet
Author: User

Solution for Linux YUM unavailability in proxy surfing

Background:
The company's computer accesses the Internet through proxy. The next CentOS 6.5 _ 64 System in VMware, the network mode is NAT. You can ping the internet, but yum installation always reports an error, as shown in figure

Root@www.bkjia.com ~ # Yum list
Loaded plugins: fastest, refresh-packagekit, securitySetting up
Remove ProcessNo Match for argument: mysql-serverLoading mirror speeds
From cached hostfilecocould not retrieve into list
Release = 6 & arch = x86_64 & repo = OS & infra = stock error was14:
Pycurl error 7-"Failed to connect to 2a02: 2498: 1: 3d: 5054: ff: fed3: e91a:
Network is unreachable "Error: Cannot find a valid baseurl for repo: base
Root@www.bkjia.com ~ #

Solution:
Ping the proxy website on the host machine to obtain the IP address

Perform the following operations on a Linux machine:
Root@www.bkjia.com ~ # Vim/etc/profile
Root@www.bkjia.com ~ # Tail-3/etc/profile
Export http_proxy = 10.14.36.103: 8080
Export https_proxy = 10.14.36.103: 8080
Root@www.bkjia.com ~ # Source/etc/profile
Root@www.bkjia.com ~ #

Run the yum command again.

Resolved!

RedHat 6.2 modify yum source in Linux use CentOS source for free

Configure the epel yum Source

Redhat local yum source configuration

Description of yum configuration file

Install yum in RedHat 6.1)

YUM installation and cleaning

Build yum local source on CentOS 6.4

This article permanently updates the link address:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.