Skip to content

Packaging and Installing the MySQL Proxy with RPM

As I felt the itch to do some quick hacking yesterday, I decided to provide an RPM spec file for the MySQL proxy. The changes have been commited to the SVN trunk now and I added some hints to the INSTALL file on how to perform an RPM build.

Here is a quick summary of how to convert the current SVN code into an installable RPM. You build environment needs to fulfill a few additional prerequisites (a gcc compiler and the C library header files are taken for granted here), I added the versions I used on my openSUSE 10.2 system for reference:

  • autoconf 2.56 or newer (autoconf-2.60)
  • automake 1.9 or newer (automake-1.9.6)
  • MySQL 5.0.x include files (MySQL-devel-5.0.41)
  • pkg-config (pkgconfig-0.20)
  • libevent 1.x or newer (libevent-1.1)
  • lua 5.1 or newer (lua-5.1.1)
  • glib2 2.4.0 or newer (glib2-2.12.4)
The following steps need to be performed:
# Check out the trunk of the SVN repository
$ svn co http://svn.mysql.com/svnpublic/mysql-proxy/trunk mysql-proxy

# Enter the directory and bootsrap autoconf/automake
$ cd mysql-proxy
$ sh ./autogen.sh

# Build the source distribution tarball
$ ./configure && make distcheck

# Convert the source tarball into a binary RPM
$ rpmbuild -tb --clean mysql-proxy-<version>.tar.gz

RPM will now perform the compiling and packaging. The end result will be an installable binary RPM package which will end up in the RPMS directory. Depending on your distribution this location will vary, on my openSUSE system the package ended up in in the following location from where I installed it directly:

$ sudo rpm -Uhv /usr/src/packages/RPMS/i586/mysql-proxy-0.5.1-0.i586.rpm

The mysql-proxy will be installed into /usr/sbin, the documentation and example scripts are being put into the default documentation directory (/usr/share/doc/packages/mysql-proxy in my case).

For now, you still have to start the proxy manually. Next thing is to create an init script that starts up the process at boot time.

Trackbacks

No Trackbacks

Comments

Display comments as Linear | Threaded

No comments

Add Comment

Enclosing asterisks marks text as bold (*word*), underscore are made via _word_.
Standard emoticons like :-) and ;-) are converted to images.
HTML-Tags will be converted to Entities.
E-Mail addresses will not be displayed and will only be used for E-Mail notifications.

To prevent automated Bots from commentspamming, please enter the string you see in the image below in the appropriate input box. Your comment will only be submitted if the strings match. Please ensure that your browser supports and accepts cookies, or your comment cannot be verified correctly.
CAPTCHA

Form options
tweetbackcheck