compile the source format rpm package -----à and make the RPM package in binary format
Instance
#useradd mockbuild (need to compile with mockbuild user)
#rpm –IVH nginx......src.rpm (the rpmbuild directory is generated under the current directory )
#cd Rpmbuild;ls ( below is an introduction to subdirectories )
SOURCES: Store The program source code, patches, scripts and so on.
The SPECS:nginx.spec file indicates how to decompress, patch, how to./configure,make,makeinstall, how to encapsulate the nginx.....rpm package.
#cd SPECS
#rpmbuild-ba ( compile the RPM package generated in binary format and generate the rpm package in source format) Nginx.spec
# RPMBUILD-BB ( compiles only the RPM packages generated in binary format ) nginx.spec
Error---- troubleshooting: report A bunch of errors, show that many dependent packages are not installed, install related packages with Yum, and execute the previous command
Yum didn't find it, find the Fedora epel(Yum Warehouse) and install it in Yum (mirrors.sohu.com ).
Epel have no relevant procedures,Rpmfind on the search, find the corresponding platform (i386/x86_64), corresponding to the OS (RHEL5/RHEL6) related software packages, download down manual installation.
again to CD2 up in the answer:#yum install gd...rpm geo...rpm
In the execution of this command:
#cd Rpmbuild/specs
#rpmbuild-ba ( compile the RPM package generated in binary format and generate the rpm package in source format) Nginx.spec
#cd:
#ls rpms/x86_64 ( This directory will generate a binary rpm package that can be installed with the rpm command or yum install)
#ls SRPMS ( generated in this directory . src.rpm format suffix source rpm package, can be used for you to install the Nginx program on other platforms/ operating systems )
#rpm-IVH rpms/x86_64/nginx....rpm
#apachectl stop
#service Nginx Start
#netstat –tunp|grep 80
visit this machine try http://....../
Rpmbuild directory can put more than one . src.rpm Package generated binary package (RPMS directory), source rpm package (SRPMS directory), program source code files in the SOURCES directory!
This article from the "Let me more Hungry" blog, please be sure to keep this source http://ufirst.blog.51cto.com/7628670/1432605