Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1676845
  • 博文数量: 391
  • 博客积分: 8464
  • 博客等级: 中将
  • 技术积分: 4589
  • 用 户 组: 普通用户
  • 注册时间: 2008-12-13 15:12
个人简介

狮子的雄心,骆驼的耐力,孩子的执著!

文章分类

全部博文(391)

文章存档

2023年(4)

2018年(9)

2017年(13)

2016年(18)

2014年(7)

2013年(29)

2012年(61)

2011年(49)

2010年(84)

2009年(95)

2008年(22)

分类: 系统运维

2009-05-26 17:32:01

1.二进制文件准备
之前已经执行源码编译工作 :configure --prefix=/opt/httpd;make;make install
 
2.建立build目录,并且创建nginx.spec文件:
$cd /usr/src/redhat/BUILD
$mkdir -p /usr/src/redhat/BUILD/nginx-root/opt/httpd
$cp -rpf /opt/httpd/* /usr/src/redhat/BUILD/nginx-root/opt/httpd/
$mkdir -p /usr/src/redhat/BUILD/nginx-root/etc/init.d
$cp /etc/init.d/httpd /usr/src/redhat/BUILD/nginx-root/etc/init.d/
$touch nginx.spec
 
Summary: Nginx Server
Name: nginx
Version: 0.6.3
Release: 1
License: GPL
Group: Development/Tools
BuildRoot: %{_builddir}/%{name}-root
#BuildRoot: /usr/src/redhat/BUILD/nginx-root
%description
Nginx Server install rpm page
Requires: zlib >= 1.2.3 zlib-devel >= 1.2.3 openssl
%files
/opt/httpd
/etc/init.d/httpd
%pre
if [ -f /etc/init.d/httpd ];then
chkconfig --del httpd
fi
%post
chkconfig --add httpd
chkconfig --level 35 httpd on
chkconfig --level 01246 httpd off
%preun
chkconfig --del httpd
rm -f /etc/init.d/httpd
 
4.生成nginx-0.6.3-1.i386.rpm \nginx-0.6.3-1.x86_64.rpm
$rpmbuild -bb nginx.spec --nodeps
 
/usr/src/redhat/RPMS/i386/nginx-0.6.3-1.i386.rpm # 32位系统生成文件存储位置
 
/usr/src/redhat/RPMS/x86_64/nginx-0.6.3-1.x86_64.rpm # 64位系统生成文件存储位置
 
 
 
阅读(1202) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~