rpm打包
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