虚拟机中在红帽的Linux 下安装yum工具

 简单的来说yum工具就相当于window下的什么360软件管家。所以说先装上yum然后装软件非常方便了。

yum工具有很多的参数可供使用,如下:
        yum install 软件名1 [软件名2] [...]
        yum update [软件名1][软件名2] [...]
        yum check-update
        yum upgrade [软件1] [软件2] [...]
        yum remove | erase 软件名1 [软件名2] [...]
        yum list [...]
        yum info [...]
        yum provides | whatprovides feature1 [feature2] [...]
        yum clean [ packages | headers | metadata | dbcache | all ]
        yum makecache
        yum groupinstall 软件组1 [软件组2] [...]
        yum groupupdate 软件组1 [软件组2] [...]
        yum grouplist [hidden] [groupwildcard] [...]
        yum groupremove group1 [group2] [...]
        yum groupinfo 软件组名 [...]
        yum search 字符串1 [字符串2] [...]
        yum shell [文件名]
        yum resolvedep 依赖关系1 [依赖关系2] [...]
        yum localinstall rpm包1 [rpm包2] [...]
        yum localupdate rpm包1 [rpm包2] [...]
        yum reinstall 软件包1 [软件包2] [...]
        yum downgrade 软件包1 [软件包2] [...]
        yum deplist 软件包1 [软件包2] [...]
        yum repolist [all|enabled|disabled]
        yum help [command]
    以上就是yum全部的可用参数了,自动分析依赖性关系是它最好的一个特点,也是目前最方便的安装方法

首先用虚拟机挂载光盘,然后

 

创建文件夹路径

 # mkdir -p /media/repo/Redhat

      #cd /media/repo/Redhat

将光盘挂载到这个路径下

Redhat#mount /dev/cdrom  /media/repo/Redhat

Redhat#cd ..

Repo#      rpm -ivh  /media/repo/Server/createrepo-0.4.11-3.e.15.noarch.rpm

Repo#vi  /etc/yum.conf

.

.

.

#gpgcheck=0

Plagins=1

[local_cdrom]

Baseurl=file:///media/repo

name=my local_cdrom

:x

Repo#createrepo -g  /media/repo/Redhat/Server/repodata/repomd.xml .

安装阿帕奇测试:

Repo#yum install httpd* -y

repo#cd /var/www/html

Html#vi index.html

Dfdfdfdf

Dfdf

:x

html#yum install vsftpd* -y

Html#cd /etc/selinux

Selinux#vi /etc/selinux/config

SELINUX=disabled

html#service httpd start

html#service vsftpd start

用客户端访问ftp://192.168.1.1      http://192.168.1.1       

 

 

posted @ 2011-11-14 20:09  java简单例子  阅读(794)  评论(0编辑  收藏  举报