Installation of the Linux software package----Compile the source-format RPM package (the package with the suffix. src.rpm)

Source: Internet
Author: User
Tags rpmbuild

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.