1.安装GCC GCC-C++ Openssl等模块,安装过就不需要安装了
yum -y install make gcc gcc-c++ kernel-devel m4 ncurses-devel openssl-devel
2.安装ncurses
yum -y install ncurses-devel
3.wget http://erlang.org/download/otp_src_18.2.1.tar.gz (使用迅雷)
tar xvfz otp_src_18.2.1.tar.gz
进入目录下:
./configure --prefix=/usr/lib/erlang
make install
配置环境
vi /etc/profile
export ERLANG_HOME=/usr/lib/erlang
export PATH=$ERLANG_HOME/bin:$PATH
source /etc/profile
4.wget http://www.rabbitmq.com/releases/rabbitmq-server/v3.6.9/rabbitmq-server-generic-unix-3.6.9.tar.xz (使用迅雷)
5.yum install xz
6.xz -d rabbitmq-server-generic-unix-3.6.9.tar.xz
7.tar -xvf rabbitmq-server-generic-unix-3.6.9.tar
8.vi /etc/profile
export PATH=/usr/local/rabbitmq/sbin:$PATH (路径实际情况定)
9.
./rabbitmq-plugins enable rabbitmq_management #启动后台管理
./rabbitmq-server -detached #后台运行rabbitmq
10.iptables -I INPUT -p tcp --dport 15672 -j ACCEPT
11.
rabbitmqctl add_user admin admin
rabbitmqctl set_permissions -p "/" admin ".*" ".*" ".*"
rabbitmqctl set_user_tags admin administrator
12.简单指令
启动服务:./rabbitmq-server -detached【 /usr/local/rabbitmq/sbin/rabbitmq-server -detached 】
重启服务:./rabbitmq-server restart
关闭服务:./rabbitmqctl stop
查看状态:./rabbitmqctl status
列出角色:./rabbitmqctl list_users
开启某个插件:./rabbitmq-pluginsenable xxx
关闭某个插件:./rabbitmq-pluginsdisablexxx
注意:重启服务器后生效。