1、 查看是否安装FTP:rpm -q vsftpd
2、挂载安装光盘
1)、新建一目录xxtest
2)、挂载光盘到xxtest目录:mount /dev/cdrom /root/xxtest
3)、进入挂载的目录:cd /root/xxtest/Server
3、安装FTP:[root@test1 Server]# rpm -ivh vsftpd-2.0.5-16.el5.i386.rpm
4、复制Server 整个目录到/var/ftp下:[root@test1 Server]# cp -avf ../Server /var/ftp/
5、进入FTP的目录,安装yum库的信息数据文件
[root@test1 Server]# cd /var/ftp/Server/
[root@test1 Server]# rpm -ivh createrepo-0.4.11-3.el5.noarch.rpm
6、安装成组createrepo 软件包到本目录
[root@test1 Server]# createrepo -g ./repodata/comps-rhel5-server-core.xml ./
7、重新启动vsftpd服务[root@test1 xxtest]# service vsftpd start
8、进入YUM的目录[root@test1 xxtest]# cd /etc/yum.repos.d/
9、编辑FTP文件
[root@test1 xxtest]# cd /etc/yum.repos.d/
[root@test1 yum.repos.d]# cp rhel-debuginfo.repo abc.repo
[root@test1 yum.repos.d]# vi abc.repo
[server]
name=Red Hat Enterprise Linux $releasever - $basearch - Debug
baseurl=ftp://192.168.0.30/Server
enabled=1
gpgcheck=0
然后保存,退出
10、然后重新启动网卡,登录FTP
[root@test1 yum.repos.d]# ftp 192.168.0.30
11、输入用户名:ftp,密码ftp,查看ftp目录内容ls,退出bye
12、查看yum列表:[root@test1 ~]# yum list
13、使用yum
安装httpd:yum install httpd -y
卸载httpd:yum remove httpd -y
查看yum软件组件:yum grouplist
安装Web Server 服务
yum groupinstall "Web Server"
yum groupremove "Web Server"
转载于:https://blog.51cto.com/xsh2009/1175081