自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

詳解在Centos 5.2下安裝最新Mysql Proxy LUA教程

移動(dòng)開發(fā) iOS
在Centos 5.2下安裝最新Mysql Proxy LUA教程是本文要介紹的內(nèi)容,主要是來了解Mysql Proxy LUA的安裝過程,文章中有很詳細(xì)的講解,具體內(nèi)容來看本文詳解。

Centos 5.2下安裝***Mysql Proxy LUA教程是本文要介紹的內(nèi)容,主要是來了解Mysql Proxy LUA的安裝過程,文章中有很詳細(xì)的講解,具體內(nèi)容來看本文詳解。

mysql proxy的代碼樹已經(jīng)遷移到lauchpad,采用bazaar進(jìn)行版本管理。參考了一些文檔,在centos 5.2下編譯安裝***mysql proxy成功。步驟記錄如下(在centos 5下應(yīng)該也適用):

首先讓EPEL (Extra Packages for Enterprise Linux) repository 生效

  1. #rpm -Uvhhttp://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm  

確定這些包已經(jīng)安裝:GNU Autotools, flex, pkg-config, bazaar, MySQL client libraries

  1. yum install autoconf automake libtool flex pkgconfig bzr mysql-devel  

centos下自帶的libevent版本超老,這個(gè)沒有別的辦法,只能自己重新編譯,版本需要在1.4.0以上,越高越好

  1. wget http://monkey.org/~provos/libevent-1.4.9-stable.tar.gz  
  2. tar zvfx libevent-1.4.9-stable.tar.gz  
  3. cd libevent-1.4.9-stable  
  4. /configure  
  5. make  
  6. make install  

centos自帶的glib版本也比較老,mysql proxy 0.7.0以上需要glib2 2.16.0以上才能編譯成功,因此不得不重新編譯glib

  1. wget http://ftp.gnome.org/pub/gnome/sources/glib/2.18/glib-2.18.4.tar.gz  
  2. tar zvfx glib-2.18.4.tar.gz  
  3. cd glib-2.18.4  
  4. /configure  
  5. make  
  6. make install  

編譯安裝lua 5.1

  1. wget http://www.lua.org/ftp/lua-5.1.4.tar.gz  
  2. tar zvfx lua-5.1.4.tar.gz  
  3. cd lua-5.1.4  
  4. vi src/Makefile  

在CFLAGS里加上-fPIC,因?yàn)槲以?4位機(jī)上編譯出現(xiàn)了“relocations”錯(cuò)誤

  1. make linux  
  2. make install  
  3. cp etc/lua.pc /usr/local/lib/pkgconfig/  

重要:讓pkg-config找到自己編譯的庫在哪里

  1. $exportPKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig  

***,從bazaar中檢出***的mysql-proxy源文件進(jìn)行編譯:

  1. bzr branch lp:mysql-proxy  
  2. cd mysql-proxy  
  3. /autogen.sh 

提示錯(cuò)誤:

  1. configure.in:10: require Automake 1.10, but have 1.9 

沒有找到解決方法

  1. /configure  
  2. make  
  3. make install 

mysql-proxy安裝采用源碼安裝

  1. wget http://launchpad.net/mysql-proxy/0.8/0.8.0/+download/mysql-proxy-0.8.0.tar.gz  
  2.  
  3. tar zxvf mysql-proxy-0.8.0.tar.gz  
  4. cd mysql-proxy-0.8.0  
  5. /configure  
  6. make  
  7. make install 

編譯完成,可以檢查一下最終結(jié)果:

  1. mysql-proxy -V  
  2. mysql-proxy 0.8.0  
  3.   glib2: 2.18.4  
  4.   libevent: 2.0.10-stable  
  5.   lua: Lua 5.1.4  
  6.  LUA_PATH: /usr/local/lib/mysql-proxy/lua/?.lua  
  7.  LUA_CPATH: /usr/local/lib/mysql-proxy/lua/?.so 
  8.   == plugins ==  
  9.   admin: 0.7.0  
  10.  
  11.   proxy: 0.7.0 

配置啟動(dòng)腳本,在系統(tǒng)啟動(dòng)時(shí)運(yùn)行mysql-proxycd/etc/init.d

  1. wget http://customcode.googlecode.com/files/mysql-proxy  
  2.  
  3. chmod0755/etc/init.d/mysql-proxy  
  4. chkconfig mysql-proxy on  

增加運(yùn)行參數(shù)

  1. cat>/etc/sysconfig/mysql-proxyOptions to mysql-proxy  
  2. do not remove --daemon  
  3. PROXY_OPTIONS="--daemon"  

CTRL+D保存,然后就可以使用以下命令啟動(dòng)|停止mysql-proxy

  1. /etc/init.d/mysql-proxy start|stop 

錯(cuò)誤解決

1、

  1. /etc/init.d/mysql-proxy  
  2. bash: /etc/init.d/mysql-proxy: /bin/bash^M: bad interpreter: No such file or directory 

執(zhí)行一下任意一命令將mysql-proxy轉(zhuǎn)換為unxi格式

  1. #dos2unxi /etc/init.d/mysql-proxy   
  2. #vi /etc/init.d/mysql-proxy  
  3. set ff=unix 

2、

  1. make[2]: *** [lua.o] Error 1  
  2. make[2]: Leaving directory `/software/lua-5.1.4/src'  
  3. make[1]: *** [linux] Error 2  
  4. make[1]: Leaving directory `/software/lua-5.1.4/src'  
  5. make: *** [linux] Error 2 

解決:

  1. #yum -y  install libtermcap-devel  ncurses-devel ncurses-devel ncurses-devel   

3、

  1. gconvert.c:55:2: error: #error GNU libiconv not in use but included iconv.h is from libiconv 

小結(jié):詳解在Centos 5.2下安裝***Mysql Proxy LUA教程的內(nèi)容介紹完了,希望通過本文的學(xué)習(xí)能對(duì)你有所幫助!

責(zé)任編輯:zhaolei 來源: 互聯(lián)網(wǎng)
相關(guān)推薦

2011-08-30 11:09:26

MySQL ProxyLua

2011-08-30 10:28:11

MySQL ProxyLUA

2011-08-30 12:49:59

Mysql ProxyLua分離

2011-08-30 11:00:10

MySQL ProxyLua

2011-08-30 09:47:00

Linux5u3luaMySQL Proxy

2011-08-24 11:03:33

LUA環(huán)境 安裝

2011-08-30 13:26:18

Mysql ProxyLua

2012-03-21 09:04:10

MySQL

2011-08-30 10:36:31

Ubuntu 9.04Mysql ProxyLua

2022-12-02 11:37:47

2009-01-14 14:17:07

RHELvsftpFTP配置

2010-05-12 21:54:00

網(wǎng)管

2011-08-30 09:59:47

Mysql ProxyLUA

2011-09-01 19:06:57

UbuntuLua安裝環(huán)境

2023-01-03 08:32:38

2011-09-01 17:46:22

MySQL ProxyLua腳本

2011-06-24 17:05:07

QT QT 4.7.3 windows

2011-04-08 10:10:23

2010-05-28 10:22:41

搭建SVN

2011-03-18 11:04:39

Centos 5.4zabbix 1.8.
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號(hào)