This article mainly introduces the middleware Atlas source code compilation installation, due to the RPM installation of the Atlas program returned when the MySQL version is 5.0, the corresponding use of the lower version of the drive caused by the time type of the field cannot support the millisecond level.
Due to the need to glib version more than 2.32, the CENTOS6 system comes with a glib version of 2.28, so you need to recompile the installation of more than 2.32 glib, where the installation of 2.34 version of glib need to rely on pcre greater than 8.31.
First, compile and install pcre8.35
# Tar XF pcre-8.35.tar.gz# cd pcre-8.35#./configure--prefix=/usr/local/glib--with-pcre=/usr/local/pcre/
second, compile and install GLIB-2.34.3.TAR.XZ
# Tar XF glib-2.34.3.tar.xz# cd glib-2.34.3#./configure--prefix=/usr/local/glib--with-pcre=/usr/local/pcre/
Third, compile and install atlas-2.2.1.tar.gz
1. Resolving dependencies
# yum Install libffi-devel lua-devel libeventlibevent-devel
2. Modify the source code MySQL version, here MySQL version is 5.6.17
Locate plugins/proxy/proxy-plugin.c File Modification 1974 line: Challenge->server_version_str =g_strdup ("5.0.81-log"); challenge- >server_version_str= g_strdup ("5.6.17-log"); Modify line 1974: Challenge->server_version = 50081; for Challenge->server _version= 50617;
3. install Atlas
# tar xf atlas-2.2.1.tar.gz# cd atlas-2.2.1# exportpkg_config_path=/usr/local/glib/lib/pkgconfig# ./configure --with-mysql=/usr/local/ mysql5.6/bin/mysql_config--prefix=/usr/local/mysql-proxy ldflags= "-lcrypto" # make && make install or modify bootstrap.sh#!/bin/sh base=$ (cd "$ (dirname " $ ")"; pwd) cd $basePKG _config_path=/usr/local/glib/lib/pkgconfig ./configure --with-mysql=/usr/local/mysql/bin/ mysql_config --prefix=/usr/local/mysql-proxy cppflags= "-i/usr/local/mysql/include/" LDFLAGS= "-l /usr/local/mysql/lib/ -lm -ldl -lcrypto " lua_cflags="-i/usr/include/" LUA_LIBS="-L/ Usr/lib64 -llua "Execution # ./bootstrap.sh# make && make Install Note: The above related program header files and library files according to their own environment to modify the corresponding path
Iv. launch of Atlas
#/usr/local/mysql-proxy/bin/mysql-proxyd Test Start
Error
2016-08-0518:05:26: (Critical) loading module '/usr/local/mysql-proxy/lib/mysql-proxy/plugins/libproxy.so ' failed: Libmy
Sqlclient.so.18:cannot open Shared object file:no such file or directory
2016-08-0518:05:26: (critical) setting--plugin-dir=<dir> might help
2016-08-0518:05:26: (message) initiating shutdown, requested from mysql-proxy-cli.c:441
2016-08-0518:05:26: (message) shutting down normally, exit code IS:1
Resolve, import the MySQL library file to the system
# echo '/usr/local/mysql/lib/' >>/etc/ld.so.conf# ldconfig
V. Atlas Upgrade Replacement
1. ensure that the Atlas host operating system to be upgraded is consistent with the operating system version of the compiled software
together with the compiled and installed GLib deployment, as well as the need to install dependencies libffi-devel lua-devel libevent libevent-devel
This article is from the "Linux Road" blog, make sure to keep this source http://hnr520.blog.51cto.com/4484939/1837631
Atlas2.2 Source Code Compilation installation