Install mysql2redis on CentOS6.6

Source: Internet
Author: User
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/

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.