Create RPM binary packages and source packages
rpmbuild command is used to create rpm binary packages and source packages.
rpmbuild(option)
--initdb: Initialize RPM database;
--rebuilddb: Rebuild the RPM database from the installed header file;
-ba: Create binary and source code packages;
-bb: Create binary code package;
-bs: Create a source code package.
rpmbuild -ba 'spec file path'
After building, you can find the binary rpm package under /usr/src/redhat/RPMS/
. The rpm package is classified according to its corresponding CPU architecture, usually under the /usr/src/redhat/RPMS/i386
directory. . Find the source rpm package under /usr/src/redhat/SRPMS/
. Since it is source code, there is no need to classify it by architecture.