2. RabbitMQ_Installation

RabbitMQ installation documentation

  • RabbitMQ official website download address: https://www.rabbitmq.com/download.html

1. Install dependencies

  • Online installation depends on the environment:
    yum install build-essential openssl openssl-devel unixODBC unixODBC-devel make gcc gcc-c++ kernel-devel m4 ncurses-devel tk tc xz 
    

2. Installation environment

  • Upload the installation package to the linux environment

Insert image description here

2.1 Install erlang environment

rpm -ivh erlang-23.3.4.5-1.el7.x86_64.rpm 
  • Use yum to upgrade gblic version
    sudo yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gcc make -y 
    

2.2 Install rabbitMQ

  • Install socat
    yum install socat -y 
    
  • Install rabbitMQ
    rpm -ivh rabbitmq-server-3.8.34-1.suse.noarch.rpm 
    
  • Open the management interface
    rabbitmq-plugins enable rabbitmq_management 
    
  • Start rabbitmq
    /bin/systemctl start rabbitmq-server.service 
    

2.3rabbitMQ operation

  • open port
    firewall-cmd --zone=public --add-port=15672/tcp --permanent
    firewall-cmd --zone=public --add-port=5672/tcp --permanent
    firewall-cmd --reload 
    
  • Check service status
    /sbin/service rabbitmq-server status 
    
  • Out of service
    /sbin/service rabbitmq-server stop 
    
  • Add auto-start at boot
    chkconfig rabbitmq-server on 
    

3.Add user password

  • Add account password
    rabbitmqctl add_user sy 123456 
    
  • Set up roles
    rabbitmqctl set_user_tags sy administrator 
    
  • Set user permissions
    rabbitmqctl set_permissions -p "/" sy ".*" ".*" ".*" 
    
  • View users and roles
    rabbitmqctl list_users 
    

4. Reset command

  • Close rabbitMQ
    rabbitmqctl stop_app 
    
  • reset command
    rabbitmqctl reset 
    
  • Restart
    rabbitmqctl start_app 
    

5. Service problems

  • View host name
    hostnamectl status 
    

Insert image description here

  • Reset the host name
    hostnamectl set-hostname localhost.localdomain