ホームページ 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'
ログイン後にコピー

现在编译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
ログイン後にコピー


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






このウェブサイトの声明
この記事の内容はネチズンが自主的に寄稿したものであり、著作権は原著者に帰属します。このサイトは、それに相当する法的責任を負いません。盗作または侵害の疑いのあるコンテンツを見つけた場合は、admin@php.cn までご連絡ください。

ホットAIツール

Undresser.AI Undress

Undresser.AI Undress

リアルなヌード写真を作成する AI 搭載アプリ

AI Clothes Remover

AI Clothes Remover

写真から衣服を削除するオンライン AI ツール。

Undress AI Tool

Undress AI Tool

脱衣画像を無料で

Clothoff.io

Clothoff.io

AI衣類リムーバー

Video Face Swap

Video Face Swap

完全無料の AI 顔交換ツールを使用して、あらゆるビデオの顔を簡単に交換できます。

ホットツール

メモ帳++7.3.1

メモ帳++7.3.1

使いやすく無料のコードエディター

SublimeText3 中国語版

SublimeText3 中国語版

中国語版、とても使いやすい

ゼンドスタジオ 13.0.1

ゼンドスタジオ 13.0.1

強力な PHP 統合開発環境

ドリームウィーバー CS6

ドリームウィーバー CS6

ビジュアル Web 開発ツール

SublimeText3 Mac版

SublimeText3 Mac版

神レベルのコード編集ソフト(SublimeText3)

Ubuntu および Debian 用の PHP 8.4 インストールおよびアップグレード ガイド Ubuntu および Debian 用の PHP 8.4 インストールおよびアップグレード ガイド Dec 24, 2024 pm 04:42 PM

PHP 8.4 では、いくつかの新機能、セキュリティの改善、パフォーマンスの改善が行われ、かなりの量の機能の非推奨と削除が行われています。 このガイドでは、Ubuntu、Debian、またはその派生版に PHP 8.4 をインストールする方法、または PHP 8.4 にアップグレードする方法について説明します。

今まで知らなかったことを後悔している 7 つの PHP 関数 今まで知らなかったことを後悔している 7 つの PHP 関数 Nov 13, 2024 am 09:42 AM

あなたが経験豊富な PHP 開発者であれば、すでにそこにいて、すでにそれを行っていると感じているかもしれません。あなたは、運用を達成するために、かなりの数のアプリケーションを開発し、数百万行のコードをデバッグし、大量のスクリプトを微調整してきました。

PHP 開発用に Visual Studio Code (VS Code) をセットアップする方法 PHP 開発用に Visual Studio Code (VS Code) をセットアップする方法 Dec 20, 2024 am 11:31 AM

Visual Studio Code (VS Code とも呼ばれる) は、すべての主要なオペレーティング システムで利用できる無料のソース コード エディター (統合開発環境 (IDE)) です。 多くのプログラミング言語の拡張機能の大規模なコレクションを備えた VS Code は、

JSON Web Tokens(JWT)とPHP APIでのユースケースを説明してください。 JSON Web Tokens(JWT)とPHP APIでのユースケースを説明してください。 Apr 05, 2025 am 12:04 AM

JWTは、JSONに基づくオープン標準であり、主にアイデンティティ認証と情報交換のために、当事者間で情報を安全に送信するために使用されます。 1。JWTは、ヘッダー、ペイロード、署名の3つの部分で構成されています。 2。JWTの実用的な原則には、JWTの生成、JWTの検証、ペイロードの解析という3つのステップが含まれます。 3. PHPでの認証にJWTを使用する場合、JWTを生成および検証でき、ユーザーの役割と許可情報を高度な使用に含めることができます。 4.一般的なエラーには、署名検証障害、トークンの有効期限、およびペイロードが大きくなります。デバッグスキルには、デバッグツールの使用とロギングが含まれます。 5.パフォーマンスの最適化とベストプラクティスには、適切な署名アルゴリズムの使用、有効期間を合理的に設定することが含まれます。

PHPでHTML/XMLを解析および処理するにはどうすればよいですか? PHPでHTML/XMLを解析および処理するにはどうすればよいですか? Feb 07, 2025 am 11:57 AM

このチュートリアルでは、PHPを使用してXMLドキュメントを効率的に処理する方法を示しています。 XML(拡張可能なマークアップ言語)は、人間の読みやすさとマシン解析の両方に合わせて設計された多用途のテキストベースのマークアップ言語です。一般的にデータストレージに使用されます

母音を文字列にカウントするPHPプログラム 母音を文字列にカウントするPHPプログラム Feb 07, 2025 pm 12:12 PM

文字列は、文字、数字、シンボルを含む一連の文字です。このチュートリアルでは、さまざまな方法を使用してPHPの特定の文字列内の母音の数を計算する方法を学びます。英語の母音は、a、e、i、o、u、そしてそれらは大文字または小文字である可能性があります。 母音とは何ですか? 母音は、特定の発音を表すアルファベットのある文字です。大文字と小文字など、英語には5つの母音があります。 a、e、i、o、u 例1 入力:string = "tutorialspoint" 出力:6 説明する 文字列「TutorialSpoint」の母音は、u、o、i、a、o、iです。合計で6元があります

PHPでの後期静的結合を説明します(静的::)。 PHPでの後期静的結合を説明します(静的::)。 Apr 03, 2025 am 12:04 AM

静的結合(静的::) PHPで後期静的結合(LSB)を実装し、クラスを定義するのではなく、静的コンテキストで呼び出しクラスを参照できるようにします。 1)解析プロセスは実行時に実行されます。2)継承関係のコールクラスを検索します。3)パフォーマンスオーバーヘッドをもたらす可能性があります。

PHPマジックメソッド(__construct、__destruct、__call、__get、__setなど)とは何ですか? PHPマジックメソッド(__construct、__destruct、__call、__get、__setなど)とは何ですか? Apr 03, 2025 am 12:03 AM

PHPの魔法の方法は何ですか? PHPの魔法の方法には次のものが含まれます。1。\ _ \ _コンストラクト、オブジェクトの初期化に使用されます。 2。\ _ \ _リソースのクリーンアップに使用される破壊。 3。\ _ \ _呼び出し、存在しないメソッド呼び出しを処理します。 4。\ _ \ _ get、dynamic属性アクセスを実装します。 5。\ _ \ _セット、動的属性設定を実装します。これらの方法は、特定の状況で自動的に呼び出され、コードの柔軟性と効率を向上させます。

See all articles