数据库相关

mysql-proxy安装[原创]

最近在学mysql-proxy,今天先把安装过程写出来

mysql-proxy需要lua和mysql的支持
lua的下载可以去http://www.lua.org/ftp/
mysql的下载就去www.mysql.com就行
首先是lua的安装
32位的

tar zxvf lua-5.1.4.tar.gz
cd lua-5.1.4
make linux
make install

64位系统的

tar zxvf lua-5.1.4.tar.gz
cd lua-5.1.4
vi Makefile
INSTALL_TOP= /usr
INSTALL_BIN= $(INSTALL_TOP)/bin
INSTALL_INC= $(INSTALL_TOP)/include
INSTALL_LIB= $(INSTALL_TOP)/lib64
INSTALL_MAN= $(INSTALL_TOP)/man/man1

INSTALL_LMOD= $(INSTALL_TOP)/share/lua/$V

INSTALL_CMOD= $(INSTALL_TOP)/lib64/lua/$V

保存退出

make linux
make install

安装好lua后,接下来安装mysql-proxy

tar zxvf mysql-proxy-0.6.1.tar.gz
cd mysql-proxy-0.6.1

64位系统执行

export LUA_LIBS="-L/usr/lib64/lua/5.1/ -llua -lm"
export LUA_CFLAGS=" "

32位系统执行

export LUA_LIBS="-L/usr/local/lib/lua/5.1/ -llua -lm"
export LUA_CFLAGS=" "

接下执行

./configure --with-mysql=/pathto/yourmysqldir/bin/mysql_config LDFLAGS="-ldl"
make
make install

如果没有报错基本就是安装成功,如果过程中报相应的错误,请安装相应的缺失文件即可了

安装到此就结束了,继续去学习了。有问题再讨论吧

Related Post

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.