~jan-kneschke/mysql-proxy/packet-tracking-assertions

« back to all changes in this revision

Viewing changes to tags/mysql-proxy-0.6.0/INSTALL

  • Committer: Kay Roepke
  • Author(s): Jan Kneschke
  • Date: 2008-01-23 22:00:28 UTC
  • Revision ID: kay@mysql.com-20080123220028-hq2xqb69apa75fnx
first round on mysql-shell based on the proxy code

this is mostly a verification if the proxy-code is flexible enough to handle 
all three scenarios of: client, server and forwarding (proxy)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Installation Instructions
 
2
*************************
 
3
 
 
4
Copyright (C) 2007 MySQL AB
 
5
 
 
6
Installing from SVN
 
7
===================
 
8
 
 
9
Get the SVN source from:
 
10
 
 
11
  $ svn co http://svn.mysql.com/svnpublic/mysql-proxy/ mysql-proxy
 
12
 
 
13
Later you can update the tree by running
 
14
 
 
15
  $ cd mysql-proxy/
 
16
  $ svn up
 
17
 
 
18
As you built from SVN none of the configure scripts is prepared. You need:
 
19
 
 
20
- autoconf 2.56 or higer
 
21
- automake 1.9 or higher
 
22
- flex 
 
23
 
 
24
to generate the configure script. Use the provided autogen.sh to rebuild 
 
25
the config-scripts:
 
26
 
 
27
  $ sh ./autogen.sh
 
28
 
 
29
You should have a configure script, ready to build.
 
30
 
 
31
MacOS X
 
32
-------
 
33
 
 
34
In case you are using fink some packages are in different locations and need to be adjusted.
 
35
 
 
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.
 
39
 
 
40
  $ ACLOCAL_FLAGS="-I /sw/share/aclocal/"
 
41
  $ export ACLOCAL_FLAGS
 
42
  $ sh ./autogen.sh
 
43
 
 
44
Installing from Source 
 
45
======================
 
46
 
 
47
  $ gzip -cd mysql-proxy-<version>.tar.gz | tar xf -
 
48
  $ cd mysql-proxy-<version>
 
49
 
 
50
Preparing the Build
 
51
===================
 
52
 
 
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;
 
55
 
 
56
- libevent 1.x or higher (1.3b or later is prefered)
 
57
- lua 5.1.x or higher
 
58
- glib2 2.6.0 or higer
 
59
- pkg-config 
 
60
- mysql 5.0.x or higer developer files
 
61
 
 
62
Ubuntu/Debian
 
63
-------------
 
64
 
 
65
  $ apt-get install \
 
66
      pkg-config \
 
67
      liblua5.1-0 \
 
68
      liblua5.1-dev \
 
69
      libevent-dev \
 
70
      libevent1  \
 
71
      libglib2.0-0 \
 
72
      libglib2.0-dev \
 
73
      libmysqlclient-dev
 
74
 
 
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 
 
77
"pkg-config lua".
 
78
 
 
79
  $ ./configure --with-lua=lua5.1
 
80
 
 
81
 
 
82
MacOSX
 
83
------
 
84
 
 
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.
 
87
 
 
88
  $ PKG_CONFIG_PATH="/opt/local/lib/pkgconfig" \
 
89
      ./configure
 
90
 
 
91
openSUSE
 
92
--------
 
93
 
 
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):
 
96
 
 
97
- glib2-devel
 
98
- mysql-devel
 
99
- lua-devel
 
100
- libevent
 
101
 
 
102
You can convert the source tarball into an installable binary RPM by running
 
103
the following command:
 
104
 
 
105
  $ rpmbuild -ta --clean mysql-proxy-<version>.tar.gz
 
106
 
 
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
 
109
 
 
110
 
 
111
All other Platforms
 
112
-------------------
 
113
 
 
114
On most platforms a simple configure run works nicely:
 
115
 
 
116
  $ ./configure 
 
117
 
 
118
 
 
119
If lua isn't shipped with a lua.pc file for pkg-config we need to override the 
 
120
pkg-config checks:
 
121
 
 
122
  $ ./configure \
 
123
    LUA_CFLAGS="-I/directory/of/lua.h" \
 
124
    LUA_LDFLAGS="-L/directory/of/liblua.so -llua"
 
125
 
 
126
In case libevent is not detected correctly, you should set LDFLAGS and CPPFLAGS:
 
127
 
 
128
  $ ./configure \
 
129
    LDFLAGS="-L/directory/of/libevent.so -levent" \
 
130
    CPPFLAGS="-I/directory/of/event.h"
 
131
 
 
132
Building
 
133
========
 
134
 
 
135
  $ make
 
136
  $ make install
 
137
 
 
138
You should have a /usr/local/sbin/mysql-proxy now.
 
139
 
 
140