Build a custom MySQL RPM package based on the official source RPM package under Linux

Source: Internet
Author: User
Tags rpmbuild

1, first install Rpmbuild

#Yum Install rpm-build gcc gcc-c++ cmake bison ncurses-devel zlib - y

2, download the official source package (tar.gz format), and unzip

#wget http://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.15.tar.gz

#tar-XVF mysql-5.6.15.tar.gz

3. New RPM Folder

#CD mysql-5.6.15

#mkdir rpm

4. Copy the prepared spec file to the new RPM folder and start rebuilding the RPM package, and the resulting RPM package is placed under the ~/rpmbuild/rpms/x86_64 folder.

#RPMBUILD-BB Mysql.spec (will generate Rpmbuild folder in the current user home directory)

---------------------------------------------------------------------------------------------------------------

If you want to view the original spec file , use the following methods:

1, first install Rpmbuild

#Yum Install rpm-build gcc gcc-c++ cmake bison ncurses-devel zlib- y

2. Download the official source code RPM package

wget http://cdn.mysql.com/Downloads/MySQL-5.6/MySQL-5.6.26-1.el6.src.rpm

3. Download the above downloaded RPM package to the home directory, and then perform

#Rpmbuild ~ will be home directory generation Rpmbuil and the following build BuildRoot RPMS SOURCES SPECS Srpms sub-empty directory structure

#RPM-IVH mysql-5.6.26-1.el6.src.rpm

#LS rpmbuild - R is shown below:

Rpmbuild:build buildroot RPMS SOURCES SPECS SRPMS

Rpmbuild/build:

Rpmbuild/buildroot:

Rpmbuild/rpms:

Rpmbuild/sources:

Mysql-5.6.26.tar.gz

Rpmbuild/specs:

Mysql.spec

Rpmbuild/srpms:

4. Start modifying the generated Mysql.spec file

#vim Rpmbuild/mysql.spec

The main modification of the build full release section of the installation of MySQL required compilation parameters.

5. Build a custom generated RPM package based on the Mysql.spec file, and the resulting RPM package is placed under the ~/rpmbuild/rpms/x86_64 folder

#rpmbuild-BB Mysql.spec

------------------------------------------

Build a custom MySQL RPM package based on the official source RPM package under Linux

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.