参考:http://www.tuicool.com/articles/f6R3In
http://www.open-open.com/lib/view/open1432468144338.html
Rabbitmq CentOS 6.4 编译安装笔记
#一些软件包
yum -y install unixODBC unixODBC-devel java libxslt xmlto
#安装simplejson
wget https://pypi.python.org/packages/source/s/simplejson/simplejson-3.5.3.tar.gz#md5=d5f62dfa6b6dea31735d56c858361d48 tar zxf simplejson-3.5.3.tar.gz cd simplejson-3.5.3 python setup.py build python setup.py install
#安装erlang
wget http://www.erlang.org/download/otp_src_17.1.tar.gz
tar zxf otp_src_17.1.tar.gz
cd otp_src_17.1
./configure --without-javac
make && make install
#安装rabbitmq
wget http://www.rabbitmq.com/releases/rabbitmq-server/v3.3.4/rabbitmq-server-3.3.4.tar.gz tar zxf rabbitmq-server-3.3.4.tar.gz cd rabbitmq-server-3.3.4 make TARGET_DIR=/usr/local/rabbitmq SBIN_DIR=/usr/local/rabbitmq/sbin MAN_DIR=/usr/local/rabbitmq/man DOC_INSTALL_DIR=/usr/local/rabbitmq/doc install
#配置
mkdir /etc/rabbitmq cp /usr/local/rabbitmq/doc/rabbitmq.config.example /etc/rabbitmq/rabbitmq.config
#插件
/usr/local/rabbitmq/sbin/rabbitmq-plugins enable rabbitmq_management /usr/local/rabbitmq/sbin/rabbitmq-plugins enable rabbitmq_mqtt
#启动
/usr/local/rabbitmq/sbin/rabbitmq-server &
管理端口:15672
http://localhost:15672
注意:如果要把本地端口开放给其他机器访问,记得开放防火墙端
安装完成后,需要登录,官方提供的账户只能用localhost登录,需要通过命令增加远程登录账户
#新增用户 admin 密码 admin
sbin/rabbitmqctl add_user admin admin
#查询用户列表
sbin/rabbitmqctl list_users
#新增用户这时还不能访问,设置为administrator才能远程访问
sbin/rabbitmqctl set_user_tags admin administrator
#设置权限
sbin/rabbitmqctl set_permissions -p / admin ".*" ".*" ".*"