欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

制作nginx的RPM包教程

 更新時(shí)間:2014年07月08日 11:23:44   投稿:shichen2014  
這篇文章主要介紹了制作nginx的RPM包的方法,需要的朋友可以參考下

本文講述了制作nginx的RPM包的方法,實(shí)例如下:

1. 下載nginx源碼,直接運(yùn)行命令:

cd /root
wget http://nginx.org/download/nginx-1.7.1.tar.gz

在拿到源碼包之后,解壓,并進(jìn)入目錄:

tar zxvf nginx-1.7.1.tar.gz
cd nginx-1.7.1

2. 編寫(xiě)SPEC文件

文件名為:nginx.spec

Summary: High Performance Web Server
Name: nginx
Version: 1.7.1
Release: el5
License: GPL
Group: Applications/Server
Source: http://nginx.org/download/nginx-%{version}.tar.gz
URL: http://nginx.org/
Distribution: Linux
Packager: yunjianfei <yunjianfei1987@gmail.com>
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}
%define srcdir /root/nginx-1.7.1
%description
nginx [engine x] is a HTTP and reverse proxy server, as well as a mail proxy server
%prep
%build
cd %{srcdir}
./configure --prefix=/usr/local/nginx
make -j8
%install
cd %{srcdir}
make DESTDIR=%{buildroot} install
%preun
if [ -z "`ps aux | grep nginx | grep -v grep`" ];then
 killall nginx >/dev/null
 exit 0
fi
%files
/usr/local/nginx

3. 最后執(zhí)行rpmbuild命令,打rpm包

rpmbuild -bb nginx.spec

至此,執(zhí)行完畢之后,rpm包就打包完成了。

相關(guān)文章

最新評(píng)論