制作nginx的RPM包教程
linux  /  管理员 发布于 7年前   375
本文讲述了制作nginx的RPM包的方法,实例如下:
1. 下载nginx源码,直接运行命令:
cd /rootwget http://nginx.org/download/nginx-1.7.1.tar.gz
在拿到源码包之后,解压,并进入目录:
tar zxvf nginx-1.7.1.tar.gzcd nginx-1.7.1
2. 编写SPEC文件
文件名为:nginx.spec
Summary: High Performance Web ServerName: nginxVersion: 1.7.1Release: el5License: GPLGroup: Applications/ServerSource: http://nginx.org/download/nginx-%{version}.tar.gzURL: http://nginx.org/Distribution: LinuxPackager: yunjianfei <[email protected]>BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}%define srcdir /root/nginx-1.7.1%descriptionnginx [engine x] is a HTTP and reverse proxy server, as well as a mail proxy server%prep%buildcd %{srcdir}./configure --prefix=/usr/local/nginxmake -j8%installcd %{srcdir}make DESTDIR=%{buildroot} install%preunif [ -z "`ps aux | grep nginx | grep -v grep`" ];then killall nginx >/dev/null exit 0fi%files/usr/local/nginx
3. 最后执行rpmbuild命令,打rpm包
rpmbuild -bb nginx.spec
至此,执行完毕之后,rpm包就打包完成了。
122 在
学历:一种延缓就业设计,生活需求下的权衡之选中评论 工作几年后,报名考研了,到现在还没认真学习备考,迷茫中。作为一名北漂互联网打工人..123 在
Clash for Windows作者删库跑路了,github已404中评论 按理说只要你在国内,所有的流量进出都在监控范围内,不管你怎么隐藏也没用,想搞你分..原梓番博客 在
在Laravel框架中使用模型Model分表最简单的方法中评论 好久好久都没看友情链接申请了,今天刚看,已经添加。..博主 在
佛跳墙vpn软件不会用?上不了网?佛跳墙vpn常见问题以及解决办法中评论 @1111老铁这个不行了,可以看看近期评论的其他文章..1111 在
佛跳墙vpn软件不会用?上不了网?佛跳墙vpn常见问题以及解决办法中评论 网站不能打开,博主百忙中能否发个APP下载链接,佛跳墙或极光..
Copyright·© 2019 侯体宗版权所有·
粤ICP备20027696号