您当前的位置: 首页 > 

小志的博客

暂无认证

  • 0浏览

    0关注

    1217博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

yum设置临时代理

小志的博客 发布时间:2019-04-25 14:25:09 ,浏览量:0

1、问题如下:

CentOS yum时出现“Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=5&arch=i386&repo=addons error ”错误:


[root@server mysql-5.0.56]# yum install gcc
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=5&arch=i386&repo=addons error was
[Errno 4] IOError: 
Error: Cannot find a valid baseurl for repo: addons

2、出现问题原因:

公司统一通过代理上网,我在自己电脑的虚拟机上安装了Linux服务器,因此在虚拟机里面设代理,电脑ip为xxx.xxx.xxx.xx,其中http端口8080.

3、解决方式:

如果只是暂时使用代理,在命令行输入下面一条命令: export http_proxy=“http://192.168.1.XX:8080”

如果是通过ip或电脑的网卡地址认证,可忽略所有username 和 password .

转载:https://blog.csdn.net/fwj380891124/article/details/39642877/

关注
打赏
1661269038
查看更多评论
立即登录/注册

微信扫码登录

0.0390s