Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The Archive Storage Engine is not enabled by the default build of MySQL in CentOS/RHEL. I would like to enable it on our CentOS 5.4 server. My initial reaction was to modify the SPEC file for the SRPMS file, but this indicates that this might not be that easy. There's always the option to build from MySQL source, but I would prefer if possible to stay within the RPMS/Yum world.

Does anybody have a successful approach to this by using RPMS/SRPMS/Yum? Some patches which makes this work flawless with SRPMS?

share|improve this question
up vote 1 down vote accepted

I build MySQL with changes to the SPECS file for MySQL and the Archive storage engine got enabled. Here's a detailed step on how to get this up and running:

Install yum-utils:

sudo yum install yum-utils

Include RedHat's SRPMS to the CentOS repos:

sudo vi /etc/yum.repos.d/srpm.repo

Add the following repo configuration:

name=Red Hat Enterprise Linux $releasever - $basearch - Source

I could not use $releasever in the URL, but had to set to 5Server.

Download the SRPMS package:

 yumdownloader --source mysql-server

Set up build area for a non-root user:

 yum install rpm-build redhat-rpm-config
 mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
 echo '%_topdir %(echo $HOME)/rpmbuild' > ~/.rpmmacros
 rpm -i mysql-server-5.0.xx.src.rpm

Install the required development tools:

 yum install gcc-c++ libtool gperf automake ncurses-devel readline-devel openssl-devel zlib-devel

To find all the required libraries and tools, just try to the following command:

 cd ~/rpmbuild/SPECS/

Modify the spec file:

 vi ~/rpmbuild/SPECS/mysql.spec

I added the following in the spec file (I wanted also to include the federated storage engine):

 %configure \
    --with-archive-storage-engine \
    --with-federated-storage-engine \

Be aware: This might have changed in MySQL 5.1 where plugin is used to specify storage engines.

In order to speed up the build process you should consider making this change:

 %{!?runselftest:%define runselftest 0}

Then run (as non-root user):

 cd ~/rpmbuild/SPECS/
 rpmbuild -ba mysql.spec

You'll find the RPMs in ~/rpmbuild/RPMS/i386. Just install and run MySQL and you will get a MySQL version with archive storage engine enabled.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.