Home php教程 php手册 debian(wheezy)安装rabbitMQ,php

debian(wheezy)安装rabbitMQ,php

Jun 06, 2016 pm 07:59 PM
debian php rabbitmq Install

php 1. 安装rabbitmq 官方http://previous.rabbitmq.com/ 如果要最新的3.1.x, 需要添加下面的官方的源地址到/etc/apt/sources.list deb http://www.rabbitmq.com/debian/ testing main 然后获取公钥 #wget http://www.rabbitmq.com/rabbitmq-signing-key-publ

php

1. 安装rabbitmq
官方http://previous.rabbitmq.com/
如果要最新的3.1.x, 需要添加下面的官方的源地址到/etc/apt/sources.list
deb http://www.rabbitmq.com/debian/ testing main
然后获取公钥
#wget http://www.rabbitmq.com/rabbitmq-signing-key-public.asc
#apt-key add rabbitmq-signing-key-public.asc
#apt-get update
#apt-get install rabbitmq-server


如果要stable版2.8.x的,直接aptitude就可以从debian仓库获取.
apt-get install rabbitmq-server
注意,安装的时候会装erlang的环境.


安装完成后, 会添加新的rabbitmq 用户和rabbitmq组. 并且库在/var/lib/rabbitmq


2.
文档在http://previous.rabbitmq.com/v2_8_x/documentation.html
配置文件/etc/rabbitmq, 默认是空的, 需要自己添加.
启动重启 /etc/init.d/rabbitmq-server start/stop/restart/reload
rabbitmqctl命令是rabbitmq的一个配置命令, 可以通过这个来新建host,用户,设置权限等.
    #rabbitmqctl add_vhost /rbmq_test   这里在根下创建了/rmbq_test这个host
    #rabbitmqctl add_user rmbq_user mq123456 创建了一个rbmq_user的用户,密码mq123456
    #rabbitmqctl set_permissions -p /rmbq_test rmbq_user ".*" ".*" ".*"
    这是配置rmbq_user对host拥有全部的权限,表示rmbq_user拥有对/rmbq_test的配置,读,写全部权限.




3.为了支持语言, 需要安装RabbitMQ扩展, 有php-amqp, php-rabbit, php-amqplib, pecl amqp
client, amqphp thumper,camqp等几种,symfony2 还有rabbitMqBundle的集成, 这里选了php-rabbit,
客户端我们选择rabbitmqadmin
需要安装RabbitMQ-C 的客户端库librabbitmq 

http://hg.rabbitmq.com/rabbitmq-c/
http://hg.rabbitmq.com/rabbitmq-codegen/
因为源码仓库有时候clone下来是空的, 所以找了一个github的和官方的codegen.

#git clone git@github.com:alanxz/rabbitmq-c.git
#cd rabbitmq-c 
#hg clone http://hg.rabbitmq.com/rabbitmq-codegen/
#mv rabbitmq-codegen codegen
#./configure && make && make install

( 我在csdn放了一份已经下载好的rabbitmq-c  和rabbitmq-codegen 的打包, 地址在这里

http://download.csdn.net/detail/rainysia/6938413

)

make[1]: Leaving directory `/etc/php5/rabbitmq-c'
make[1]: Entering directory `/etc/php5/rabbitmq-c'
 /bin/mkdir -p '/usr/local/lib'
 /bin/bash ./libtool   --mode=install /usr/bin/install -c   librabbitmq/librabbitmq.la '/usr/local/lib'
libtool: install: /usr/bin/install -c librabbitmq/.libs/librabbitmq.so.1.2.0 /usr/local/lib/librabbitmq.so.1.2.0
libtool: install: (cd /usr/local/lib && { ln -s -f librabbitmq.so.1.2.0 librabbitmq.so.1 || { rm -f librabbitmq.so.1 && ln -s librabbitmq.so.1.2.0 librabbitmq.so.1; }; })
libtool: install: (cd /usr/local/lib && { ln -s -f librabbitmq.so.1.2.0 librabbitmq.so || { rm -f librabbitmq.so && ln -s librabbitmq.so.1.2.0 librabbitmq.so; }; })
libtool: install: /usr/bin/install -c librabbitmq/.libs/librabbitmq.lai /usr/local/lib/librabbitmq.la
libtool: finish: PATH="/root/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/longene/qq/wine/bin/:/sbin" ldconfig -n /usr/local/lib
----------------------------------------------------------------------
Libraries have been installed in:
   /usr/local/lib

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 `LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH' environment variable
     during linking
   - use the `-Wl,-rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to `/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
 /bin/mkdir -p '/usr/local/include'
 /usr/bin/install -c -m 644 librabbitmq/amqp.h librabbitmq/amqp_framing.h librabbitmq/amqp_tcp_socket.h librabbitmq/amqp_ssl_socket.h '/usr/local/include'
 /bin/mkdir -p '/usr/local/lib/pkgconfig'
 /usr/bin/install -c -m 644 librabbitmq.pc '/usr/local/lib/pkgconfig'
make[1]: Leaving directory `/etc/php5/rabbitmq-c'
Copy after login

现在编译php-amqp扩展
https://code.google.com/p/php-amqp/
#wget https://code.google.com/p/php-amqp/downloads/detail?name=amqp-0.0.7.tgz&can=2&q=
#mv detail* amqp-0.0.7.tgz
#phpize && ./configure --with-amqp && make && make install


因为我这里编译一直过不了,error太多,库支持不行,于是直接从pecl里面装.
#pecl install amqp 一下就ok了.


root@debian:/etc/php5/amqp-1.0.0# pecl install amqp
downloading amqp-1.2.0.tgz ...
Starting to download amqp-1.2.0.tgz (46,847 bytes)
.............done: 46,847 bytes
15 source files, building
running: phpize
Configuring for:
PHP Api Version:         20100412
Zend Module Api No:      20100525
Zend Extension Api No:   220100525
building in /tmp/pear/temp/pear-build-rootSeLjkA/amqp-1.2.0
running: /tmp/pear/temp/amqp/configure
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for PHP prefix... /usr
checking for PHP includes... -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib
checking for PHP extension directory... /usr/lib/php5/20100525
checking for PHP installed headers prefix... /usr/include/php5
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... no
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
checking for gawk... gawk
checking for amqp support... yes, shared
checking for amqp... yes, shared
yes
checking for amqp files in default path... found in /usr/local
checking how to print strings... printf
checking for a sed that does not truncate output... (cached) /bin/sed
checking for fgrep... /bin/grep -F
checking for ld used by cc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking for gawk... (cached) gawk
checking command to parse /usr/bin/nm -B output from cc object... ok
checking for sysroot... no
checking for mt... mt
checking if mt is a manifest tool... no
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if cc supports -fno-rtti -fno-exceptions... no
checking for cc option to produce PIC... -fPIC -DPIC
checking if cc PIC flag -fPIC -DPIC works... yes
checking if cc static flag -static works... yes
checking if cc supports -c -o file.o... yes
checking if cc supports -c -o file.o... (cached) yes
checking whether the cc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
configure: creating ./config.status
config.status: creating config.h
config.status: executing libtool commands
running: make
/bin/bash /tmp/pear/temp/pear-build-rootSeLjkA/amqp-1.2.0/libtool --mode=compile cc  -I. -I/tmp/pear/temp/amqp -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootSeLjkA/amqp-1.2.0/include -I/tmp/pear/temp/pear-build-rootSeLjkA/amqp-1.2.0/main -I/tmp/pear/temp/amqp -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -I/usr/local/include  -DHAVE_CONFIG_H  -g -O2   -c /tmp/pear/temp/amqp/amqp.c -o amqp.lo
libtool: compile:  cc -I. -I/tmp/pear/temp/amqp -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootSeLjkA/amqp-1.2.0/include -I/tmp/pear/temp/pear-build-rootSeLjkA/amqp-1.2.0/main -I/tmp/pear/temp/amqp -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/amqp/amqp.c  -fPIC -DPIC -o .libs/amqp.o
/tmp/pear/temp/amqp/amqp.c: In function 'amqp_error':
/tmp/pear/temp/amqp/amqp.c:592:4: warning: 'amqp_error_string' is deprecated (declared at /usr/local/include/amqp.h:1996) [-Wdeprecated-declarations]
/bin/bash /tmp/pear/temp/pear-build-rootSeLjkA/amqp-1.2.0/libtool --mode=compile cc  -I. -I/tmp/pear/temp/amqp -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootSeLjkA/amqp-1.2.0/include -I/tmp/pear/temp/pear-build-rootSeLjkA/amqp-1.2.0/main -I/tmp/pear/temp/amqp -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -I/usr/local/include  -DHAVE_CONFIG_H  -g -O2   -c /tmp/pear/temp/amqp/amqp_exchange.c -o amqp_exchange.lo
libtool: compile:  cc -I. -I/tmp/pear/temp/amqp -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootSeLjkA/amqp-1.2.0/include -I/tmp/pear/temp/pear-build-rootSeLjkA/amqp-1.2.0/main -I/tmp/pear/temp/amqp -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/amqp/amqp_exchange.c  -fPIC -DPIC -o .libs/amqp_exchange.o
/tmp/pear/temp/amqp/amqp_exchange.c: In function 'zim_amqp_exchange_class_publish':
/tmp/pear/temp/amqp/amqp_exchange.c:868:9: warning: 'amqp_error_string' is deprecated (declared at /usr/local/include/amqp.h:1996) [-Wdeprecated-declarations]
/bin/bash /tmp/pear/temp/pear-build-rootSeLjkA/amqp-1.2.0/libtool --mode=compile cc  -I. -I/tmp/pear/temp/amqp -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootSeLjkA/amqp-1.2.0/include -I/tmp/pear/temp/pear-build-rootSeLjkA/amqp-1.2.0/main -I/tmp/pear/temp/amqp -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -I/usr/local/include  -DHAVE_CONFIG_H  -g -O2   -c /tmp/pear/temp/amqp/amqp_queue.c -o amqp_queue.lo
libtool: compile:  cc -I. -I/tmp/pear/temp/amqp -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootSeLjkA/amqp-1.2.0/include -I/tmp/pear/temp/pear-build-rootSeLjkA/amqp-1.2.0/main -I/tmp/pear/temp/amqp -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/amqp/amqp_queue.c  -fPIC -DPIC -o .libs/amqp_queue.o
/tmp/pear/temp/amqp/amqp_queue.c: In function 'read_message_from_channel':
/tmp/pear/temp/amqp/amqp_queue.c:277:4: warning: 'amqp_error_string' is deprecated (declared at /usr/local/include/amqp.h:1996) [-Wdeprecated-declarations]
/tmp/pear/temp/amqp/amqp_queue.c:334:4: warning: 'amqp_error_string' is deprecated (declared at /usr/local/include/amqp.h:1996) [-Wdeprecated-declarations]
/tmp/pear/temp/amqp/amqp_queue.c:418:5: warning: 'amqp_error_string' is deprecated (declared at /usr/local/include/amqp.h:1996) [-Wdeprecated-declarations]
/bin/bash /tmp/pear/temp/pear-build-rootSeLjkA/amqp-1.2.0/libtool --mode=compile cc  -I. -I/tmp/pear/temp/amqp -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootSeLjkA/amqp-1.2.0/include -I/tmp/pear/temp/pear-build-rootSeLjkA/amqp-1.2.0/main -I/tmp/pear/temp/amqp -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -I/usr/local/include  -DHAVE_CONFIG_H  -g -O2   -c /tmp/pear/temp/amqp/amqp_connection.c -o amqp_connection.lo
libtool: compile:  cc -I. -I/tmp/pear/temp/amqp -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootSeLjkA/amqp-1.2.0/include -I/tmp/pear/temp/pear-build-rootSeLjkA/amqp-1.2.0/main -I/tmp/pear/temp/amqp -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/amqp/amqp_connection.c  -fPIC -DPIC -o .libs/amqp_connection.o
/tmp/pear/temp/amqp/amqp_connection.c: In function 'php_amqp_connect':
/tmp/pear/temp/amqp/amqp_connection.c:181:2: warning: 'amqp_set_sockfd' is deprecated (declared at /usr/local/include/amqp.h:1030) [-Wdeprecated-declarations]
/bin/bash /tmp/pear/temp/pear-build-rootSeLjkA/amqp-1.2.0/libtool --mode=compile cc  -I. -I/tmp/pear/temp/amqp -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootSeLjkA/amqp-1.2.0/include -I/tmp/pear/temp/pear-build-rootSeLjkA/amqp-1.2.0/main -I/tmp/pear/temp/amqp -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -I/usr/local/include  -DHAVE_CONFIG_H  -g -O2   -c /tmp/pear/temp/amqp/amqp_channel.c -o amqp_channel.lo
libtool: compile:  cc -I. -I/tmp/pear/temp/amqp -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootSeLjkA/amqp-1.2.0/include -I/tmp/pear/temp/pear-build-rootSeLjkA/amqp-1.2.0/main -I/tmp/pear/temp/amqp -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/amqp/amqp_channel.c  -fPIC -DPIC -o .libs/amqp_channel.o
/bin/bash /tmp/pear/temp/pear-build-rootSeLjkA/amqp-1.2.0/libtool --mode=compile cc  -I. -I/tmp/pear/temp/amqp -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootSeLjkA/amqp-1.2.0/include -I/tmp/pear/temp/pear-build-rootSeLjkA/amqp-1.2.0/main -I/tmp/pear/temp/amqp -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -I/usr/local/include  -DHAVE_CONFIG_H  -g -O2   -c /tmp/pear/temp/amqp/amqp_envelope.c -o amqp_envelope.lo
libtool: compile:  cc -I. -I/tmp/pear/temp/amqp -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootSeLjkA/amqp-1.2.0/include -I/tmp/pear/temp/pear-build-rootSeLjkA/amqp-1.2.0/main -I/tmp/pear/temp/amqp -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/amqp/amqp_envelope.c  -fPIC -DPIC -o .libs/amqp_envelope.o
/bin/bash /tmp/pear/temp/pear-build-rootSeLjkA/amqp-1.2.0/libtool --mode=compile cc  -I. -I/tmp/pear/temp/amqp -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootSeLjkA/amqp-1.2.0/include -I/tmp/pear/temp/pear-build-rootSeLjkA/amqp-1.2.0/main -I/tmp/pear/temp/amqp -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -I/usr/local/include  -DHAVE_CONFIG_H  -g -O2   -c /tmp/pear/temp/amqp/amqp_object_store.c -o amqp_object_store.lo
libtool: compile:  cc -I. -I/tmp/pear/temp/amqp -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootSeLjkA/amqp-1.2.0/include -I/tmp/pear/temp/pear-build-rootSeLjkA/amqp-1.2.0/main -I/tmp/pear/temp/amqp -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/amqp/amqp_object_store.c  -fPIC -DPIC -o .libs/amqp_object_store.o
/bin/bash /tmp/pear/temp/pear-build-rootSeLjkA/amqp-1.2.0/libtool --mode=link cc -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootSeLjkA/amqp-1.2.0/include -I/tmp/pear/temp/pear-build-rootSeLjkA/amqp-1.2.0/main -I/tmp/pear/temp/amqp -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -I/usr/local/include  -DHAVE_CONFIG_H  -g -O2   -o amqp.la -export-dynamic -avoid-version -prefer-pic -module -rpath /tmp/pear/temp/pear-build-rootSeLjkA/amqp-1.2.0/modules  amqp.lo amqp_exchange.lo amqp_queue.lo amqp_connection.lo amqp_channel.lo amqp_envelope.lo amqp_object_store.lo -Wl,-rpath,/usr/local/lib -L/usr/local/lib -lrabbitmq
libtool: link: cc -shared  -fPIC -DPIC  .libs/amqp.o .libs/amqp_exchange.o .libs/amqp_queue.o .libs/amqp_connection.o .libs/amqp_channel.o .libs/amqp_envelope.o .libs/amqp_object_store.o   -L/usr/local/lib /usr/local/lib/librabbitmq.so  -O2 -Wl,-rpath -Wl,/usr/local/lib   -Wl,-soname -Wl,amqp.so -o .libs/amqp.so
libtool: link: ( cd ".libs" && rm -f "amqp.la" && ln -s "../amqp.la" "amqp.la" )
/bin/bash /tmp/pear/temp/pear-build-rootSeLjkA/amqp-1.2.0/libtool --mode=install cp ./amqp.la /tmp/pear/temp/pear-build-rootSeLjkA/amqp-1.2.0/modules
libtool: install: cp ./.libs/amqp.so /tmp/pear/temp/pear-build-rootSeLjkA/amqp-1.2.0/modules/amqp.so
libtool: install: cp ./.libs/amqp.lai /tmp/pear/temp/pear-build-rootSeLjkA/amqp-1.2.0/modules/amqp.la
libtool: finish: PATH="/usr/bin:/root/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/longene/qq/wine/bin/:/sbin" ldconfig -n /tmp/pear/temp/pear-build-rootSeLjkA/amqp-1.2.0/modules
----------------------------------------------------------------------
Libraries have been installed in:
   /tmp/pear/temp/pear-build-rootSeLjkA/amqp-1.2.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 `LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH' environment variable
     during linking
   - use the `-Wl,-rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to `/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------

Build complete.
Don't forget to run 'make test'.

running: make INSTALL_ROOT="/tmp/pear/temp/pear-build-rootSeLjkA/install-amqp-1.2.0" install
Installing shared extensions:     /tmp/pear/temp/pear-build-rootSeLjkA/install-amqp-1.2.0/usr/lib/php5/20100525/
running: find "/tmp/pear/temp/pear-build-rootSeLjkA/install-amqp-1.2.0" | xargs ls -dils
11277221   4 drwxr-xr-x 3 root root   4096 Feb 19 18:42 /tmp/pear/temp/pear-build-rootSeLjkA/install-amqp-1.2.0
11277255   4 drwxr-xr-x 3 root root   4096 Feb 19 18:42 /tmp/pear/temp/pear-build-rootSeLjkA/install-amqp-1.2.0/usr
11277256   4 drwxr-xr-x 3 root root   4096 Feb 19 18:42 /tmp/pear/temp/pear-build-rootSeLjkA/install-amqp-1.2.0/usr/lib
11277257   4 drwxr-xr-x 3 root root   4096 Feb 19 18:42 /tmp/pear/temp/pear-build-rootSeLjkA/install-amqp-1.2.0/usr/lib/php5
11277258   4 drwxr-xr-x 2 root root   4096 Feb 19 18:42 /tmp/pear/temp/pear-build-rootSeLjkA/install-amqp-1.2.0/usr/lib/php5/20100525
11277254 404 -rwxr-xr-x 1 root root 412549 Feb 19 18:42 /tmp/pear/temp/pear-build-rootSeLjkA/install-amqp-1.2.0/usr/lib/php5/20100525/amqp.so

Build process completed successfully
Installing '/usr/lib/php5/20100525/amqp.so'
install ok: channel://pecl.php.net/amqp-1.2.0
configuration option "php_ini" is not set to php.ini location
You should add "extension=amqp.so" to php.ini
Copy after login


接下来设置下php.ini, debian是分布式的配置,
#echo "extension=/usr/lib/php5/20100525/amqp.so">/etc/php5/mods-available/amqp.ini
#ln -s /etc/php5/mods-available/amqp.ini /etc/php5/conf.d/amqp.ini
然后重启下server 
, 注意缺少安啥, 我的命令都是全的, 如果你缺少相应的命令, 请去安装, 可以参考我之前的文章.

debian(wheezy)安装rabbitMQ,php






Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

PHP 8.4 Installation and Upgrade guide for Ubuntu and Debian PHP 8.4 Installation and Upgrade guide for Ubuntu and Debian Dec 24, 2024 pm 04:42 PM

PHP 8.4 brings several new features, security improvements, and performance improvements with healthy amounts of feature deprecations and removals. This guide explains how to install PHP 8.4 or upgrade to PHP 8.4 on Ubuntu, Debian, or their derivati

How To Set Up Visual Studio Code (VS Code) for PHP Development How To Set Up Visual Studio Code (VS Code) for PHP Development Dec 20, 2024 am 11:31 AM

Visual Studio Code, also known as VS Code, is a free source code editor — or integrated development environment (IDE) — available for all major operating systems. With a large collection of extensions for many programming languages, VS Code can be c

7 PHP Functions I Regret I Didn't Know Before 7 PHP Functions I Regret I Didn't Know Before Nov 13, 2024 am 09:42 AM

If you are an experienced PHP developer, you might have the feeling that you’ve been there and done that already.You have developed a significant number of applications, debugged millions of lines of code, and tweaked a bunch of scripts to achieve op

How do you parse and process HTML/XML in PHP? How do you parse and process HTML/XML in PHP? Feb 07, 2025 am 11:57 AM

This tutorial demonstrates how to efficiently process XML documents using PHP. XML (eXtensible Markup Language) is a versatile text-based markup language designed for both human readability and machine parsing. It's commonly used for data storage an

Explain JSON Web Tokens (JWT) and their use case in PHP APIs. Explain JSON Web Tokens (JWT) and their use case in PHP APIs. Apr 05, 2025 am 12:04 AM

JWT is an open standard based on JSON, used to securely transmit information between parties, mainly for identity authentication and information exchange. 1. JWT consists of three parts: Header, Payload and Signature. 2. The working principle of JWT includes three steps: generating JWT, verifying JWT and parsing Payload. 3. When using JWT for authentication in PHP, JWT can be generated and verified, and user role and permission information can be included in advanced usage. 4. Common errors include signature verification failure, token expiration, and payload oversized. Debugging skills include using debugging tools and logging. 5. Performance optimization and best practices include using appropriate signature algorithms, setting validity periods reasonably,

PHP Program to Count Vowels in a String PHP Program to Count Vowels in a String Feb 07, 2025 pm 12:12 PM

A string is a sequence of characters, including letters, numbers, and symbols. This tutorial will learn how to calculate the number of vowels in a given string in PHP using different methods. The vowels in English are a, e, i, o, u, and they can be uppercase or lowercase. What is a vowel? Vowels are alphabetic characters that represent a specific pronunciation. There are five vowels in English, including uppercase and lowercase: a, e, i, o, u Example 1 Input: String = "Tutorialspoint" Output: 6 explain The vowels in the string "Tutorialspoint" are u, o, i, a, o, i. There are 6 yuan in total

Explain late static binding in PHP (static::). Explain late static binding in PHP (static::). Apr 03, 2025 am 12:04 AM

Static binding (static::) implements late static binding (LSB) in PHP, allowing calling classes to be referenced in static contexts rather than defining classes. 1) The parsing process is performed at runtime, 2) Look up the call class in the inheritance relationship, 3) It may bring performance overhead.

What are PHP magic methods (__construct, __destruct, __call, __get, __set, etc.) and provide use cases? What are PHP magic methods (__construct, __destruct, __call, __get, __set, etc.) and provide use cases? Apr 03, 2025 am 12:03 AM

What are the magic methods of PHP? PHP's magic methods include: 1.\_\_construct, used to initialize objects; 2.\_\_destruct, used to clean up resources; 3.\_\_call, handle non-existent method calls; 4.\_\_get, implement dynamic attribute access; 5.\_\_set, implement dynamic attribute settings. These methods are automatically called in certain situations, improving code flexibility and efficiency.

See all articles