centos 安装 RabbitMQ
程序员文章站
2022-03-07 15:24:48
...
安装 erlang语言环境。
千万不要直接 yum install erlang,那样版本太老,且修复麻烦。
cd
wget https://packages.erlang-solutions.com/erlang-solutions-2.0-1.noarch.rpm
rpm -Uvh erlang-solutions-2.0-1.noarch.rpm
yum -y install erlang
yum -y install socat logrotate
然后用命令确认安装成功
erl -version
Erlang (SMP,ASYNC_THREADS,HIPE) (BEAM) emulator version 11.1
安装 rabbitmq
rpm --import https://github.com/rabbitmq/signing-keys/releases/download/2.0/rabbitmq-release-signing-key.asc
vim /etc/yum.repos.d/rabbitmq.repo
内容如下:
如果系统centos8,则
[bintray-rabbitmq-server]
name=bintray-rabbitmq-rpm
baseurl=https://dl.bintray.com/rabbitmq/rpm/rabbitmq-server/v3.8.x/el/8/
gpgcheck=0
repo_gpgcheck=0
enabled=1
如果系统centos7 ,则
[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 rabbitmq-server
搞定!
启动rabbitmq
设置开机自动启动rabbitmq
systemctl enable rabbitmq-server.service
启动rabbitmq
systemctl start rabbitmq-server
千万不要直接 yum install erlang,那样版本太老,且修复麻烦。
cd
wget https://packages.erlang-solutions.com/erlang-solutions-2.0-1.noarch.rpm
rpm -Uvh erlang-solutions-2.0-1.noarch.rpm
yum -y install erlang
yum -y install socat logrotate
然后用命令确认安装成功
erl -version
Erlang (SMP,ASYNC_THREADS,HIPE) (BEAM) emulator version 11.1
安装 rabbitmq
rpm --import https://github.com/rabbitmq/signing-keys/releases/download/2.0/rabbitmq-release-signing-key.asc
vim /etc/yum.repos.d/rabbitmq.repo
内容如下:
如果系统centos8,则
[bintray-rabbitmq-server]
name=bintray-rabbitmq-rpm
baseurl=https://dl.bintray.com/rabbitmq/rpm/rabbitmq-server/v3.8.x/el/8/
gpgcheck=0
repo_gpgcheck=0
enabled=1
如果系统centos7 ,则
[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 rabbitmq-server
搞定!
启动rabbitmq
设置开机自动启动rabbitmq
systemctl enable rabbitmq-server.service
启动rabbitmq
systemctl start rabbitmq-server