别的安装包地址当时没有记下载地址,不过大部分都在这个网站上找的;http://sourceforge.net/ &&&&&&&&&& 安装开始 &&&&&&&& 1、tar -zxvf check-0.8.4.tar.gz cd check-0.8.4 ./configure make make install 2、tar -zxvf glib-2.18.4.tar.gz //系统rpm包可能版本低出现了问题3; ./configure make make install 3、tar -zxvf libevent-2.0.6-rc.tar.gz cd libevent-2.0.6-rc ./configure --prefix=/usr/local/libevent make && make install 4、tar -zxvf lua-5.1.4.tar.gz INSTALL_TOP= /usr/local/lua // 为了把lua安装到/var/lib/lua下,故要修改其下的Makefile; 或者直接执行:sed -i 's#INSTALL_TOP= /usr/local#INSTALL_TOP= /usr/local/lua#' Makefile root@testmysql [/software/lua-5.1.4]# make Please do make PLATFORM where PLATFORM is one of these: aix ansi bsd freebsd generic linux macosx mingw posix solaris See INSTALL for complete instructions. 这处是要你选择服务器所使用的平台; 执行:make linux //此处执行后出现了错误,解决办法在下面问题解决区1处,此处先跳过; 再执行:make install 设置环境变量: export LUA_CFLAGS="-I/usr/local/lua/include" LUA_LIBS="-L/usr/local/lua/lib -llua -ldl" LDFLAGS="-L/usr/local/libevent/lib -lm" export CPPFLAGS="-I/usr/local/libevent/include" export CFLAGS="-I/usr/local/libevent/include"
5、tar -zxvf pkg-config-0.23.tar.gz cd pkg-config-0.23 ./configure make make install 安装完之后要执行:cp etc/lua.pc /usr/local/lib/pkgconfig/lua5.1.pc //原因见下面的问题解决区2处; 6、安装MySQL客户端; 因为此服务器系统是默认安装了MySQL,没有安装客户端,我又装了client、devel如下所示已安装的rpm包; root@testmysql [/software/lua-5.1.4]# rpm -qa | grep MySQL MySQL-client-5.1.48-0.glibc23 MySQL-bench-5.0.91-0.glibc23 MySQL-test-5.1.48-0.glibc23 MySQL-shared-5.1.48-0.glibc23 MySQL-server-5.1.48-0.glibc23 MySQL-devel-5.1.48-0.glibc23 此后的Mysql-proxy时总是一直报错,编译不过去,无奈之下用源码包客户端;(此时的rpm包都没有卸载,直接执行了下面的安装)//此处问题见问题解决区4处; tar zxvf mysql-5.0.56.tar.gz //此处我直接使用了mysql的5.0.56的源码包; cd mysql-5.0.56 ./configure --prefix=/usr/local/mysql --without-server make && make install
7、tar xvf mysql-proxy-0.8.0.tar.gz cd mysql-proxy-0.8.0 ./configure --prefix=/usr/local/mysql-proxy --with-mysql=/usr/local/mysql --with-lua //问题解决处4有介绍; Make && Make install
2、安装MySQL-proxy时报错: checking for LUA... configure: error: Package requirements (lua5.1 >= 5.1) were not met:
No package 'lua5.1' found
Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix.
Alternatively, you may set the environment variables LUA_CFLAGS and LUA_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. 解决办法: cp etc/lua.pc /usr/local/lib/pkgconfig/lua5.1.pc
3、安装MySQL-proxy时报错: checking for GLIB... configure: error: Package requirements (glib-2.0 >= 2.16.0) were not met:
No package 'glib-2.0' found
Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix.
Alternatively, you may set the environment variables GLIB_CFLAGS and GLIB_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. 解决办法: 1、查看系统已经安装glib的rpm包; glibc-2.5-49.el5_5.4 glibc-headers-2.5-49.el5_5.4 glib2-2.12.3-4.el5_3.1 glibc-common-2.5-49.el5_5.4 glibc-devel-2.5-49.el5_5.4 2、下载安装glib-2.18.4.tar.gz
4、刚开始使用系统里rpm所指定的mysq_config时,mysql-proxy安装报错,信息如下; configure: error: mysql_config not exists or not executable, use $ ./configure --with-mysql=/path/to/mysql_config 看到帮助安装文档里要求如下: --with-mysql[=PATH] Include MySQL support. PATH is the path to 'mysql_config'。 解决办法就是:安装包中的第6步。