RabbitMQ relies on the Erlang language. You can use erl -v to check whether the environment is available, but the installation is too complicated.

We use Docker for installation and deployment, and need a Docker that can access the Internet

Download the Docker installation package. (Link first not put, need can contact)

In order to ensure that there is no version problem when docker is copied to the server, it is recommended to install the same docker on both sides and decompress it to the directory

Tar - XVF docker - 18.06.2 - ce. TGZCopy the code

Create service file

vi docker.service
Copy the code
[Unit] Description=Docker Application Container Engine Documentation=https://docs.docker.com After=network-online.target  firewalld.service Wants=network-online.target [Service] Type=notify # the default is not to use systemd for cgroups because the delegate issues still # exists and systemd currently does not support the cgroup feature set required # for containers run by docker ExecStart=/usr/bin/dockerd ExecReload=/bin/kill -s HUP $MAINPID # Having non-zero Limit*s causes performance problems due to accounting overhead # in the kernel. We recommend using cgroups to do container-local  accounting. LimitNOFILE=infinity LimitNPROC=infinity LimitCORE=infinity # Uncomment TasksMax if your systemd version supports it. # Only systemd 226 and above support this version. #TasksMax=infinity TimeoutStartSec=0 # set delegate yes so that systemd does not reset the cgroups of docker containers Delegate=yes # kill only the docker process, not all processes in the cgroup KillMode=process # restart the docker process if it exits prematurely Restart=on-failure  StartLimitBurst=3 StartLimitInterval=60s [Install] WantedBy=multi-user.targetCopy the code

Create automatic installation scripts

vi install.sh
Copy the code
#! /bin/sh #! /bin/sh #echo 'Decompress the tar package... '#tar -xvf docker-18.06.2-ce. TGZ echo' 'cp docker/* /usr/bin/echo' move docker.service to /etc/systemd/system/... 'cp docker.service /etc/systemd/system/ echo' 'chmod + x/etc/systemd/system/docker. Service echo' reload the configuration file... 'systemctl daemon-reload echo' 'systemctl start docker echo' 'systemctl enable docker. Service echo' Docker installed successfully... ' docker -vCopy the code

perform

chmod +x install.sh
./install.sh
Copy the code

Docker installation is complete, check the command docker -v

Of course, the uninstallation script is also available, vi uninstall.sh

#! /bin/sh echo 'Delete docker.service... 'the rm -f/etc/systemd/system/docker. Service echo' delete docker file... 'rm -rf /usr/bin/docker* echo' Reloading configuration file 'systemctl daemon-reload echo' Unmounted successfully... 'Copy the code

After installing Docker, start installing the image, for servers with Internet access

docker pull rabbitmq:management
Copy the code

And then look at the mirror

docker images
Copy the code

Copy of the mirror

docker save -o xxx.tar xx
Copy the code

Another server with no Internet access, load the image

docker load -i oracle-12c.tar
Copy the code

Run the mirror

docker run -d --name rabbit -e RABBITMQ_DEFAULT_USER=admin -e RABBITMQ_DEFAULT_PASS=admin -p 15672:15672  -p  5672:5672 rabbitmq:management
Copy the code