Compiling ProxySQL 2.0.0
ProxySQL 2.0 is nearing (GA) and a lot of folks in the MySQL world are eager to check out many of the new features such as GTID consistent reads, frontend SSL and Galera native support. Packages will of course be released for all the supported Linux operating systems on the release date, however until then the only way to get up and running is to compile the source code.
There are two ways of going about this:
- Compile within Docker to create an installable package for your Linux distribution (already documented in the GitHub wiki)
- Compile directly on your operating system to generate the
In this article we'll go through the steps for compiling on your operating system (only Linux is supported, however MacOS and FreeBSD are compatible). Firstly we'll need to install some pre-requisites which differ slightly depending on the family your Linux distribution belongs to:
# RHEL / CentOS Based: yum install automake bzip2 make g++ gcc git openssl openssl-devel patch # Debian / Ubuntu Based: apt-get install automake bzip2 make g++ gcc git openssl libssl-dev patch
cmake package was ommitted intentionally as the version packaged with current operating systems is a bit older than we'd like, make sure to remove the default package by running
apt-get remove cmake /
yum remove cmake. Now we need to compile and install version 3.9.2 (verified version, although any version newer than 3.5 should probably work):
cd /tmp wget https://cmake.org/files/v3.9/cmake-3.9.2.tar.gz tar -zxf cmake-3.9.2.tar.gz cd cmake-3.9.2 ./configure gmake gmake install
Now that all pre-requisites are installed we can proceed with the usual compilation process. The source code can be downloaded from here or alternatively by cloning the repository via Github:
git clone -b v2.0.0 https://github.com/sysown/proxysql.git cd proxysql make
Once the process completes the executable will be written to
src/proxysql. You can also install it by running
make install although this is not recommended since we recommend installed versions to be part of a package.
Enjoy your new installation of ProxySQL 2.0 and its many features! Looking forward to feedback and suggestions via our GitHub Issue Tracker!
Authored by: Nick Vyzas