rhel5.7下安裝gearmand及啟動(dòng)的方法
本文簡(jiǎn)述了在rhel5.7下安裝gearmand及啟動(dòng)的方法,供大家學(xué)習(xí)參考!
首先,到官網(wǎng)https://launchpad.net/gearmand/下載gearmand的源碼包,傳到rhel5.7的系統(tǒng)上,并解壓。
運(yùn)行configure:
[@localhost gearmand-1.1.11]# ./configure --prefix=/usr/local/gearman --with-mysql --with-sqlite3=no
這時(shí)候會(huì)出現(xiàn)報(bào)如下錯(cuò)誤:
checking for Boost headers version >= 1.39.0... no configure: error: cannot find Boost headers version >= 1.39.0 ok,http://sourceforge.net/projects/boost/files/boost/1.55.0/boost_1_55_0.tar.gz/download
此時(shí)需要下載boost,并解壓:
./bootstrap.sh --prefix=/usr/local/boost/ ./b2 install
這個(gè)過(guò)程需要等待一段時(shí)間,詳情可參考官網(wǎng):dochttp://www.boost.org/doc/libs/1_55_0/more/getting_started/unix-variants.html
安裝完成之后,回到gearman目錄,執(zhí)行如下命令:
CPPFLAGS=-I/usr/local/boost/include LDFLAGS=-L/usr/local/boost/lib ./configure --prefix=/usr/local/gearman --with-mysql --with-sqlite3=no
這時(shí)還會(huì)報(bào)如下錯(cuò)誤:
checking for gperf... no configure: error: could not find gperf
緊接著執(zhí)行yum安裝:
再次執(zhí)行以上的configur,再?zèng)]有報(bào)錯(cuò)。OK,可以進(jìn)行編譯了。
在執(zhí)行make命令時(shí),報(bào)了很多的錯(cuò),其中看到有個(gè):
./libgearman-1.0/gearman.h:53:27: error: tr1/cinttypes: No such file or directory
可以推斷是gcc編譯器的問(wèn)題,執(zhí)行命令:
yum install gcc44 gcc44-c++ libstdc++44-devel -y
安裝完畢之后執(zhí)行:
CXX=/usr/bin/g++44 CC=/usr/bin/gcc44 CPPFLAGS=-I/usr/local/boost/include LDFLAGS=-L/usr/local/boost/lib ./configure --prefix=/usr/local/gearman --with-mysql --with-sqlite3=no
make && make install
至此,安裝成功,執(zhí)行以下命令啟動(dòng)(隊(duì)列持久化保存)
/usr/local/gearman/sbin/gearmand -p 4730 -L 0.0.0.0 --log-file=/tmp/gearmand-4730.log --pid-file=/tmp/gearmand-4730.pid -q MySQL --mysql-host=localhost --mysql-user=root --mysql-db=gearman --verbose DEBUG -d
啟動(dòng)時(shí),發(fā)現(xiàn)有報(bào)如下錯(cuò)誤:
/usr/local/gearman/sbin/gearmand: error while loading shared libraries: libboost_program_options.so.1.55.0: cannot open shared object file: No such file or directory
那么很明顯,是由于鏈接文件找不到的緣故所導(dǎo)致的。執(zhí)行如下命令:
vi /etc/ld.so.conf.d/gearman.conf
插入以下內(nèi)容,保存退出
/usr/local/boost/lib/ /usr/local/gearman/lib/
執(zhí)行命令
ldconfig
再次執(zhí)行上面的啟動(dòng)命令,至此即可啟動(dòng)gearmand.
- php使用gearman進(jìn)行任務(wù)分發(fā)操作實(shí)例詳解
- python基于json文件實(shí)現(xiàn)的gearman任務(wù)自動(dòng)重啟代碼實(shí)例
- gearman中worker常駐后臺(tái),導(dǎo)致MySQL server has gone away的解決方法
- PHP使用gearman進(jìn)行異步的郵件或短信發(fā)送操作詳解
- gearman + mysql方式實(shí)現(xiàn)持久化操作示例
- gearman管理工具GearmanManager的安裝與php使用方法示例
- PHP并發(fā)多進(jìn)程處理利器Gearman使用介紹
- Gearman::XS在Centos下的編譯安裝方法
- gearman隊(duì)列持久化引發(fā)的問(wèn)題及解決方法
- gearman的安裝啟動(dòng)及python API使用實(shí)例
- gearman中任務(wù)的優(yōu)先級(jí)和返回狀態(tài)實(shí)例分析
相關(guān)文章
一些Linux Shell中的權(quán)限相關(guān)知識(shí)總結(jié)
這篇文章主要介紹了一些Linux Shell中的權(quán)限相關(guān)知識(shí)總結(jié),使Linux入門(mén)學(xué)習(xí)中的基礎(chǔ)知識(shí),需要的朋友可以參考下2015-07-07如何解決jenkins 執(zhí)行shell腳本 sh: ... not f
這篇文章主要介紹了如何解決jenkins 執(zhí)行shell腳本 sh: ... not found的問(wèn)題,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。2023-06-06Linux 下mysql通過(guò)存儲(chǔ)過(guò)程實(shí)現(xiàn)批量生成記錄
這篇文章主要介紹了Linux 下mysql通過(guò)存儲(chǔ)過(guò)程實(shí)現(xiàn)批量生成記錄的相關(guān)資料,需要的朋友可以參考下2017-05-05shell腳本ssh遠(yuǎn)程執(zhí)行命令給變量賦值的問(wèn)題解決
本文主要介紹了shell腳本ssh遠(yuǎn)程執(zhí)行命令給變量賦值的問(wèn)題解決,就是從A機(jī)器通過(guò)SSH方式到B機(jī)器,并執(zhí)行相關(guān)的命令,具有一定的參考價(jià)值,感興趣的可以了解一下2023-07-07shell腳本實(shí)現(xiàn)mysql數(shù)據(jù)庫(kù)雙機(jī)定時(shí)備份的方法
最近有個(gè)需求,要求實(shí)現(xiàn)對(duì)某個(gè)數(shù)據(jù)庫(kù)進(jìn)行雙機(jī)備份,每天凌晨備份一次,要求主機(jī)器只保留最近十五天的記錄,我們決定用shell腳本加定時(shí)任務(wù)的方式來(lái)實(shí)現(xiàn)這個(gè)需求,接下來(lái)通過(guò)本文給大家介紹shell腳本實(shí)現(xiàn)mysql數(shù)據(jù)庫(kù)雙機(jī)定時(shí)備份的方法,感興趣的朋友一起看看吧2022-07-07獲取同一網(wǎng)段下所有機(jī)器MAC地址的shell腳本
有時(shí)候需要在當(dāng)前同一網(wǎng)段下所有機(jī)器MAC地址,需要的朋友可以參考下2013-01-01Python創(chuàng)建、刪除桌面、啟動(dòng)組快捷方式的例子分享
這篇文章主要介紹了Python創(chuàng)建、刪除桌面、啟動(dòng)組快捷方式的例子分享,需要的朋友可以參考下2014-04-04