This paper briefly introduces the method of installing Gearmand and starting under rhel5.7, for everyone to study for reference!
First of all, to the official website https://launchpad.net/gearmand/Download Gearmand source package, uploaded to the rhel5.7 system, and decompression.
Run Configure:
The following error is reported:
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
Now you need to download boost and unzip:
./bootstrap.sh--prefix=/usr/local/boost/
This process needs to wait for some time, details can refer to official website: dochttp://www.boost.org/doc/libs/1_55_0/more/getting_started/unix-variants.html
After the installation is complete, go back to the Gearman directory and execute the following command:
Cppflags=-i/usr/local/boost/include ldflags=-l/usr/local/boost/lib./configure--prefix=/usr/local/gearman-- With-mysql--with-sqlite3=no
The following error is also reported:
Checking for gperf ... no configure:error:could find
gperf
The following is followed by the Yum installation:
Execute the above Configur again, no more error. OK, you can compile it.
A lot of errors were reported when you executed the Make command, which saw a:
./libgearman-1.0/gearman.h:53:27:error:tr1/cinttypes:no such file or directory
You can infer the problem with the GCC compiler and execute the command:
Yum Install gcc44 gcc44-c++ libstdc++44-devel-y
Execute after installation:
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
At this point, the installation was successful, and the following command was started (Queue persistence saved)
/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
At startup, it was found that the following error was reported:
/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
So obviously, the link file is not found because of the cause. Execute the following command:
Vi/etc/ld.so.conf.d/gearman.conf
Insert the following to save the exit
/usr/local/boost/lib/
/usr/local/gearman/lib/
Execute command
Execute the above start command again, so you can start Gearmand.