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

debian(wheezy)安装rabbitMQ,php

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

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'
Salin selepas log masuk

现在编译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
Salin selepas log masuk


接下来设置下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






Kenyataan Laman Web ini
Kandungan artikel ini disumbangkan secara sukarela oleh netizen, dan hak cipta adalah milik pengarang asal. Laman web ini tidak memikul tanggungjawab undang-undang yang sepadan. Jika anda menemui sebarang kandungan yang disyaki plagiarisme atau pelanggaran, sila hubungi admin@php.cn

Alat AI Hot

Undresser.AI Undress

Undresser.AI Undress

Apl berkuasa AI untuk mencipta foto bogel yang realistik

AI Clothes Remover

AI Clothes Remover

Alat AI dalam talian untuk mengeluarkan pakaian daripada foto.

Undress AI Tool

Undress AI Tool

Gambar buka pakaian secara percuma

Clothoff.io

Clothoff.io

Penyingkiran pakaian AI

Video Face Swap

Video Face Swap

Tukar muka dalam mana-mana video dengan mudah menggunakan alat tukar muka AI percuma kami!

Alat panas

Notepad++7.3.1

Notepad++7.3.1

Editor kod yang mudah digunakan dan percuma

SublimeText3 versi Cina

SublimeText3 versi Cina

Versi Cina, sangat mudah digunakan

Hantar Studio 13.0.1

Hantar Studio 13.0.1

Persekitaran pembangunan bersepadu PHP yang berkuasa

Dreamweaver CS6

Dreamweaver CS6

Alat pembangunan web visual

SublimeText3 versi Mac

SublimeText3 versi Mac

Perisian penyuntingan kod peringkat Tuhan (SublimeText3)

Panduan Pemasangan dan Naik Taraf PHP 8.4 untuk Ubuntu dan Debian Panduan Pemasangan dan Naik Taraf PHP 8.4 untuk Ubuntu dan Debian Dec 24, 2024 pm 04:42 PM

PHP 8.4 membawa beberapa ciri baharu, peningkatan keselamatan dan peningkatan prestasi dengan jumlah penamatan dan penyingkiran ciri yang sihat. Panduan ini menerangkan cara memasang PHP 8.4 atau naik taraf kepada PHP 8.4 pada Ubuntu, Debian, atau terbitan mereka

7 Fungsi PHP Saya Menyesal Saya Tidak Tahu Sebelum ini 7 Fungsi PHP Saya Menyesal Saya Tidak Tahu Sebelum ini Nov 13, 2024 am 09:42 AM

Jika anda seorang pembangun PHP yang berpengalaman, anda mungkin merasakan bahawa anda telah berada di sana dan telah melakukannya. Anda telah membangunkan sejumlah besar aplikasi, menyahpenyahpepijat berjuta-juta baris kod dan mengubah suai sekumpulan skrip untuk mencapai op

Cara Menyediakan Kod Visual Studio (Kod VS) untuk Pembangunan PHP Cara Menyediakan Kod Visual Studio (Kod VS) untuk Pembangunan PHP Dec 20, 2024 am 11:31 AM

Kod Visual Studio, juga dikenali sebagai Kod VS, ialah editor kod sumber percuma — atau persekitaran pembangunan bersepadu (IDE) — tersedia untuk semua sistem pengendalian utama. Dengan koleksi sambungan yang besar untuk banyak bahasa pengaturcaraan, Kod VS boleh menjadi c

Jelaskan JSON Web Tokens (JWT) dan kes penggunaannya dalam PHP API. Jelaskan JSON Web Tokens (JWT) dan kes penggunaannya dalam PHP API. Apr 05, 2025 am 12:04 AM

JWT adalah standard terbuka berdasarkan JSON, yang digunakan untuk menghantar maklumat secara selamat antara pihak, terutamanya untuk pengesahan identiti dan pertukaran maklumat. 1. JWT terdiri daripada tiga bahagian: header, muatan dan tandatangan. 2. Prinsip kerja JWT termasuk tiga langkah: menjana JWT, mengesahkan JWT dan muatan parsing. 3. Apabila menggunakan JWT untuk pengesahan di PHP, JWT boleh dijana dan disahkan, dan peranan pengguna dan maklumat kebenaran boleh dimasukkan dalam penggunaan lanjutan. 4. Kesilapan umum termasuk kegagalan pengesahan tandatangan, tamat tempoh, dan muatan besar. Kemahiran penyahpepijatan termasuk menggunakan alat debugging dan pembalakan. 5. Pengoptimuman prestasi dan amalan terbaik termasuk menggunakan algoritma tandatangan yang sesuai, menetapkan tempoh kesahihan dengan munasabah,

Bagaimana anda menghuraikan dan memproses HTML/XML dalam PHP? Bagaimana anda menghuraikan dan memproses HTML/XML dalam PHP? Feb 07, 2025 am 11:57 AM

Tutorial ini menunjukkan cara memproses dokumen XML dengan cekap menggunakan PHP. XML (bahasa markup extensible) adalah bahasa markup berasaskan teks yang serba boleh yang direka untuk pembacaan manusia dan parsing mesin. Ia biasanya digunakan untuk penyimpanan data

Program PHP untuk mengira vokal dalam rentetan Program PHP untuk mengira vokal dalam rentetan Feb 07, 2025 pm 12:12 PM

Rentetan adalah urutan aksara, termasuk huruf, nombor, dan simbol. Tutorial ini akan mempelajari cara mengira bilangan vokal dalam rentetan yang diberikan dalam PHP menggunakan kaedah yang berbeza. Vokal dalam bahasa Inggeris adalah a, e, i, o, u, dan mereka boleh menjadi huruf besar atau huruf kecil. Apa itu vokal? Vokal adalah watak abjad yang mewakili sebutan tertentu. Terdapat lima vokal dalam bahasa Inggeris, termasuk huruf besar dan huruf kecil: a, e, i, o, u Contoh 1 Input: String = "TutorialSpoint" Output: 6 menjelaskan Vokal dalam rentetan "TutorialSpoint" adalah u, o, i, a, o, i. Terdapat 6 yuan sebanyak 6

Terangkan pengikatan statik lewat dalam php (statik: :). Terangkan pengikatan statik lewat dalam php (statik: :). Apr 03, 2025 am 12:04 AM

Mengikat statik (statik: :) Melaksanakan pengikatan statik lewat (LSB) dalam PHP, yang membolehkan kelas panggilan dirujuk dalam konteks statik dan bukannya menentukan kelas. 1) Proses parsing dilakukan pada masa runtime, 2) Cari kelas panggilan dalam hubungan warisan, 3) ia boleh membawa overhead prestasi.

Apakah kaedah Magic PHP (__construct, __destruct, __call, __get, __set, dll) dan menyediakan kes penggunaan? Apakah kaedah Magic PHP (__construct, __destruct, __call, __get, __set, dll) dan menyediakan kes penggunaan? Apr 03, 2025 am 12:03 AM

Apakah kaedah sihir PHP? Kaedah sihir PHP termasuk: 1. \ _ \ _ Membina, digunakan untuk memulakan objek; 2. \ _ \ _ Destruct, digunakan untuk membersihkan sumber; 3. \ _ \ _ Call, mengendalikan panggilan kaedah yang tidak wujud; 4. \ _ \ _ Mendapatkan, melaksanakan akses atribut dinamik; 5. \ _ \ _ Set, melaksanakan tetapan atribut dinamik. Kaedah ini secara automatik dipanggil dalam situasi tertentu, meningkatkan fleksibiliti dan kecekapan kod.

See all articles