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

debian(wheezy)安装rabbitMQ,php

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

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'
Copier après la connexion

现在编译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
Copier après la connexion


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






Déclaration de ce site Web
Le contenu de cet article est volontairement contribué par les internautes et les droits d'auteur appartiennent à l'auteur original. Ce site n'assume aucune responsabilité légale correspondante. Si vous trouvez un contenu suspecté de plagiat ou de contrefaçon, veuillez contacter admin@php.cn

Outils d'IA chauds

Undresser.AI Undress

Undresser.AI Undress

Application basée sur l'IA pour créer des photos de nu réalistes

AI Clothes Remover

AI Clothes Remover

Outil d'IA en ligne pour supprimer les vêtements des photos.

Undress AI Tool

Undress AI Tool

Images de déshabillage gratuites

Clothoff.io

Clothoff.io

Dissolvant de vêtements AI

Video Face Swap

Video Face Swap

Échangez les visages dans n'importe quelle vidéo sans effort grâce à notre outil d'échange de visage AI entièrement gratuit !

Outils chauds

Bloc-notes++7.3.1

Bloc-notes++7.3.1

Éditeur de code facile à utiliser et gratuit

SublimeText3 version chinoise

SublimeText3 version chinoise

Version chinoise, très simple à utiliser

Envoyer Studio 13.0.1

Envoyer Studio 13.0.1

Puissant environnement de développement intégré PHP

Dreamweaver CS6

Dreamweaver CS6

Outils de développement Web visuel

SublimeText3 version Mac

SublimeText3 version Mac

Logiciel d'édition de code au niveau de Dieu (SublimeText3)

Guide d'installation et de mise à niveau de PHP 8.4 pour Ubuntu et Debian Guide d'installation et de mise à niveau de PHP 8.4 pour Ubuntu et Debian Dec 24, 2024 pm 04:42 PM

PHP 8.4 apporte plusieurs nouvelles fonctionnalités, améliorations de sécurité et de performances avec une bonne quantité de dépréciations et de suppressions de fonctionnalités. Ce guide explique comment installer PHP 8.4 ou mettre à niveau vers PHP 8.4 sur Ubuntu, Debian ou leurs dérivés. Bien qu'il soit possible de compiler PHP à partir des sources, son installation à partir d'un référentiel APT comme expliqué ci-dessous est souvent plus rapide et plus sécurisée car ces référentiels fourniront les dernières corrections de bogues et mises à jour de sécurité à l'avenir.

7 fonctions PHP que je regrette de ne pas connaître auparavant 7 fonctions PHP que je regrette de ne pas connaître auparavant Nov 13, 2024 am 09:42 AM

Si vous êtes un développeur PHP expérimenté, vous aurez peut-être le sentiment d'y être déjà allé et de l'avoir déjà fait. Vous avez développé un nombre important d'applications, débogué des millions de lignes de code et peaufiné de nombreux scripts pour réaliser des opérations.

Comment configurer Visual Studio Code (VS Code) pour le développement PHP Comment configurer Visual Studio Code (VS Code) pour le développement PHP Dec 20, 2024 am 11:31 AM

Visual Studio Code, également connu sous le nom de VS Code, est un éditeur de code source gratuit – ou environnement de développement intégré (IDE) – disponible pour tous les principaux systèmes d'exploitation. Avec une large collection d'extensions pour de nombreux langages de programmation, VS Code peut être c

Expliquez les jetons Web JSON (JWT) et leur cas d'utilisation dans les API PHP. Expliquez les jetons Web JSON (JWT) et leur cas d'utilisation dans les API PHP. Apr 05, 2025 am 12:04 AM

JWT est une norme ouverte basée sur JSON, utilisée pour transmettre en toute sécurité des informations entre les parties, principalement pour l'authentification de l'identité et l'échange d'informations. 1. JWT se compose de trois parties: en-tête, charge utile et signature. 2. Le principe de travail de JWT comprend trois étapes: la génération de JWT, la vérification de la charge utile JWT et l'analyse. 3. Lorsque vous utilisez JWT pour l'authentification en PHP, JWT peut être généré et vérifié, et les informations sur le rôle et l'autorisation des utilisateurs peuvent être incluses dans l'utilisation avancée. 4. Les erreurs courantes incluent une défaillance de vérification de signature, l'expiration des jetons et la charge utile surdimensionnée. Les compétences de débogage incluent l'utilisation des outils de débogage et de l'exploitation forestière. 5. L'optimisation des performances et les meilleures pratiques incluent l'utilisation des algorithmes de signature appropriés, la définition des périodes de validité raisonnablement,

Comment analysez-vous et traitez-vous HTML / XML dans PHP? Comment analysez-vous et traitez-vous HTML / XML dans PHP? Feb 07, 2025 am 11:57 AM

Ce tutoriel montre comment traiter efficacement les documents XML à l'aide de PHP. XML (Language de balisage extensible) est un langage de balisage basé sur le texte polyvalent conçu à la fois pour la lisibilité humaine et l'analyse de la machine. Il est couramment utilisé pour le stockage de données et

Programme PHP pour compter les voyelles dans une chaîne Programme PHP pour compter les voyelles dans une chaîne Feb 07, 2025 pm 12:12 PM

Une chaîne est une séquence de caractères, y compris des lettres, des nombres et des symboles. Ce tutoriel apprendra à calculer le nombre de voyelles dans une chaîne donnée en PHP en utilisant différentes méthodes. Les voyelles en anglais sont a, e, i, o, u, et elles peuvent être en majuscules ou en minuscules. Qu'est-ce qu'une voyelle? Les voyelles sont des caractères alphabétiques qui représentent une prononciation spécifique. Il y a cinq voyelles en anglais, y compris les majuscules et les minuscules: a, e, i, o, u Exemple 1 Entrée: String = "TutorialSpoint" Sortie: 6 expliquer Les voyelles dans la chaîne "TutorialSpoint" sont u, o, i, a, o, i. Il y a 6 yuans au total

Expliquez la liaison statique tardive en PHP (statique: :). Expliquez la liaison statique tardive en PHP (statique: :). Apr 03, 2025 am 12:04 AM

Liaison statique (statique: :) ​​implémente la liaison statique tardive (LSB) dans PHP, permettant à des classes d'appel d'être référencées dans des contextes statiques plutôt que de définir des classes. 1) Le processus d'analyse est effectué au moment de l'exécution, 2) Recherchez la classe d'appel dans la relation de succession, 3) il peut apporter des frais généraux de performance.

Quelles sont les méthodes PHP Magic (__construct, __ destruct, __ call, __get, __set, etc.) et fournir des cas d'utilisation? Quelles sont les méthodes PHP Magic (__construct, __ destruct, __ call, __get, __set, etc.) et fournir des cas d'utilisation? Apr 03, 2025 am 12:03 AM

Quelles sont les méthodes magiques de PHP? Les méthodes magiques de PHP incluent: 1. \ _ \ _ Construct, utilisé pour initialiser les objets; 2. \ _ \ _ Destruct, utilisé pour nettoyer les ressources; 3. \ _ \ _ Appel, gérer les appels de méthode inexistants; 4. \ _ \ _ GET, Implémentez l'accès à l'attribut dynamique; 5. \ _ \ _ SET, Implémentez les paramètres d'attribut dynamique. Ces méthodes sont automatiquement appelées dans certaines situations, améliorant la flexibilité et l'efficacité du code.

See all articles