Centos7.x yum rpm 安裝 Rabbitmq3.6.x
裝完系統 然後
配置ssh登錄:
yum install -y openssh-server
vi /etc/ssh/sshd_config
將 以下幾行的註釋取消:
Port 22
ListenAddress 0.0.0.0
ListenAddress ::
PermitRootLogin yes
PasswordAuthentication yes
:wq
systemctl enable sshd
systemctl start sshd
firewall-cmd --permanent --zone=public --add-port=22/tcp
reboot;
這時候可以遠程登錄了;
然後可選更新內核:
rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm
yum --enablerepo=elrepo-kernel install kernel-lt -y
yum remove kernel-3.* kernel-tools-libs-3.* kernel-tools-3.*
rpm -e kernel-3.*
grub2-mkconfig -o /boot/grub2/grub.cfg
reboot;
這時候就內核就換成較新的了;
接下來yum安裝erlang和rpm安裝rabbitmq:
yum clean all;
yum makecache;
yum install -y epel-release;
yum install -y erlang;
yum install -y socat;
yum install -y logrotate;
rpm -i http://www.rabbitmq.com/releases/rabbitmq-server/v3.6.15/rabbitmq-server-3.6.15-1.el7.noarch.rpm;
rabbitmq-plugins enable rabbitmq_management;
這時候 rabbitmq 基礎環境就裝好了
集群需要構建需要修改主機名:
先設立兩臺樣例主機:
rabbit1 對應ip 192.168.1.18
rabbit3 對應ip 192.168.1.19
rabbit1上:
hostnamectl set-hostname rabbit1
vi /etc/hosts
在尾部增加:
rabbit1 192.168.1.18
wq:
Centos7.x yum rpm 安裝 Rabbitmq3.6.x