Cloud server CentOs7 install rabbitmq

1. Log in to the cloud server

2. Download and install erlang

wget http://erlang.org/download/otp_src_19.3.tar.gz

Unzip after downloading: tar -xvzf otp_src_19.3.tar.gz

Erlang needs to install its dependencies before installation:

yum -y install make gcc gcc-c++ kernel-devel m4 ncurses-devel openssl-devel unixODBC-devel

Then enter the decompressed file to configure the installation environment for erlang

./configure --prefix=/usr/erlang --without-javac 

then compile make

then install make install

Then you can verify that erlang is installed successfully

Then exit, tried a few commands to no avail, and finally control+C to exit

Next, you need to configure the environment variables, configure Erlang to the /etc/profile file and set it to take effect through source /etc/profile

Then configure the Erlang environment variables, vi /etc/profile file, and add the following environment variables:

#set erlang environment
export PATH=$PATH:/opt/erlang/bin

source /etc/profile makes the file take effect

3. Install RabbitMQ

Download via command line: wget https://www.rabbitmq.com/releases/rabbitmq-server/v3.6.8/rabbitmq-server-3.6.8-1.el7.noarch.rpm

After the download is complete, follow the documentation and execute it first:

rpm --import https://www.rabbitmq.com/rabbitmq-release-signing-key.asc

Then execute:

yum install rabbitmq-server-3.6.8-1.el7.noarch.rpm

Check if the installation is complete:

rpm -i --nodeps rabbitmq-server-3.6.8-1.el7.noarch.rpm

4. RabbitMQ service startup and shutdown

The above has completed the installation of RabbitMq, how to start the service?

rabbitmq-server start

Adding rabbitmq to the startup item can be done with the command: chkconfig rabbitmq-server on

There is also a command to open the management interface: rabbitmq-plugins enable rabbitmq_management 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325120168&siteId=291194637