A:libevent wget http://www.dbasky.net/tool/libevent-1.4.9-stable.tar.gz tar zvfx libevent-1.4.9-stable.tar.gz cd libevent-1.4.9-stable ./configure make make install B:GLIB wget http://www.dbasky.net/tool/glib-2.18.4.tar.gz tar zvfx glib-2.18.4.tar.gz cd glib-2.18.4 ./configure make make install
2)安装lua 5.1
1 2 3 4 5 6 7 8
wget http://www.dbasky.net/tool/lua-5.1.4.tar.gz tar zvfx lua-5.1.4.tar.gz cd lua-5.1.4 vi src/Makefile #在64位机上编译出现了"relocations"错误,需要在CFLAGS里加上-fPIC. make linux make install cp etc/lua.pc /usr/local/lib/pkgconfig/ #重要:让pkg-config找到自己编译的库在哪里 export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig
3)安装Mysql-proxy
1 2 3 4 5 6 7
wget http://www.dbasky.net/tool/mysql-proxy-0.7.0.tar.tar tar zxvf mysql-proxy-0.7.0.tar.tar cd mysql-proxy-0.7.0 ./configure make make check make install
编译完成,可以检查一下最终结果:
1 2
mysql-proxy -V mysql-proxy: error while loading shared libraries: /usr/local/lib/libmysql-chassis.so.0: cannot restore segment prot after reloc: Permission denied
解决办法: 编辑 /etc/selinux/config,找到这段:
1 2 3 4 5 6
# This file controls the state of SELinux on the system. # SELINUX= can take one of these three values: # enforcing - SELinux security policy is enforced. # permissive - SELinux prints warnings instead of enforcing. # disabled - SELinux is fully disabled. SELINUX=enforcing
/usr/local/mysql/bin/mysql -uroot -h 192.168.1.6 -p 4040 Welcome to the MySQL monitor. Commands end with ; or /g. Your MySQL connection id is 32 Server version: 5.0.45 Type 'help;' or '/h' for help. Type '/c' to clear the buffer. mysql>