0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

CentOS6 RabbitMQ3.7 管理画面の有効化

Posted at

環境

OS:CentOS6.9 64bit

参考URL

https://qiita.com/ajitama/items/53ce21f3c8169496c563
https://github.com/rabbitmq/rabbitmq-server/blob/master/docs/rabbitmq.conf.example

事前準備

CentOS6環境にRabbitMQ3.7をインストール

rabbitmq_managementプラグインの有効化

rabbitmq-plugins enable rabbitmq_management 
(rabbitmqが起動していないとエラーになる。)

Web管理画面へログイン出来るユーザの追加

管理画面へログインするためには、administrator権限が必要
(guestは、デフォルトではローカル以外から接続出来いないため、ユーザ追加する必要がある。)

## フォーマット
# rabbitmqctl add_user <ユーザ名> <パスワード>
# rabbitmqctl set_user_tags <ユーザ名> <権限>
rabbitmqctl add_user mtomoaki 96kg
rabbitmqctl set_user_tags mtomoaki administrator

## 作成確認
rabbitmqctl list_users
---
Listing users ...
mtomoaki        [administrator]
guest           [administrator]
---

設定

cd /etc/rabbitmq
wget https://raw.githubusercontent.com/rabbitmq/rabbitmq-server/master/docs/rabbitmq.conf.example
cp rabbitmq.conf.example rabbitmq.conf

sed -i "s/# listeners.tcp.default = 5672/listeners.tcp.default = 5672/" rabbitmq.conf
sed -i "s/# management.listener.port = 15672/management.listener.port = 15672/" rabbitmq.conf

## 確認
diff rabbitmq.conf rabbitmq.conf.example
16c16
< listeners.tcp.default = 5672
---
> # listeners.tcp.default = 5672
492c492
< management.listener.port = 15672
---
> # management.listener.port = 15672

rabbitmq再起動

/etc/init.d/rabbitmq-server restart

管理画面確認

ブラウザでアクセス確認。IPアドレス部分は自分の環境に合わせて読み替えてください。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?