`
piperzero
  • 浏览: 3480693 次
  • 性别: Icon_minigender_1
  • 来自: 杭州
文章分类
社区版块
存档分类
最新评论

linux8---rpm安装

 
阅读更多
1,安装vsftpd服务
[root@localhost Server]# rpm -ivh vsftpd-2.0.5-12.el5.i386.rpm
warning: vsftpd-2.0.5-12.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing... ########################################### [100%]
1:vsftpd ########################################### [100%]
[root@localhost Server]#
2,设置vsftpd开机启动
[root@localhost Server]# chkconfig vsftpd on
3,将RHEL 5光盘中的Server、VT、Cluster、ClusterStorage四个目录复制到/var/ftp/pub下(如不使用虚拟化及群集后三个目录可不复制)。
root@localhost cdrom]# cd /var/ftp/pub
[root@localhost pub]# ls
Cluster ClusterStorage Server VT
4,删除几个文件
[root@localhost pub]# rm -f *.html
[root@localhost pub]# rm -f Server/repodata/TRANS.TBL
[root@localhost pub]# rm -f VT/repodata/TRANS.TBL
5,安装createrepo(用于生成rpm依赖关系及组信息)包。
[root@localhost Server]# rpm -ivh createrepo-0.4.11-3.el5.noarch.rpm
warning: createrepo-0.4.11-3.el5.noarch.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing... ########################################### [100%]
1:createrepo ########################################### [100%]
6,建立分组文件
在RHEL 5中每个目录下的repodata目录下都有一个repomd.xml,该文件中就记录了rpm包的依赖关系,还有一个comps-rhel5-*.xml文件,这个文件主要记录分组情况,建立yum仓库时,需要先重建该文件.
[root@localhost pub]# createrepo -g /var/ftp/pub/Server/repodata/comps-rhel5-server-core.xml /var/ftp/pub/Server/
1336/2223 - jakarta-commons-collections-testframework-javadoc-3.2-2jpp.3.i386.rp2223/2223 - pcmciautils-014-5.i386.rpm
Saving Primary metadata
Saving file lists metadata
Saving other metadata
[root@localhost pub]# createrepo -g /var/ftp/pub/VT/repodata/comps-rhel5-vt.xml /var/ftp/pub/VT/
32/32 - Virtualization-it-IT-5.2-9.noarch.rpm
Saving Primary metadata
Saving file lists metadata
Saving other metadata
[root@localhost pub]#
7,重起FTP服务
[root@localhost pub]# service vsftpd restart
8,修改配置文件
[root@localhost ~]# vi /etc/yum.repos.d/rhel-debuginfo.repo
[rhel-debuginfo]
name=Red Hat Enterprise Linux $releasever - $basearch - Debug
baseurl=ftp://ftp.redhat.com/pub/redhat/linux/enterprise/$releasever/en/os/$basearch/Debuginfo/
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
[Server]
name=Server
baseurl=ftp://192.168.0.253/pub/Server
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
[VT]
name=VT
baseurl=ftp://192.168.0.253/pub/VT
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
[Cluster]
name=Cluster
baseurl=ftp://192.168.0.253/pub/Cluster
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
[ClusterStorage]
name=ClusterStorage
baseurl=ftp://192.168.0.253/pub/ClusterStorage
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
配置完成最好要重新导入GPGKEY 的存放地址,我们需要用下面的命令导入这个签名。才能使用这项功能,有时不做这步,没有办法安装软件。
[root@localhost ~]# rpm -import /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
安装结束!!
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics