MySQL Proxy Compiling
Contents |
[edit] Compiling from the development source tree
The up-to-date and detailed Compiling Instructions for MySQL Proxy can be found in the INSTALL file included in the source distribution, also available directly from the Bazaar source repository:
http://bazaar.launchpad.net/%7Emysql-proxy-developers/mysql-proxy/trunk/annotate/head%3A/INSTALL
[edit] Bazaar repository
The MySQL Proxy source code is maintained in a Bazaar repository on Launchpad. You can checkout a local copy by using the following command:
$ bzr branch lp:mysql-proxy
Any new changes that have been applied against this tree can be pulled by running bzr pull inside your branch. The source repository can also be browsed using Launchpad.
[edit] Launchpad project
The project is now fully hosted on Launchpad and Bazaar is necessary to get development snapshots.
[edit] Compiling in RedHat Enterprise 5
Since RHEL5 and CentOS does not provide lua 5.1 as default, you'll need to compile lua.
Here is a how-to:
cd /usr/local wget lua.tar.gz wget mysql-proxy.tar.gz tar xzf lua.tar.gz tar xzf mysql-proxy.tar.gz cd lua*
In Makefile change INSTALL_TOP= /opt/lua
vi Makefile make linux make install
cd.. cd mysql-proxy*
yum install libevent-devel glib2-devel ./configure --prefix=/opt/mysql-proxy --with-lua LDFLAGS="-lm -ldl" LUA_CFLAGS="-I/opt/lua/lib/" LUA_LIBS=/opt/lua/lib/liblua.la make make install
Now, it's time to put mysql-proxy on init:
cat >/etc/init.d/mysql-proxy
Paste here MySQL Proxy init contents CTRL+D to save
chmod 0755 /etc/init.d/mysql-proxy chkconfig mysql-proxy on
cat >/etc/sysconfig/mysql-proxy # Options to mysql-proxy # do not remove --daemon PROXY_OPTIONS="--daemon"
CTRL+D to save