Sqlrelay-0.42安装失败的曲折过程
2011-07-07 18:25
176 查看
环境:CentOS 5.6,MySQL 5.5,sqlite-3.3.6-5(问题关键)。
步骤:
1、官网下载安装包:sqlrelay-0.42.tar.gz和rudiments-0.33.tar.gz。
2、安装rudiments,顺利
3、安装sqlrelay:
上面make这一步出错了,整个卡住的过程也就在此,提示如下:
出错后再make install,导致的结果是/usr/local/sqlrelay只有四个文件夹,没有etc(放配置文件)和share,而且bin里面的文件也不全,连启动服务的sqlr-start.exe都没有。
然后就是一顿狂搜+尝试,结果一一败下阵来。
百般无奈之下,有了个大胆的想法:修改sqliteconnection.C源文件再编译!因为报错信息中只涉及到SQLite,而我没有打算在SQLite上用sqlrelay,所以放心去改吧~
文件在src/connections/sqlite下。修改了两个地方,分别是:
修改后,make——OK,然后make install——OK。
4、配置sqlrelay
配置文件路径: /usr/local/sqlrelay/etc/sqlrelay.conf。内容如下:
5、启动sqlrelay
# export PATH=$PATH:/usr/local/sqlrelay/bin
# sqlr-start -id mypool
6、服务测试
# sqlrsh -id mypool
接着可执行SQL查询。
7、性能及其他需求测试
待续。。。
参考: http://www.linuxsir.org/main/?q=node/144 http://blog.csdn.net/jiying87/article/details/4722147 http://blog.163.com/e4lich@126/blog/static/848106502011014103645812/
步骤:
1、官网下载安装包:sqlrelay-0.42.tar.gz和rudiments-0.33.tar.gz。
2、安装rudiments,顺利
# tar vxzf rudiments-0.33.tar.gz # cd rudiments-0.33 # ./configure --prefix=/usr/local/rudiments # make # make install
3、安装sqlrelay:
# tar zxvf sqlrelay-0.42.tar.gz # cd sqlrelay-0.42 # ./configure --prefix=/usr/local/sqlrelay --with-rudiments-prefix=/usr/local/rudiments --with-mysql-prefix=/usr/share/mysql # make # make install
上面make这一步出错了,整个卡住的过程也就在此,提示如下:
sqliteconnection.C: In member function ‘int sqlitecursor::runQuery(const char*)’: sqliteconnection.C:260: 错误:从类型 ‘void*’ 到类型 ‘char*’ 的转换无效 sqliteconnection.C:260: 错误: 初始化实参 1,属于 ‘void sqlite3_free(char*)’ sqliteconnection.C: In member function ‘char* sqliteconnection::duplicate(const char*)’: sqliteconnection.C:418: 错误:‘sqlite3_malloc’ 在此作用域中尚未声明 make[3]: *** [sqliteconnection.lo] 错误 1 make[3]: Leaving directory `/root/sqlrelay-0.42/src/connections/sqlite' make[2]: *** [all] 错误 2 make[2]: Leaving directory `/root/sqlrelay-0.42/src/connections' make[1]: *** [all] 错误 2 make[1]: Leaving directory `/root/sqlrelay-0.42/src' make: *** [all] 错误 2
出错后再make install,导致的结果是/usr/local/sqlrelay只有四个文件夹,没有etc(放配置文件)和share,而且bin里面的文件也不全,连启动服务的sqlr-start.exe都没有。
然后就是一顿狂搜+尝试,结果一一败下阵来。
百般无奈之下,有了个大胆的想法:修改sqliteconnection.C源文件再编译!因为报错信息中只涉及到SQLite,而我没有打算在SQLite上用sqlrelay,所以放心去改吧~
文件在src/connections/sqlite下。修改了两个地方,分别是:
260行:由sqlite3_free((void *)sqliteconn->errmesg);改为sqlite3_free((char *)sqliteconn->errmesg); //感到相当堵,不知是不是环境问题? 418行:由char *buffer=(char *)sqlite3_malloc(length+1);改为char *buffer=(char *)malloc(length+1); //这个隐患相当大,目前只是没有办法的办法
修改后,make——OK,然后make install——OK。
4、配置sqlrelay
配置文件路径: /usr/local/sqlrelay/etc/sqlrelay.conf。内容如下:
<?xml version="1.0"?> <!DOCTYPE instances SYSTEM "sqlrelay.dtd"> <instances> <!-- Regular SQL Relay Instance --> <instance id="mypool" port="9000" socket="/tmp/example.socket" dbase="mysql" connections="3" maxconnections="15" maxqueuelength="5" growby="1" ttl="60" maxsessioncount="1000" endofsession="commit" sessiontimeout="600" runasuser="nobody" runasgroup="nobody" cursors="5" authtier="listener" handoff="pass" deniedips="" allowedips="" debug="none" maxquerysize="65536" maxstringbindvaluelength="4000" maxlobbindvaluelength="71680" idleclienttimeout="-1" maxlisteners="-1" listenertimeout="0" reloginatstart="no" timequeriessec="-1" timequeriesusec="-1"> <users> <user user="userpool" password="pwpool"/> </users> <connections> <connection connectionid="db1" string="user=root;password=123456;db=yourdb;host=127.0.0.1;port=3306;"metric="1" behindloadbalancer="no"/> </connections> </instance> </instances>
5、启动sqlrelay
# export PATH=$PATH:/usr/local/sqlrelay/bin
# sqlr-start -id mypool
6、服务测试
# sqlrsh -id mypool
接着可执行SQL查询。
7、性能及其他需求测试
待续。。。
参考: http://www.linuxsir.org/main/?q=node/144 http://blog.csdn.net/jiying87/article/details/4722147 http://blog.163.com/e4lich@126/blog/static/848106502011014103645812/
相关文章推荐
- SQL安装过程中“针对SQL Server 注册表的一致性验证“出错解决方式
- Microsoft SQL Server Desktop Engine安装过程中遇到的问题(1)
- SQL安装失败
- sql安装过程中,为 SQL Server 代理服务提供的凭据无效
- Oracle应用工具软件——PL/SQL Developer下载、安装、启动过程图解!
- SQL安装时出错,提示:安装程序配置服务器失败 参考服务器错误日志。针对其中一种情况的解决方法!
- oracle11g安装过程提示swap size 检查失败问题
- 如果出现安装失败,进行重新安装和卸载的过程
- Windows8.1系统安装更新重启过程中提示更新失败
- SQL Server 2008 安装过程中遇到“性能计数器注册表配置单元一致性”检查失败 问题的解决方法
- SQL安装配制失败
- [转载]安装Oracle11gR2先决条件检查失败的详细解决处理过程
- SQL 安装过程
- 安装MS SQL Server 2008 提示“性能计数器注册表配置单元一致性”失败的解决办法
- 安装VS2010的过程遇到VC10.0 Runtime组件安装失败怎么解决
- Ubuntu 12.04软件中心安装flash插件过程失败解决办法
- SQL安装重启计算机失败
- ASP.NET2.0网站配置的数据库连接失败问题(没有安装SQLEXPRESS数据库的时候)
- 安装Oracle11gR2先决条件检查失败的详细解决处理过程
- dpkg安装失败解决过程