RabbitMQ安装
ubuntu1404 环境安装
apt-get方式
添加源
sudo vim /etc/apt/sources.list
deb http://www.rabbitmq.com/debian/ testing main # testing 与main 前都有空格
添加public key
wget http://www.rabbitmq.com/rabbitmq-signing-key-public.asc
sudo apt-key add rabbitmq-signing-key-public.asc
kamil@vm-ubuntu:~$ wget http://www.rabbitmq.com/rabbitmq-signing-key-public.asc --2016-04-11 00:30:30-- http://www.rabbitmq.com/rabbitmq-signing-key-public.asc Resolving www.rabbitmq.com (www.rabbitmq.com)... 192.240.153.117 Connecting to www.rabbitmq.com (www.rabbitmq.com)|192.240.153.117|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 1702 (1.7K) [text/plain] Saving to: ‘rabbitmq-signing-key-public.asc’ 100%[===================================================>] 1,702 --.-K/s in 0.002s 2016-04-11 00:30:31 (1016 KB/s) - ‘rabbitmq-signing-key-public.asc’ saved [1702/1702] kamil@vm-ubuntu:~$ sudo apt-key add rabbitmq-signing-key-public.asc OK kamil@vm-ubuntu:~$
安装
sudo apt-get update ;sudo apt-get install rabbitmq-server
......... Adding group `rabbitmq' (GID 133) ... Done. Adding system user `rabbitmq' (UID 125) ... Adding new user `rabbitmq' (UID 125) with group `rabbitmq' ... Not creating home directory `/var/lib/rabbitmq'. * Starting message broker rabbitmq-server [ OK ] Processing triggers for libc-bin (2.19-0ubuntu6.7) ... Processing triggers for ureadahead (0.100.0-16) ...
启动;关闭;状态
sudo rabbitmq-server start ;sudo rabbitmq-server stop ;sudo rabbitmqctl status
python 连接rabbitmq 模块pika
(Pika Python AMQP Client Library)
sudo apt-get install python-pip git-core ; sudo pip install pika==0.10.0
公众号请关注:侠之大者