简体   繁体   中英

Building a rpm file to install various modules with all dependencies

I am a newbie in generating a rpm package. I am trying to create a rpm file which require so many modules such as php, mysql, Apache, etc.

I have tried a lot but as I found that there is .spec file, makefile, configure file to build rpm. In my case, there is no such file as I just want to install some third party package all in one rpm file.

I am really stuck and don't getting a proper way to do this stuff. Please help me I am very thankful to you.

I have visited some links, https://access.redhat.com/sites/default/files/attachments/rpm_building_howto.pdf

http://www.logiqwest.com/TechnicalPapers/rpmScriptInstall.html

http://www.linuxquestions.org/questions/linux-general-1/creating-an-rpm-without-source-734490/

No one providing a better solution to fulfill my motto.

In simple, I just want to integrate all my steps in rpm package which can be install using script.

Please suggest a proper way or let me know Is it possible or not?

You would tar up your source to be the main Source and have your RPM Require the various servers you need. In the %install stanza, you would copy all your files to the staging area equivalent of your destination.

Create a appropriate spec file. This describes rpm for developer.

You should pay attention to %require . This is where you specify the dependencies like php , mysql . You don't have to bundle every package in your rpm. rpm is smart to figure out what package are being needed. Chapter 14 of the link describes this.

The resulting rpm can be installed using rpm install pkg_name.rpm but if you want yum install pkg_name , then you need set up a yum repo.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM