Linux搭建基于FTP的YUM服务器
2015-06-14 18:49
876 查看
1、挂载光盘
mount /dev/cdrom /mnt
2、安装VSFTP服务、createrepo软件包
rpm -ivh vsftpd-2.0.5-24.el5.x86_64.rpm
rpm -ivh createrepo-0.4.11-3.el5.noarch.rpm
3、拷贝光盘内容
cp -a /mnt/* /var/ftp/pub/
4、创建YUM仓库
cd /var/ftp/pub/
createrepo .
createrepo报错如下的解决办法
解决方法:
[root@orcl1 ~]# vi /usr/share/createrepo/genpkgmetadata.py
#!/usr/bin/python2.4 --修改python -t 为 pthhon2.4
5、启动FTP服务
service vsftpd start
chkconfig vsftpd on
客户端使用yum源方法:
[root@orcl2 yum.repos.d]# pwd
/etc/yum.repos.d
[root@orcl2 yum.repos.d]# cat local.repo
[Server]
name=Red Hat Enterprise Linux 5
baseurl=ftp://192.168.120.58/pub/Server
enabled=1
gpgcheck=1
gpgkey=ftp://192.168.120.58/pub/RPM-GPG-KEY-redhat-release
[VT]
name=Red Hat Enterprise Linux 5
baseurl=ftp://192.168.120.58/pub/VT
enabled=1
gpgcheck=1
gpgkey=ftp://192.168.120.58/pub/RPM-GPG-KEY-redhat-release
[Cluster]
name=Red Hat Enterprise Linux 5
baseurl=ftp://192.168.120.58/pub/Cluster
enabled=1
gpgcheck=1
gpgkey=ftp://192.168.120.58/pub/RPM-GPG-KEY-redhat-release
[ClusterStorage]
name=Red Hat Enterprise Linux 5
baseurl=ftp://192.168.120.58/pub/ClusterStorage
enabled=1
gpgcheck=1
gpgkey=ftp://192.168.120.58/pub/RPM-GPG-KEY-redhat-release
测试 yum list!ok
mount /dev/cdrom /mnt
2、安装VSFTP服务、createrepo软件包
rpm -ivh vsftpd-2.0.5-24.el5.x86_64.rpm
rpm -ivh createrepo-0.4.11-3.el5.noarch.rpm
3、拷贝光盘内容
cp -a /mnt/* /var/ftp/pub/
4、创建YUM仓库
cd /var/ftp/pub/
createrepo .
createrepo报错如下的解决办法
解决方法:
[root@orcl1 ~]# vi /usr/share/createrepo/genpkgmetadata.py
#!/usr/bin/python2.4 --修改python -t 为 pthhon2.4
5、启动FTP服务
service vsftpd start
chkconfig vsftpd on
客户端使用yum源方法:
[root@orcl2 yum.repos.d]# pwd
/etc/yum.repos.d
[root@orcl2 yum.repos.d]# cat local.repo
[Server]
name=Red Hat Enterprise Linux 5
baseurl=ftp://192.168.120.58/pub/Server
enabled=1
gpgcheck=1
gpgkey=ftp://192.168.120.58/pub/RPM-GPG-KEY-redhat-release
[VT]
name=Red Hat Enterprise Linux 5
baseurl=ftp://192.168.120.58/pub/VT
enabled=1
gpgcheck=1
gpgkey=ftp://192.168.120.58/pub/RPM-GPG-KEY-redhat-release
[Cluster]
name=Red Hat Enterprise Linux 5
baseurl=ftp://192.168.120.58/pub/Cluster
enabled=1
gpgcheck=1
gpgkey=ftp://192.168.120.58/pub/RPM-GPG-KEY-redhat-release
[ClusterStorage]
name=Red Hat Enterprise Linux 5
baseurl=ftp://192.168.120.58/pub/ClusterStorage
enabled=1
gpgcheck=1
gpgkey=ftp://192.168.120.58/pub/RPM-GPG-KEY-redhat-release
测试 yum list!ok
相关文章推荐
- linux 无密码登录
- Linux企业运维高效技巧心得及分享
- 关于VS2015支持编译Linux程序的问题
- Linux内核与驱动开发学习总结:PCI中线初始化(十一)
- Centos7安装给firefox 安装adobe flash
- Linux各个目录的作用
- Linux "ls -l"文件列表权限详解
- LoadRunner监控Linux的三种方法
- Linux下好玩的命令
- linux ssh-keygen
- linux 常用 命令 笔记二
- 文件系统 IO 并发 一致性
- Linux 的cp命令
- Linux :: vi E212: Can't open file for writing
- Linux :: vi E212: Can't open file for writing
- Linux命令之nano -
- linux下git使用记录1 git 提交
- Linux 删除文件夹和文件的命令
- linux grep命令
- Linux内核与驱动开发学习总结:initcall 和contain_of宏(十)