美文网首页
部署RabbitMQ-02

部署RabbitMQ-02

作者: 轻飘飘D | 来源:发表于2020-12-19 23:52 被阅读0次

1.安装rabbitmq

cd /usr/local/src
wget https://packagecloud.io/install/repositories/rabbitmq/erlang/script.rpm.sh

[root@xag128 src]# chmod +x script.rpm.sh 

[root@xag128 src]# ./script.rpm.sh 

#curl -s https://packagecloud.io/install/repositories/rabbitmq/erlang/script.rpm.sh | sudo bash
# In /etc/yum.repos.d/rabbitmq_erlang.repo
[rabbitmq_erlang]
name=rabbitmq_erlang
baseurl=https://packagecloud.io/rabbitmq/erlang/el/7/$basearch
repo_gpgcheck=1
gpgcheck=1
enabled=1
# PackageCloud's repository key and RabbitMQ package signing key
gpgkey=https://packagecloud.io/rabbitmq/erlang/gpgkey
       https://dl.bintray.com/rabbitmq/Keys/rabbitmq-release-signing-key.asc
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
metadata_expire=300

[rabbitmq_erlang-source]
name=rabbitmq_erlang-source
baseurl=https://packagecloud.io/rabbitmq/erlang/el/7/SRPMS
repo_gpgcheck=1
gpgcheck=0
enabled=1
# PackageCloud's repository key and RabbitMQ package signing key
gpgkey=https://packagecloud.io/rabbitmq/erlang/gpgkey
       https://dl.bintray.com/rabbitmq/Keys/rabbitmq-release-signing-key.asc
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
metadata_expire=300
yum install -y erlang

erl -version
rpm --import https://packagecloud.io/rabbitmq/rabbitmq-server/gpgkey

rpm --import https://packagecloud.io/gpg.key

rpm --import https://github.com/rabbitmq/signing-keys/releases/download/2.0/rabbitmq-release-signing-key.asc

vim /etc/yum.repos.d/rabbitmq.repo
--------------------------------------------------------
[bintray-rabbitmq-server]
name=bintray-rabbitmq-rpm
baseurl=https://dl.bintray.com/rabbitmq/rpm/rabbitmq-server/v3.8.x/el/7/
gpgcheck=0
repo_gpgcheck=0
enabled=1
---------------------------------------------------------

yum install -y rabbitmq-server

2.启动rabbitmq-server

#启动rabbitmq-server以及rabbitmq_management
systemctl start rabbitmq-server

rabbitmq-plugins enable rabbitmq_management

3.配置

#为保证数据安全,建议您删除默认用户,RabbitMQ默认的账号用户名和密码都是guest
 rabbitmqctl delete_user guest

#列出所有虚拟主机
[root@xag128 src]# rabbitmqctl list_vhosts
Listing vhosts ...
name
/

#创建管理员用户
rabbitmqctl add_user xag xag123
#将创建的新用户设置为管理员
rabbitmqctl set_user_tags xag administrator
#赋予新创建的用户所有权限
rabbitmqctl  set_permissions -p / xag '.*' '.*' '.*'

3.使用浏览器访问http://192.168.40.128:15672

相关文章

网友评论

      本文标题:部署RabbitMQ-02

      本文链接:https://www.haomeiwen.com/subject/uithnktx.html