linux 配置本地yum(ftp)
来源:互联网 发布:数据画像 编辑:程序博客网 时间:2024/05/01 14:19
Yum介绍
Yum全称为 Yellow dog Updater, Modified(软件包管理器)
主要功能是更方便的添加/删除/更新RPM包, yum很好的解决了linux下面安装软件包的依赖性关系。很强大哦! 他能便于管理大量系统的更新问题 ,能同时设置多个资源库(Repository),而且使用起来十分的方便。
详细讲解如何在RHEL5.4上面配置仓库的方法
我们利用FTP的方式来制作yum的安装源
1、安装ftp包及YUM包(默认路径/var/ftp/pub)
root@localhost Server]# cp vsftpd-2.0.5-16.el5.i386.rpm /tmp/
[root@localhost Server]# cd /tmp/
[root@localhost tmp]# ls
vsftpd-2.0.5-16.el5.i386.rpm
[root@localhost tmp]#
由于yum仓库还没有配置,可以用rpm的方式来安装ftp。
[root@localhost tmp]# rpm -ivh vsftpd-2.0.5-16.el5.i386.rpm
warning: vsftpd-2.0.5-16.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing... ########################################### [100%]
1:vsftpd ########################################### [100%]
FTP服务就安装成功了。
2、启动ftp
[root@localhost ~]# service vsftpd restart
Shutting down vsftpd: [ OK ]
Starting vsftpd for vsftpd: [ OK ]
3、将解压光盘中的四个目录拷贝至ftp默认目录/var/ftp/pub
[root@localhost ~]# cd /media/RHEL_5.4\ i386\ DVD
[安装完FTP服务以后。默认会产生一个/var/ftp/pub的目录。
[root@localhost ~]# cd /var/ftp/pub/
[root@localhost pub]# ls
Cluster ClusterStorage Server VT
可以看到,在/var/ftp/pub目录下面已经有了这四个文件夹
现在启动一下ftp服务
4、yum库配置文件来配置yum仓库
Yum仓库在/etc/yum.repod目录下面,(文件名必须以.repo结尾)
[root@localhost ~]#
[root@localhost ~]# cd /etc/yum.repos.d/
[root@localhost yum.repos.d]# ls
rhel-debuginfo.repo
[root@localhost yum.repos.d]#
在/etc/yum.repos.d这个目录里面有一个rhel-debuginfo.repo的模板文件,
可以按照这个文件里面的内容来配置yum仓库。www.linuxidc.com
我们可以按照这个里面的内容来编写。
[Server]
name=Red Hat Enterprise Linux Server
baseurl=ftp://192.168.0.254/pub/Server
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-RedHat-release
[Cluster]
name=Red Hat Enterprise Linux Cluster
baseurl=ftp://192.168.0.254/pub/Cluster
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-RedHat-release
[ClusterStorage]
name=Red Hat Enterprise Linux ClusterStorage
baseurl=fttp://192.168.0.254/pub/ClusterStorage
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-RedHat-release
[VT]
name=Red Hat Enterprise Linux VT
baseurl=fttp://192.168.0.254/pub/VT
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-RedHat-release
这个就是整个yum仓库的配置内容。
下面讲解yum仓库中每一行的意义
[Server]
这个是指仓库的名称,可以随意命名,但是每个仓库的名字不要重复
Name
这个只是对仓库进行的一个描述,也可以随意些,但要有意义
Baseurl
这个很重要,这个是指定路径,可以用file,ftp,http 用后面两个必
须开启相应的服务。File可以用来做本地仓库。一定要保证路径可达
Enabled=0 or 1
这个相当于开关,如果等于1,代表开启。0则关闭,开启是指是否要去读这个文件,关闭则不去读这个文件
Gpgcheck=0 or 1
与上面一样。是指安装软件包的时候检查数字签名,检查软件包的完整性。
Gpgkey
开启gpgcheck后,通过gpgkey来指定,相应的gpg文件
如果不指定gpgkey文件,那么就必须手动的导入相应的gpg文件,
Rpm –import /etc/pki/rpm-gpg/RPM-GPG-KEY-redehat-release
必须手动的敲入这条命令。
RHEL发行版安装好后会将相应的gpgkey放在/etc/pki/rpm-gpg目录下面。
Yum仓库中每一行参数都已经介绍完毕了
- linux 配置本地yum(ftp)
- linux配置本地yum
- linux——(7)基于redhat6.4的本地yum和ftp yum源配置
- Linux配置本地yum源
- Linux配置YUM本地源
- Linux 6.2配置yum本地
- Linux YUM本地源配置
- linux配置yum本地源
- linux本地yum源配置
- Linux本地yum源配置
- Linux本地yum源配置
- linux配置本地yum源
- Linux配置本地yum源
- Linux配置本地yum源
- Linux配置本地yum源
- Linux配置yum仓库,部署FTP
- Redhat6.4 配置本地网络的FTP YUM源
- RedHat linux配置yum本地资源
- 用户profile中umask码的含义详解(default022)
- 用ssh-keygen来设置ssh无密码登录
- 双绞线(网线)分类、线序等
- Linux time命令
- Linux双网卡绑定一个IP原理及实现
- linux 配置本地yum(ftp)
- Linux中如何让进程在后台运行
- Apache Ant
- Linux Tee
- Informatica-Powercenter VS IBM-DataStage 主流ETL工具选型
- IOSTAT
- Exadata Machine Summary
- LOG_ARCHIVE_FORMAT %r%s%t
- 监听动态与静态注册