Centos Behind The Proxy Server In My System , How Can I Set In Terminal Proxy ( Username & Password )
When Using The Command yum & rpm online I Will Respond Error
Thank You For Your Guidance
Hi,
look at
/etc/yum.conf
here you can set a proxy with username and password for yum.
regards,
xabbu
i add too line
proxy=http://proxy_server_address:port
proxy_username=
proxy_password=
but i still have problem
[root@Centos Packages]# yum clean all
Loaded plugins: fastestmirror
Cleaning repos: base centosplus contrib extras updates
Cleaning up Everything
Cleaning up list of fastest mirrors
[root@Centos Packages]# yum update
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
YumRepo Error: All mirror URLs are not using ftp, http or file.
Eg. $releasever is not a valid and current release or hasnt been released yet/
removing mirrorlist with no valid mirrors: /var/cache/yum/x86_64/$releasever/base/mirrorlist.txt
Error: Cannot find a valid baseurl for repo: base
Hmm,
please try in the shell:
export http_proxy=http://username:password@proxyserver:port
yum update
Regards,
xabbu
[root@Centos ~]# echo $?
0
[root@Centos ~]# yum update
Loaded plugins: fastestmirror
Determining fastest mirrors
YumRepo Error: All mirror URLs are not using ftp, http or file.
Eg. $releasever is not a valid and current release or hasnt been released yet/
removing mirrorlist with no valid mirrors: /var/cache/yum/x86_64/$releasever/base/mirrorlist.txt
Error: Cannot find a valid baseurl for repo: base
ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=34 time=159 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=34 time=148 ms
Hi,
ping is not using the proxy.
Can you try to use
curl http://www.heise.de
if you closed the shell, so please run the export again.
To check
env | grep -i proxy
Regards,
xabbu
[root@Centos ~]# curl google.com | less
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
109 219 109 219 0 0 382 0 --:--:-- --:--:-- --:--:-- 732
[root@Centos ~]# echo $?
0
[root@Centos ~]# yum update
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
YumRepo Error: All mirror URLs are not using ftp, http or file.
Eg. $releasever is not a valid and current release or hasnt been released yet/
removing mirrorlist with no valid mirrors: /var/cache/yum/x86_64/$releasever/base/mirrorlist.txt
Error: Cannot find a valid baseurl for repo: base
please add a '/' at the end of the proxy line.
[root@Centos ~]# yum clean all
Loaded plugins: fastestmirror
Cleaning repos: base centosplus contrib extras updates
Cleaning up Everything
Cleaning up list of fastest mirrors
[root@Centos ~]# yum update
Loaded plugins: fastestmirror
Determining fastest mirrors
YumRepo Error: All mirror URLs are not using ftp, http or file.
Eg. $releasever is not a valid and current release or hasnt been released yet/
removing mirrorlist with no valid mirrors: /var/cache/yum/x86_64/$releasever/base/mirrorlist.txt
Error: Cannot find a valid baseurl for repo: base
Hmm,
can you show me the output of
cat /etc/redhat-release
please?
cat /etc/redhat-release
CentOS release 6.5 (Final)
Is you proxy requires NTLM authentification?
And show me the output of
yum -d 10 update
please.
Yes , Is proxy Kerio
Loading "fastestmirror" plugin
Config time: 0.018
Running "init" handler for "fastestmirror" plugin
Yum Version: 3.2.29
COMMAND: yum -d 10 update
Installroot: /
Setting up Package Sacks
Running "postreposetup" handler for "fastestmirror" plugin
Loading mirror speeds from cached hostfile
YumRepo Error: All mirror URLs are not using ftp, http or file.
Eg. $releasever is not a valid and current release or hasnt been released yet/
removing mirrorlist with no valid mirrors: /var/cache/yum/x86_64/$releasever/base/mirrorlist.txt
Error: Cannot find a valid baseurl for repo: base
Am I'm right you need to install �cntlm� for authentification against NTML proxies.
/etc/yum.conf
if the ntlm is not . is the algorithm is required for proxy password ?!
No, because it is http auth basic.
Regards
xabbu
if a username is mn & password is acacac
is this the right form ?
export proxy_http=mn:acacac@192.168.10.15:8090
I pass now Proxy
# curl yahoo.com | less
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
102 1939 0 1939 0 0 4194 0 --:--:-- --:--:-- --:--:-- 4196
<!DOCTYPE html>
<html lang="en-us"><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<title>Yahoo</title>
<meta name="viewport" content="width=device-width,initial-scale=1,minimal-ui">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<style>
html {
height: 100%;
}
body {
background: #fafafc url(https://s.yimg.com/nn/img/sad-panda-201402200631.png) 50% 50%;
background-size: cover;
height: 100%;
text-align: center;
font: 300 18px "helvetica neue", helvetica, verdana, tahoma, arial, sans-serif;
}
table {
height: 100%;
but an error accors
Loading "fastestmirror" plugin
Config time: 0.018
Running "init" handler for "fastestmirror" plugin
Yum Version: 3.2.29
COMMAND: yum -d 10 update
Installroot: /
Setting up Package Sacks
Running "postreposetup" handler for "fastestmirror" plugin
Loading mirror speeds from cached hostfile
Error: Cannot find a valid baseurl for repo: base
YumRepo Error: All mirror URLs are not using ftp, http or file.
Eg. $releasever is not a valid and current release or hasnt been released yet/
removing mirrorlist with no valid mirrors: /var/cache/yum/x86_64/$releasever/base/mirrorlist.txt
thanks
Did you add the same username and password to the yum.conf file?
Not in the form of added
proxy=http://192.168.10.15:8090/
proxy_username=mn
proxy_password=acacac
is it right ?
Yes, right