ITPub博客

首页 > Linux操作系统 > Linux操作系统 > CentOS6.2 yum源搭建

CentOS6.2 yum源搭建

原创 Linux操作系统 作者:sxs1986 时间:2012-04-05 14:57:05 0 删除 编辑
CentOS6.2 yum源搭建


1、直接把光盘挂载:  mount /dev/cdrom /media

2、拷贝目录光盘文件到/var/ftp/pub目录下, 先在这里创建一个文件夹  mkdir Centos6.2

    cp /meida/*  /var/ftp/pub/Centos6.2
    
    然后将第二张光盘的Packages目录拷贝到/var/ftp/pub/Centos6.2/Packages目录下
   
3、  ftp开启 anonymous_enable=YES , 默认应是开启的

4、 客户端/etc/yum.repos.d创建一个.repo文件:

    touch Centos.repo  添加以下内容:
   
[yum-ftp]
name=base
baseurl=ftp://192.168.1.12./pub/Centos6.2/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 


----------------------先将原来的.repo文件删除或移到其它地方


接下来就可以使用yum了:

[root@test yum.repos.d]# yum install par*
Loaded plugins: fastestmirror, presto
Loading mirror speeds from cached hostfile
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package parted.x86_64 0:2.1-17.el6 will be installed
---> Package parted-devel.x86_64 0:2.1-17.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================================================
 Package                           Arch                        Version                           Repository                    Size
====================================================================================================================================
Installing:
 parted                            x86_64                      2.1-17.el6                        yum-ftp                      605 k
 parted-devel                      x86_64                      2.1-17.el6                        yum-ftp                       43 k

Transaction Summary
====================================================================================================================================
Install       2 Package(s)

Total size: 648 k
Total download size: 43 k
Installed size: 2.2 M
Is this ok [y/N]: y
Downloading Packages:
Setting up and reading Presto delta metadata
Processing delta metadata
Package(s) data still to download: 43 k
parted-devel-2.1-17.el6.x86_64.rpm                                                                           |  43 kB     00:00    
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : parted-2.1-17.el6.x86_64                                                                                         1/2
  Installing : parted-devel-2.1-17.el6.x86_64                                                                                   2/2

Installed:
  parted.x86_64 0:2.1-17.el6                                    parted-devel.x86_64 0:2.1-17.el6                                  

Complete!
[root@test yum.repos.d]

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/7685986/viewspace-720368/,如需转载,请注明出处,否则将追究法律责任。

上一篇: fusion-io 安装测试
下一篇: 没有了~
请登录后发表评论 登录
全部评论

注册时间:2012-02-19

  • 博文量
    3
  • 访问量
    12142