码迷,mamicode.com
首页 > 其他好文 > 详细

rpm打包

时间:2019-03-19 21:34:56      阅读:188      评论:0      收藏:0      [点我收藏+]

标签:dir   prefix   col   setup   flag   ref   source   flags   ssl   

1.yum -y install rpm-build

2.rpmbuild -ba xx.spec

3.cp  source_package /root/rpmbuild/SOURCES/

4.vim /root/rpmbuild/SPECS/nginx.spec

Name: nginx    
Version: 1.12.2      
Release: 10
Summary: Nginx is a web server software.    

#Group:        
License: GRL    
URL: www.piyixia.com
Source0: nginx-1.12.2.tar.gz    

#BuildRequires:    
#Requires:    

%description
this is a nginx...

%post
useradd nginx

%prep
%setup -q


%build
./configure --prefix=/usr/local/nginx --user=nginx --group=nginx --with-http_ssl_module
make %{?_smp_mflags}


%install
make install DESTDIR=%{buildroot}


%files
%doc
/usr/local/nginx/*



%changelog

 

5.rpmbuild -ba /root/rpmbuild/SPECS/nginx.spec

6.createrepo 

 

rpm打包

标签:dir   prefix   col   setup   flag   ref   source   flags   ssl   

原文地址:https://www.cnblogs.com/ray-mmss/p/10177430.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!