利用CentOS-6.0光盘安装软件

在家里的电脑上安装CentOS-6.0 时为了图快,很多软件包都没有安装上,今天想试下ruby结果发现默认没装上,本想从网上下载ruby进行安装,又一想CentOS-6.0-i386- bin-DVD.iso镜像光盘上应该有,毕竟那可是个4.38G的大家伙,不利用太浪费了,就直接安装这个iso上面提供的ruby.rpm包,于是有了这篇小文。 首先,查看光盘的挂载位置,后面会用到: 1 2 3 4 [root @localhost ~]# mount ... /dev/sr0 on /media/CentOS_6.0_Final type iso9660 (ro,nosuid,nodev,uhelper=udisks,uid=0,gid=0,iocharset=utf8,mode=0400,dmode=0500) [root @localhost ~]# 接着,进入到yum源目录,把原本的yum源文件备份起来,并建立我们自己的本地yum源: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 [root @localhost yum.repos.d]# cd /etc/yum.repos.d/ [root @localhost yum.repos.d]# mkdir backup [root @localhost yum.repos.d]# ls backup CentOS-Base.repo CentOS-Debuginfo.repo CentOS-Media.repo [root @localhost yum.repos.d]# cp * ./backup/ cp: omitting directory `backup' [root @localhost yum.repos.d]# vi local.repo [local] name=Local Centos baseurl=file:///media/CentOS_6.0_Final gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 [root @localhost yum.repos.d]# rm -f CentOS-* [root @localhost yum.repos.d]# ls backup local.repo 最后,刷新yum并搜索、安装ruby: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 [root @localhost yum.repos.d]# yum clean all Loaded plugins: fastestmirror, refresh-packagekit Cleaning up Everything Cleaning up list of fastest mirrors [root @localhost yum.repos.d]# yum search ruby Loaded plugins: fastestmirror, refresh-packagekit Determining fastest mirrors local | 3.7 kB 00:00 ... local/primary_db | 3.3 MB 00:00 ... ========================================== Matched: ruby =========================================== ruby-devel.i686 : A Ruby development environment ruby-docs.i686 : Manuals and FAQs forscripting language Ruby ruby-irb.i686 : The Interactive Ruby ruby-libs.i686 : Libraries necessary to run Ruby ruby-rdoc.i686 : A tool to generate documentation from Ruby source files ruby-ri.i686 : Ruby interactive reference ruby-static.i686 : Static libraries forRuby development environment ruby-tcltk.i686 : Tcl/Tk interface forscripting language Ruby rubygem-flexmock.noarch : Mock object library forruby rubygem-flexmock-doc.noarch : Documentation forrubygem-flexmock rubygem-rake.noarch : Ruby based make-like utility rubygems.noarch : The Ruby standard forpackaging ruby libraries graphviz-ruby.i686 : Ruby extension forgraphviz libselinux-ruby.i686 : SELinux ruby bindings forlibselinux openwsman-ruby.i686 : Ruby bindings foropenwsman client API rrdtool-ruby.i686 : Ruby RRDtool bindings ruby.i686 : An interpreter of object-oriented scripting language ruby-qmf.i686 : The QPID Management Framework bindings forruby ruby-qpid.i686 : Ruby language client forAMQP ruby-saslwrapper.i686 : Ruby bindings forsaslwrapper. subversion-ruby.i686 : Ruby bindings to the Subversion libraries ruby-flexmock.noarch : Non-Gem support package forflexmock bsf.noarch : Bean Scripting Framework glade3.i686 : User Interface Designer forGTK+ and GNOME python-elixir.noarch : A declarative mapper forSQLAlchemy python-webhelpers.noarch : Helper library foraiding the writing of web templates in Python saslwrapper.i686 : Ruby and Python wrappers forthe cyrus sasl library. [root @localhost yum.repos.d]# yum install ruby-devel.i686 [root @localhost yum.repos.d]# yum install ruby-irb.i686

你可能感兴趣的:(利用CentOS-6.0光盘安装软件)