卸载 rabbitmq
centos 版本
- 查看安装列表
yum list | grep rabbitmq
- 卸载 rabbitmq
yum -y remove rabbitmq-server.noarch
- 卸载 erlang
yum -y remove erlang-*
yum remove erlang.x86_64
ubuntu 版本
- 查看安装列表
dpkg --list
- 卸载
apt-get --purge remove rabbitmq-* erlang-*;
安装 rabbitmq
Ubuntu 版本
wget http://erlang.org/download/otp_src_22.0.tar.gz
apt-get install build-essential
apt-get install libncurses5-dev
apt-get install libssl-dev
./configure && make
sudo make install
- 安装最新版本 erlang
curl -s https://packagecloud.io/install/repositories/rabbitmq/erlang/script.deb.sh | sudo bash
sudo apt-get install -y erlang-* ;
- 安装 rabbitmq
https://github.com/rabbitmq/rabbitmq-server/releases/download/v3.7.17/rabbitmq-server_3.7.17-1_all.deb
sudo dpkg -i rabbitmq-server_3.7.17-1_all.deb
- 查看运行状态
systemctl status rabbitmq-server
- 启动、停止、重启
service rabbitmq-server start
service rabbitmq-server stop
service rabbitmq-server restart
- 开启 web 端 可视化操作界面
rabbitmq-plugins enable rabbitmq_management
service rabbitmq-server restart
- 登陆
http://localhost:15672
guest/guest
- 查看用户添加用户
rabbitmqctl list_users
rabbitmqctl add_user admin Aa123456789 # 增加普通用户
rabbitmqctl set_user_tags admin administrator
- 授权访问 virtual
rabbitmqctl set_permissions -p / admin '.' '.' '.*'
centos版本
- 安装最新版本 erlang
curl -s https://packagecloud.io/install/repositories/rabbitmq/erlang/script.rpm.sh | sudo bash
yum install erlang
- 安装最新版本 rabbitmq
yum -y install epel-release
yum -y install socat
rpm --import https://packagecloud.io/rabbitmq/rabbitmq-server/gpgkey
rpm --import https://packagecloud.io/gpg.key
curl -s https://packagecloud.io/install/repositories/rabbitmq/rabbitmq-server/script.rpm.sh | sudo bash
wget https://bintray.com/rabbitmq/rpm/download_file?file_path=rabbitmq-server%2Fv3.7.x%2Fel%2F6%2Fnoarch%2Frabbitmq-server-3.7.17-1.el6.noarch.rpm
rpm -ivh rabbitmq-server-3.7.17-1.el7.noarch.rpm
- 配置 rabbitmq
cp /usr/share/doc/rabbitmq-server-3.7.17/rabbitmq.config.example /etc/rabbitmq/
mv /etc/rabbitmq/rabbitmq.config.example /etc/rabbitmq/rabbitmq.config
本文由博客一文多发平台 OpenWrite 发布!