安装环境:Ubuntu16 64位
1. sudo apt-get install rabbitmq-server 直接进行安装
(centos的话 sudo yum install rabbitmq-seaver)
2. sudo rabbitmq-plugins list 查看插件列表
3. sudo rabbitmq-plugins enable rabbitmq_management 安装管理控制台插件
4. http://127.0.0.1:15672/#/ 登录管理控制台 默认用户和密码 guest
5. 打开/usr/lib/rabbitmq/lib/rabbitmq_server-3.5.7/ebin/rabbit.app 可以修改rabbit配置
60- tcp_listeners 默认端口号
76- default_user 默认登录账号(可以在管理控制台上创建其他账号)
77- default_pass 默认密码
6. 使用whereis RabbitMQ查看程序的安装位置
7. 使用rabbitmq-server ~或service rabbitmq-server ~操作程序
php安装amqp
wget -c https://github.com/alanxz/rabbitmq-c/releases/download/v0.8.0/rabbitmq-c-0.8.0.tar.gz
wget http://pecl.php.net/get/amqp-1.9.3.tgz
./configure --with-php-config=/usr/bin/php-config --with-amqp --with-librabbitmq-dir=/usr/local/rabbitmq-c-0.8.0
make && make install
yum -y install gcc gcc-c++ autoconf libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel krb5-devel libidn libidn-devel openssl openssl-devel nss_ldap openldap openldap-devel openldap-clients openldap-servers libxslt-devel libevent-devel ntp libtool-ltdl bison libtool vim-enhanced