RHEL6.5创建本地Yum源后,发现不可用,报错如下:
[root@namenode1 html]# yum install gcc Loaded plugins: product-id, refresh-packagekit, security, subscription-manager This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register. http://192.168.1.139/cdh5/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 403 Forbidden" Trying other mirror. Error: Cannot retrieve repository metadata (repomd.xml) for repository: cdh5. Please verify its path and try again [root@namenode1 html]#
检查配置文件,也没发现错误:
[root@namenode1 html]# vi /etc/yum.repos.d/hadoop.repo [cdh5] name=cdh5 baseurl=http://192.168.1.139/cdh5/ gpgcheck=0 [cm5] name=cm5 baseurl=http://192.168.1.139/cm5/ gpgcheck=0 [os-pkg] name=os-pkg baseurl=http://192.168.1.139/os/ gpgcheck=0
通过浏览器访问,发现只有http://192.168.1.139/os/这个地址能访问,另外两个提示禁止访问。
发现packages目录权限有问题,另外两个目录权限跟os不一致,修改仅限如下后,yum命令能正常使用。
[root@namenode1 html]# chmod 755 cm5/ [root@namenode1 html]# chmod 755 cdh5/
[root@namenode1 html]# ll total 12 drwxr-xr-x 4 root root 4096 Mar 20 01:26 cdh5 drwxr-xr-x 4 root root 4096 Mar 20 19:25 cm5 drwxr-xr-x 4 root root 4096 Mar 19 22:53 os
PYCURL ERROR 22 - "The requested URL returned error: 403 Forbidden"
原文:http://www.cnblogs.com/rusking/p/5299363.html