-
Notifications
You must be signed in to change notification settings - Fork 52
Installation
Pinba requires MySQL 5.1.x+ or MariaDB 5.1.43+ sources to be built and MySQL 5.1.x+ or MariaDB 5.1.43+ installation to run.
MySQL 5.1 is the first version which supports pluggable storage engines, so older MySQL versions cannot and will not be supported.
Libraries required:
- Google Protocol Buffers - http://code.google.com/p/protobuf (the only one required both for server and clients)
- Judy - http://judy.sf.net
- libevent - http://monkey.org/~provos/libevent/ (this one may be already installed in your system, just make sure you have its headers installed, too).
Optionally used:
- Hoard memory allocator - http://www.hoard.org
--with-hoard option you can add compiled-in Hoard support. It helps to reduce memory consumption (and Pinba is quite memory hungry when it comes to millions of timers). 2x smaller memory footprint with Hoard is what we regularly see.
Unpack the Pinba engine archive and start the good old configure & make procedure:
# ./configure \
--with-mysql=/path/to/the/sources/of/mysql-5.1 \
--with-judy=/judy/prefix \
--with-protobuf=/protobuf/prefix \
--with-event=/event/prefix \
--libdir=/path/to/mysql/plugin/dir
# make install
The --libdir option is required in order to get the library installed into the correct directory (but you can always put the lib there manually). Usually the path looks like [MySQL install prefix]/lib/mysql/plugin, so if you've installed MySQL using /usr/local/mysql prefix, the path should be /usr/local/mysql/lib/mysql/plugin.
(c) Max Romanovsky
These instructions apply to standard mysql-server installation from packages.
1. Download and install these packages:
- libprotobuf-dev
- libprotobuf-lite7
- libprotobuf7
- protobuf-compiler
- libjudydebian1
- libevent-dev
- libevent-2.0-5
- libevent-core-2.0-5
- libevent-extra-2.0-5
- libevent-openssl-2.0-5
- libevent-pthreads-2.0-5
3. Run `mysqlbug` and copy string with `.configure` options.
4. Run `./configure <this></this> && cd include && make`.
5. Process to steps described in Official Manual.
After you've installed the plugin into the correct plugin directory, you need to enable it in MySQL.
To do this log in to the MySQL console (as root) and execute the following:
mysql> INSTALL PLUGIN pinba SONAME 'libpinba_engine.so';
We'd also suggest you to create a separate database, this way:
mysql> CREATE DATABASE pinba;
And then create the default tables:
# mysql -D pinba < default_tables.sql
You can create more tables later, but these are the default ones.
In order to build Pinba extension you need Google Protocol Buffers and the PHP development package installed, which includes phpize, php-config and PHP headers. When you have it, you may proceed with unpacking the archive with the Pinba PHP extension sources and the following commands:
# phpize # ./configure --with-pinba=<Google Protobuf install prefix> # make install
You might want to add --with-php-config=/path/to/php-config if php-config script is not in your PATH.
Don't forget to add pinba.so to your php.ini and enable Pinba using pinba.enabled=1, see PHP extension for more details.