Install gearman on centos

Source: Internet
Author: User
Centos installation of gearmanpost by rocdk890/2012-8-4 Saturday Linux technology comments today we asked me to install gearman on the server. The server environment is lamp. What is gearman? In fact, this gearman is a robust system for processing Distributed Process Communication. it provides a general application framework to forward tasks to other machines or processes. using gearman allows programs to achieve parallel work, load balancing, and cross-language calls. it can be used for different types of applications, from highly available web sites to database replication and transmission.
System: centos 5.5
Required Software Package: boost_000050_0.tar.gz gearman-1.0.2.tgz gearmand-0.34.tar.gz
1. Install boost
If boost is not installed, gearmand and gearman cannot be installed.
Http://download.slogra.com/gearman/boost_1_50_0.tar.gz wget-C
Tar zxf boost_000050_0.tar.gz & CD boost_000050_0
./Bootstrap. Sh -- prefix =/usr/local/Boost

If so, enter the following command:
./B2 install
This step takes a long time for installation. You can have a tea and have a rest.

If no problem exists, add the following in/etc/profile:
Export cppflags =-I/usr/local/Boost/include
Export ldflags =-L/usr/local/Boost/lib
Save and exit before running
Source/etc/profile
Now, boost is installed successfully.

2. Install gearmand
Http://download.slogra.com/gearman/gearmand-0.34.tar.gz wget-C
Tar zxf gearmand-0.34.tar.gz & CD gearmand-0.34
./Configure -- prefix =/usr/local/gearman

If configure: Error: unable to find libevent appears, enter the following command:
Yum-y install libevent-devel
Then re-configure.
Run the command again after the problem persists.
Make
In this step, the./libgearman-1.0/gearman. h: 53: 27: Error: tr1/cinttypes: no such file or directory error occurs. It can be inferred that it is a problem with the GCC compiler, run the following:
Yum install gcc44 gcc44-c ++ libstdc ++ 44-devel-y
Then add the following to the environment variable:
Export cc =/usr/bin/gcc44 or export cc =/usr/bin/GCC
Export cxx =/usr/bin/g ++ 44
Save and exit and execute:
Source/etc/profile
Delete the gearmand-0.34 folder and recompile it.
Execute make after re-compilation,

If no error is reported, the execution can continue.
Make install
If no error is reported, congratulations! You can continue to install gearman.

3. Install gearman
Gearman is to be integrated into PHP, so you must have a lamp environment. I already have a lamp environment on the server, so install it directly.
Http://download.slogra.com/gearman/gearman-1.0.2.tgz wget-C
Tar zxf gearman-1.0.2.tgz & CD gearman-1.0.2
/Usr/local/PHP/bin/phpize
./Configure -- With-gearman =/usr/local/gearman/-- With-PHP-Config =/usr/local/PHP/bin/PHP-config
Make & make install
If no error is reported, add the extension statement in PHP. ini.
VI/etc/PHP. ini
Extension = gearman. So
Extension_dir = "/usr/local/PHP/lib/PHP/extensions/no-debug-non-zts-20090626 /"

Restart httpd
Service httpd restart
Now, all the installation is successful.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.