Gearman Install OSX

安裝Gearman 在OSX上面

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
$ sudo -s
$ cd /tmp
$ wget https://github.com/downloads/libevent/libevent/libevent-2.0.15-stable.tar.gz
$ tar zxvf libevent-2.0.15-stable.tar.gz
$ cd libevent-2.0.15-stable
$ ./configure
$ make
$ make install
$ cd ..
$ wget https://launchpad.net/ubuntu/lucid/+source/libdrizzle/0.7-1/+files/libdrizzle_0.7.orig.tar.gz
$ tar libdrizzle_0.7.orig.tar.gz
$ cd libdrizzle-0.7/
$ ./configure
$ make
$ make install
$ cd ..
$ wget http://launchpad.net/gearmand/trunk/0.14/+download/gearmand-0.14.tar.gz
$ tar zxvf gearmand-0.14.tar.gz
$ cd gearmand-0.14/
$ ./configure
$ make
$ make install
$ cd ..
$ wget http://pecl.php.net/get/gearman-0.8.0.tgz
$ tar zxvf gearman-0.8.0.tgz
$ cd gearman-0.8.0
$ phpize
$ ./configure
$ make
$ sudo make install
/bin/sh /tmp/gearman-0.8.0/libtool --mode=install cp ./gearman.la /tmp/gearman-0.8.0/modules
cp ./.libs/gearman.so /tmp/gearman-0.8.0/modules/gearman.so
cp ./.libs/gearman.lai /tmp/gearman-0.8.0/modules/gearman.la
----------------------------------------------------------------------
Libraries have been installed in:
   /tmp/gearman-0.8.0/modules
 
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `DYLD_LIBRARY_PATH' environment variable
     during execution
 
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
Installing shared extensions:     /usr/lib/php/extensions/no-debug-non-zts-20090626/
 
$ which php
/usr/bin/php
 
$ php --info | grep -i configuration                                                                                                  (11-17 13:30)
Configuration File (php.ini) Path => /etc
Loaded Configuration File => /private/etc/php.ini
Configuration
$ vi /private/etc/php.ini
======= 加入以下資訊 ======
extension_dir = " /usr/lib/php/extensions/no-debug-non-zts-20090626/"  <~~這不一定要
extension="gearman.so"
========================
$ php --info | egrep -i "(configuration|gearman)"
Configuration File (php.ini) Path => /etc
Loaded Configuration File => /private/etc/php.ini
Configuration
gearman
gearman support => enabled
libgearman version => 0.14

發表迴響

你的電子郵件位址並不會被公開。 必要欄位標記為 *