1
Installation Instructions
2
*************************
4
Copyright (C) 2007 MySQL AB
9
Get the SVN source from:
11
$ svn co http://svn.mysql.com/svnpublic/mysql-proxy/ mysql-proxy
13
Later you can update the tree by running
18
As you built from SVN none of the configure scripts is prepared. You need:
20
- autoconf 2.56 or higer
21
- automake 1.9 or higher
24
to generate the configure script. Use the provided autogen.sh to rebuild
29
You should have a configure script, ready to build.
34
In case you are using fink some packages are in different locations and need to be adjusted.
36
pkg-config installs its pkg.m4 into the fink locations while automake looks in
37
/usr/local/share/aclocal. Setting ACLOCAL_FLAGS to get a include directory makes aclocal
38
aware of the new location.
40
$ ACLOCAL_FLAGS="-I /sw/share/aclocal/"
41
$ export ACLOCAL_FLAGS
44
Installing from Source
45
======================
47
$ gzip -cd mysql-proxy-<version>.tar.gz | tar xf -
48
$ cd mysql-proxy-<version>
53
As you have the source in the right place and the configure script exists, you have
54
to make sure that the dependencies are in place;
56
- libevent 1.x or higher (1.3b or later is prefered)
58
- glib2 2.6.0 or higer
60
- mysql 5.0.x or higer developer files
75
On Debian and Ubuntu you need to tell the configure script that it has to use
76
"pkg-config lua5.1" to detect the lua-libriaries instead of the default
79
$ ./configure --with-lua=lua5.1
85
If you are using darwin-ports pkg-config might not be able to see the glib-2.0.pc in
86
/opt/local/lib/pkgconfig.
88
$ PKG_CONFIG_PATH="/opt/local/lib/pkgconfig" \
94
Make sure that the following RPM packages (and their dependencies) are
95
installed (use YaST or any other package management tool to install these):
102
You can convert the source tarball into an installable binary RPM by running
103
the following command:
105
$ rpmbuild -ta --clean mysql-proxy-<version>.tar.gz
107
The binary will be installed in /usr/sbin/mysql-proxy, the example lua scripts
108
are placed into /usr/share/doc/packages/mysql-proxy
114
On most platforms a simple configure run works nicely:
119
If lua isn't shipped with a lua.pc file for pkg-config we need to override the
123
LUA_CFLAGS="-I/directory/of/lua.h" \
124
LUA_LDFLAGS="-L/directory/of/liblua.so -llua"
126
In case libevent is not detected correctly, you should set LDFLAGS and CPPFLAGS:
129
LDFLAGS="-L/directory/of/libevent.so -levent" \
130
CPPFLAGS="-I/directory/of/event.h"
138
You should have a /usr/local/sbin/mysql-proxy now.