Posted by zuzhihui in Linux技术 on 2008/06/01 with No Comments
首先下载nginx的源代码,我下载的是rpm源码包,下载地址从rpmfind.net上找的:
ftp://rpmfind.net/linux/fedora/development/source/SRPMS/nginx-0.6.35-2.fc9.src.rpm
安装编译工具和所需要的库:
yum install -y make rpm-build pcre-devel zlib-devel openssl-devel perl-devel gcc
运行如下命令编译RPM:
mkdir -p /usr/src/redhat/SOURCES rpm -ivh nginx-0.6.35-2.fc9.src.rpm cd /usr/src/redhat/SPECS/ vim nginx.spec #remove the perl-devel dependency rpmbuild -bb nginx.spec
然后编译出来的RPM就在 /usr/src/redhat/RPMS/i386/nginx-0.6.35-2.i386.rpm
要发表评论,您必须先登录。
近期评论