使用sohu的网络yum源操作步骤

一,下载yum的repo文件:

   yum -y install wget

cd /etc/yum.repos.d/

wget http://mirrors.sohu.com/help/CentOS-Base-sohu.repo


二,将其他的配置文件改名设置备份

  mv CentOS-Base.repo CentOS-Base.repo.bak


三,测试yum源可用性

  yum list | wc -l

显示5313个包即为配置正确



配置sohu的网络yum源常见报错:

一,路径错误:

[[email protected] ~]# yum list | wc -l

http://mirrors.sohu.com/centos/6/addons/i386/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"

Trying other mirror.

http://ftp.jaist.ac.jp/pub/Linux/CentOS/6/addons/i386/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"

Trying other mirror.

解析:

此为配置路径错误

解决办法:

cd /etc/yum.repos.d/

vim  CentOS-Base-sohu.repo

找到addons修改为os即可

然后执行

yum makecache

问题解决。

二,进程占用

[[email protected] yum.repos.d]# yum clean all

Loaded plugins: fastestmirror

Existing lock /var/run/yum.pid: another copy is running as pid 1224.

Another app is currently holding the yum lock; waiting for it to exit...

The other application is: yum

Memory :  14 M RSS (142 MB VSZ)

Started: Tue Jul 19 19:41:24 2016 - 00:12 ago

State  : Traced/Stopped, pid: 1224

Another app is currently holding the yum lock; waiting for it to exit...

The other application is: yum

Memory :  14 M RSS (142 MB VSZ)

Started: Tue Jul 19 19:41:24 2016 - 00:14 ago

State  : Traced/Stopped, pid: 1224

^Z

解决办法:

使用kill -9 强制杀死对应进程

kill -9 1224

问题解决

时间: 2024-12-10 01:25:37

使用sohu的网络yum源操作步骤的相关文章

修改yum源操作步骤

1.备份原有的yum源 2.下载新的yum源,下载地址如下,并根据自己的需求选择版本 3.打开文件操作界面,可以把我们下载在Window下的文件上传到Linux下 4.将下载好的Centos-6.repo文件上传到Linux下的/etc/yum.repos.d/这个目录下 5.进入到/etc/yum.repos.d/这个目录下,查看刚才上传的文件是否存在 6.生成本地缓存,到此操作已完成

CentOS 6.6下配置本地yum源与网络yum源

一.本地yum源 1.系统默认已经安装了可使用yum的软件包,所以可以直接配置: [[email protected] ~]# cd /etc/yum.repos.d/                         yum源配置文件放置目录 [[email protected] yum.repos.d]# mv CentOS-Base.repo CentOS-Base.repo.bak    先将网络yum源        配置文件更名(让其失效) [[email protected] yum

CentOS 6.5下本地yum源与网络yum源的配置使用

一.本地yum源 1.系统默认已经安装了可使用yum的软件包,所以可以直接配置: [[email protected] ~]# cd /etc/yum.repos.d/                         yum源配置文件放置目录 [[email protected] yum.repos.d]# mv CentOS-Base.repo CentOS-Base.repo.bak    先将网络yum源        配置文件更名(让其失效) [[email protected] yum

网络yum源的搭建

# 在网络yum源的搭建的前提是,必须首先先搭建本地yum,本地yum搭建好之后,创建软件仓库, 就可以安装httpd,vstpd软件//这两种软件搭建好之后就可以将客户端的路径指向服务端了, 之后就可以安装软件了, 操作步骤:  # 首先搭建本地yum 1.  检查有没有挂载的挂载点 umount /dev/cdrom 2. 将cdrom挂载到本地 mount /dev/cdrom /mnt/ 3. 创建一个目录.将挂载的软件包复制到这个目录里 mkdir  /opt/abc cp -rf /

做一个公共的网络yum源

一.网络YUM源   使用163 yum源 1.进入http://mirrors.163.com/.help/centos.html网站下载相对应的yum文件( CentOS7 CentOS6 CentOS5)CentOS-Base-163.repo, 放入/etc/yum.repos.d/    2.运行yum makecache生成缓存 3.yum search softwarename 查找软件 4.yum list softwarename 列出已装软件 5.yum install so

RHEL配置网络yum源

RHEL6.5系统配置网络Yum源概述 1.配置本地yum源: 将光盘镜像文件挂载到/mnt目录下#mount /dev/cdrom /mnt; 修改/etc/yum.repo.d/目录下的配置文件,删除或重命名其他的.repo文件,创建新的local.repo文件,内容如下: [local] name=local DVD baseurl=file:///mnt enabled=1 gpgcheck=0 2.利用本地yum源安装wget下载工具: #yum install wget -y 3.利

Linux:网络yum源设置

网络yum源,最大的网易(163)算是一个,无论是速度还是软件版本,都非常的不错,将yum源设置为163yum,可以提升软件包安装和更新的速度,同时避免一些常见软件版本无法找到.具体设置方法如下: 1.进入yum源配置目录 [[email protected] ~]# cd /etc/yum.repos.d/ 2.备份系统自带的yum源 [[email protected] yum.repos.d]# mv CentOS-Base.repo CentOS-Base.repo.bk 下载163网易

配置网络yum源

有的时候服务器需要下载一些软件,是本地yum源没有的,这时候需要配置网络yum源 #cd  /etc/yum.repos.d/ 把这个目录下的配置文件备份,改名:或者是把文件里边的enabled=1的改为enabled=0: # wget -O /etc/yum.repos.d/CentOS-Base.repo   http://mirrors.aliyun.com/repo/Centos-6.repo # sed -i  's/$releasever/6/g' /etc/yum.repos.d

如何通过网络yum源安装Mysql

近日想在本地搭建Mysql的环境,准备工作和安装过程如下: 1.  软件环境: CentOS 7 Mysql 5.6 2.  linux环境安装方式比较: 安装方式 优点 缺点 源码包编译安装 可量身定制软件的功能模块: 源码编译可选参数多,易出错: 编译安装过程耗时较长: 不具备软件管理功能: RPM安装(Redhat Package Manager) 提供软件管理功能,安装.升级.卸载: 操作方便.快捷: 包间依赖: yum安装(Yellow dog Updater,Modified) 支持