Your Ad Here
首页 | 编程语言 | 网站建设 | 游戏天堂 | 冲浪宝典 | 网络安全 | 操作系统 | 软件时空 | 硬件指南 | 病毒相关 | IT 认证
软讯网络 > 操作系统 > Linux > 在Redhat 9创建自己的rpm 打包环境
【标  题】:在Redhat 9创建自己的rpm 打包环境
【关键字】:Redhat,rpm
【来  源】:http://blog.chinaunix.net/article.php?articleId=18823&blogId=1096

在Redhat 9创建自己的rpm 打包环境

Your Ad Here 原文参见:HOWTO: How to create rpmbuild directory

方法1:
[hantsy@localhost hantsy]$cd ~
[hantsy@localhost hantsy]$mkdir rpmbuild
[hantsy@localhost hantsy]$cp -a /usr/src/redhat/ rpmbuild
[hantsy@localhost hantsy]$echo '%_topdir %(echo $HOME)/rpmbuild' >> .rpmmacros
如果不想编译debug包,向.rpmmacros中追加%debug_package %
[hantsy@localhost hantsy]$echo '%debug_package %' >> .rpmmacros

方法2
也可直接安装现成的rpm文件:
[hantsy@localhost hantsy]$sudo rpm -ivh http://download.fedora.us/fedora/fedora/1/i386/RPMS.stable/fedora-rpmdevtools-0.1.7-0.fdr.5.noarch.rpm
[hantsy@localhost hantsy]$fedora-buildrpmtree

使用sudo 取得root权限

编辑/etc/sudoers文件
root ALL=(ALL) ALL
hantsy ALL=(ALL) ALL

例子,重新为redhat 9打AdobeReader 7.0 rpms包 参见 HOWTO: Buiding a custom Adobe Reader 7.0 RPM for FC3

[hantsy@localhost hantsy]$ cd rpmbuild/SOURCE
[hantsy@localhost hantsy]$wget -c ftp://ftp.adobe.com/pub/adobe/reader/unix/7x/7.0/enu/AdbeRdr70_linux_enu.tar.gz
[hantsy@localhost hantsy]$cd ../SPECS
[hantsy@localhost hantsy]$wget -c http://fedoranews.org/tchung/AdobeReader/7.0/AdobeReader.spec
[hantsy@localhost hantsy]$sudo rpmbuild -ba AdobeReader.spec

安装自己的rpm包
[hantsy@localhost hantsy]$sudo rpm -ivh ~/rpmbuild/RPMS/i386/AdobeReader-7.0-1.rh9.i386.rpm


参考资料:
1.你可以从这里下载我修改过的specs文件specs.tar.gz
2.www.fedoranews.org 上有大量有关redhat和fedora的教程。
安装Linux系统的五种方法以及心得:【上一篇】
版本管理:【下一篇】
【相关文章】
  • RedHat Serial Port Console Install
  • Setting Up a Serial Console on RedHat Linux 9.0
  • 从Redhat 9升级到CentOS 3.4
  • CentOS 3.4上重新编译php 5 rpm包
  • RedHat AS4下 MPlayer v1.0pre6a 安装手记
  • 关于RedHat Enterprise Advanced Server 4.0 Fat/NTFS 分
  • Redhat Linux 9/AS 3上安装清华紫光拼音输入法智能五笔全拼等
  • 用最新稳定版的apache+mysql+php编译安装(REDHAT9)
  • 在SuSe、RedHat和Mandrake/Mandriva上使用APT的教程
  • CentOS 3.4重新编译firefox1.02,thunderbird 1.02 srpms
  • 【随机文章】
  • Windows 2000下安装PHP4及MySQL大揭密
  • 诡异的函数设计
  • C++中 字符串转换方法
  • 接入网综合网管对策
  • Legato networker solution
  • 松下利用现有CATV线缆实现100Mbps高速互联网
  • 急问VB工程中如何引入class module
  • 《浮点仿真库和VC6浮点库反汇编分析》之二 定点数运算
  • Mac OS X 10.2 打印点点通
  • 手机板抄板| 专业PCB抄板| PCB克隆| 天元世纪主板抄板™
  • 【相关评论】
    没有相关评论
    【发表评论】
    姓名:
    邮件:
    随机码*
    评论*
          
    |  首 页  |  版权声明  |  联系我们   |  网站地图  |
    CopyRight © 2004-2007 bbb软讯网络 All Rigths Reserved.