解决方案:如下所示
yum -y install make gcc gcc-c++ m4 kernel-devel glibc-devel ncurses-devel openssl-devel unixODBC-devel xmlto
wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" \
http://erlang.org/download/otp_src_22.0.tar.gz
mkdir /usr/local/erlang
tar -xvf otp_src_22.0.tar.gz
cp otp_src_22.0 /usr/local/erlang/otp_src_22.0 -r
cd /usr/local/erlang/otp_src_22.0
配置安装路径编译代码
./configure --prefix=/usr/local/erlang
执行编译安装
make && make install
cd /etc
cp profile profile.2019.06.04
vim profile
添加以下内容
export ERLANG_HOME=/usr/local/erlang
export PATH=/usr/local/java/jdk1.8.0_201/bin:$PATH:/usr/local/nginx/sbin:$PATH:/usr/local/erlang/bin
保存退出
source profile
erl
如果输出以下内容,那么说明安装成功!
[root@hbs20190406 ~]# erl
Erlang/OTP 22 [erts-10.4] [source] [64-bit] [smp:1:1] [ds:1:1:10] [async-threads:1] [hipe]
Eshell V10.4 (abort with ^G)
1>
输入halt().退出
wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" \
https://github.com/rabbitmq/rabbitmq-server/releases/download/v3.7.15/rabbitmq-server-generic-unix-3.7.15.tar.xz
mkdir /usr/local/RabbitMQ
xz -d rabbitmq-server-generic-unix-3.7.15.tar.xz
tar -xvf rabbitmq-server-generic-unix-3.7.15.tar
cp rabbitmq_server-3.7.15 /usr/local/RabbitMQ/rabbitmq_server-3.7.15 -r
cd /etc
vim profile
添加以下内容
export PATH=/usr/local/java/jdk1.8.0_201/bin:$PATH:/usr/local/nginx/sbin:$PATH:/usr/local/erlang/bin:$PATH:/usr/local/RabbitMQ/rabbitmq_server-3.7.15/sbin
保存退出
source profile
mkdir /etc/rabbitmq
cd /usr/local/RabbitMQ/rabbitmq_server-3.7.15/sbin
./rabbitmq-plugins enable rabbitmq_management
./rabbitmq-server -detached
[root@hbs20190406 sbin]# ./rabbitmq-plugins enable rabbitmq_management
Enabling plugins on node rabbit@hbs20190406:
rabbitmq_management
The following plugins have been configured:
rabbitmq_management
rabbitmq_management_agent
rabbitmq_web_dispatch
Applying plugin configuration to rabbit@hbs20190406...
The following plugins have been enabled:
rabbitmq_management
rabbitmq_management_agent
rabbitmq_web_dispatch
set 3 plugins.
Offline change; changes will take effect at broker restart.
wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" \
https://dl.bintray.com/rabbitmq/community-plugins/3.7.x/rabbitmq_delayed_message_exchange/rabbitmq_delayed_message_exchange-20171201-3.7.x.zip
unzip rabbitmq_delayed_message_exchange-20171201-3.7.x.zip
cp rabbitmq_delayed_message_exchange-20171201-3.7.x.ez /usr/local/RabbitMQ/rabbitmq_server-3.7.15/plugins/rabbitmq_delayed_message_exchange-20171201-3.7.x.ez -r
cd /usr/local/RabbitMQ/rabbitmq_server-3.7.15/sbin
rabbitmq-plugins enable rabbitmq_delayed_message_exchange
[root@hbs20190406 sbin]# rabbitmq-plugins enable rabbitmq_delayed_message_exchange
Enabling plugins on node rabbit@hbs20190406:
rabbitmq_delayed_message_exchange
The following plugins have been configured:
rabbitmq_delayed_message_exchange
rabbitmq_management
rabbitmq_management_agent
rabbitmq_web_dispatch
Applying plugin configuration to rabbit@hbs20190406...
The following plugins have been enabled:
rabbitmq_delayed_message_exchange
started 1 plugins.
[root@hbs20190406 sbin]#
重启RabbitMQ服务
./rabbitmqctl stop
./rabbitmq-server -detached
查看RabbitMQ服务状态
./rabbitmqctl status
cd /usr/local/RabbitMQ/rabbitmq_server-3.7.15/sbin
启动服务:
./rabbitmq-server -detached
查看服务状态:
./rabbitmqctl status
关闭服务:
./rabbitmqctl stop
查看用户
./rabbitmqctl list_users
查看mq用户
rabbitmqctl list_users
查看用户【guest】的权限
rabbitmqctl list_user_permissions guest
新增用户并设置密码
rabbitmqctl add_user root 【这里设置你的mq用户登录密码】
赋予用户【root】管理员权限
rabbitmqctl set_user_tags root administrator
rabbitmqctl set_permissions -p "/" root ".*" ".*" ".*"
6/4/2019 5:11:49 PM 已解决!