The source packet creating an rpm

  Linux system in general there are two ways to install the software, source code and install or yum install rpm package installation, because the disc rpm packages are made into a few years ago, so the software version are very low, while yum can install the software customization is very low, so in order to use the latest software, the source code is generally used to install, but the steps to install the source code is very complicated, so in order to simplify the process of installing the source code, we generally will be made into source package rpm package to install, not only to solve tedious steps to install the source code, increased customization rpm package. Let's explain how to make rpm packages.

First, install the rpm-build tool

  Command: yum -y install rpm-build

Second, generating packet creating environmental rpm

  Command: rpmbuild -ba nginx.spec # After executing this command will complain, but rpmbuild will generate a directory in the current directory, the directory is the production environment rpm package, nginx.spec this is just write, but it must be. spec end.

 

 

 

 

 Third, the production rpm package

  3.1, the package into the source / root / rpmbuild / SOURCES / directory

 

 

  3.2, generate and modify configuration files, configuration files must be placed in / root / rpmbuild / SPECS / directory, and name their own definition, but must end .spec, such as nginx.spec

 

 

 

 

 

   Save and exit

  3.3, began making source package

 

 

 

 

 

 Fourth, the test installation rpm package

 

 

  Is there nginx catalog / usr / local / in, whether it can start nginx.

 

 

 

 

 

 

 

 

 

Guess you like

Origin www.cnblogs.com/mython/p/11764010.html