Centos6_ 64 RPM packaging practices

Source: Internet
Author: User
Tags rpmbuild

Install rpmbuild

Sudo yum install rpm-build

Configurations of common users

/Home/you/rpmbuild/assume that the rpm directory is to be built


Let's talk about the usage of rpmbuild. Here is an example:

Echo "% _ topdir/home/you/rpmbuild"> ~ /. Rpmmacros

Mkdir-p/home/you/rpmbuild/{SPECS, BUILD, SRPMS, RPMS, SOURCES}


The configuration in/usr/lib/rpm/macros allows you to change the specific build configuration item. If an error occurs, you can modify this [differences between the old and new versions]


V build from source code

Rpmbuild-ta memcached-1.x.x.tar.gz


V Mysql build example

Sudo yum install gcc-c ++ gperf ncurses-devel perl readline-devel time zlib-devel libaio-devel bison cmake

First, make sure that the mysql dependent database is available

For convenience

Copy mysql-5.6.15.tar.gz to/home/you/rpmbuild/SOURCES

Copy mysql-5.6.15/support-files/mysql.5.6.15.sepc to/home/you/rpmbuild/SPECS


After that, you can view the created mysql rpm file package in/home/you/rpmbuild/RPMS.


If you want to customize it, you can modify it for mysql.5.6.15.sepc and re-build it.



RPM packaging software for http://www.ibm.com/developerworks/cn/linux/management/package/rpm/part1/, part 1


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.