1. install apr. Download: Release
1. install apr
Download: http://apache.dataguru.cn//apr/apr-1.5.1.tar.gz
Tar zxvf apr-1.5.1.tar.gzcd apr-1.5.1vi configure find $ RM '$ Folder File' this line is deleted./configure -- prefix =/usr/local/aprmakemake install
2. install apr-util
Download: http://mirror.bit.edu.cn/apache//apr/apr-util-1.5.4.tar.gz
tar zxvf apr-util-1.5.4.tar.gzcd apr-util-1.5.4./configure --with-apr=/usr/local/aprmakemake install
3. install hiredis
Download: https://github.com/redis/hiredis/archive/master.zip
Decompress the package and upload it to the server.
cd hiredis-mastermakemkdir /usr/lib/hirediscp libhiredis.so /usr/lib/hirediscp libhiredis.so /usr/lib/cp libhiredis.so /usr/lib64/mkdir /usr/include/hirediscp hiredis.h /usr/include/hiredis
4. install lib_mysqludf_json
Download: https://github.com/mysqludf/lib_mysqludf_json/archive/master.zip
Upload to server after pressing
cd lib_mysqludf_json-masterrm lib_mysqludf_json.sogcc $(mysql_config --cflags) -shared -fPIC -o lib_mysqludf_json.so lib_mysqludf_json.ccp lib_mysqludf_json.so /usr/local/mysql/lib/plugin/
5. install mysql2redis
Download: https://github.com/dawnbreaks/mysql2redis/archive/master.zip
Upload to server after pressing
Cd mysql2redis-mastervi Makefile (replace the following code) PLUGINDIR = "/usr/local/mysql/lib/plugin" INCLUDE = '/usr/local/mysql/bin/mysql_config -- include'-I/usr/local/include-I /usr/local/apr/include-I. /LIBS =-lhiredis-L $ (PLUGINDIR)-L/usr/local/apr/lib-lapr-1-laprutil-1compile: gcc-Werror-O2-g $ (INCLUDE)-I. -fPIC-shared-rdynamic lib_mysqludf_redis.c $ (LIBS)-o lib_mysqludf_redis_v2.soinstall: gcc-Werror- O2-g $ (INCLUDE)-I. -fPIC-shared-rdynamic lib_mysqludf_redis.c \ $ (LIBS)-o $ {PLUGINDIR}/Plugin: rm-f $ (PLUGINDIR)/lib_mysqludf_redis_v2.soclean: rm-f *~ Rm-f *. so rm-f *. out save makecp lib_mysqludf_redis_v2.so/usr/local/mysql/lib/plugin/