Centos7 yum source installation configuration RabbitMQ

Install Erlang environment

Install the dependent files before installing erlang (otherwise, an error will be reported in the following. / configure):

	# yum install gcc glibc-devel make ncurses-devel openssl-devel xmlto

2. Go to the official erlang website to download the erlang installation package

Official website address: http://www.erlang.org/downloads

	# wget -c http://erlang.org/download/otp_src_20.2.tar.gz


	# tar -zxvf otp_src_20.2.tar.gz
	# cd otp_src_20.2/

3. Compile and install (I specify here to put it in / usr/local/erlang directory after compilation and installation. You can change this to others)

# ./configure --prefix=/usr/local/erlang
# make && make install

4. Test for successful installation:

# cd /usr/local/erlang/bin/ 
# ./erl

If the following interface appears, our erlang configuration is OK
Enter halt() Exit the console. Notice that there is a point behind halt

5. Configure environment variables (ps: This is similar to java environment variable configuration)

# vim /etc/profile

	export PATH=$PATH:/usr/local/erlang/bin 

# source /etc/profile #Update configuration

Verification: enter erl anywhere to enter the command line, then the configuration is successful.

2. Installing rabbitmq

1. Download the latest installation package from the official website: http://www.rabbitmq.com/releases/rabbitmq-server/

# cd /usr/local/
# wget -c http://www.rabbitmq.com/releases/rabbitmq-server/v3.6.15/rabbitmq-server-generic-unix-3.6.15.tar.xz


# xz -d rabbitmq-server-generic-unix-3.6.15.tar.xz 
# tar -xvf rabbitmq-server-generic-unix-3.6.15.tar

2. Configure the environment variables of rabbitmq (this is similar to the above erlang configuration and java environment variables)

# vim /etc/profile

	export PATH=$PATH:/usr/local/rabbitmq_server-3.6.15/sbin

# source /etc/profile

3. Basic operation of rabbitmq:

rabbitmq-server -detached #start-up
rabbitmqctl stop #close
rabbitmqctl status #state

4. Configure rabbitmq web page management plug-in

rabbitmq-plugins enable rabbitmq_management #Enable plug-ins

To access the administration page: http://172.18.?.?:15672 The default port is 15672
Default guest user: guest, guest password: Guest
Note: an error is reported when logging in rabbitmq. User can only log in via localhost

rabbitmq started from 3.3.0. It is forbidden to use guest/guest permission to access other than localhost.

rabbitmq started from 3.3.0. It is forbidden to use guest/guest permission to access other than localhost.

If you want to use guest/guest to access through a remote machine, you need to set loopback in the rabbitmq configuration file (find the rabbit.app file under / rabbitmq_server-3.6.15/ebin)_ Users is [].

Found / rabbitmq_ Rabbit. Under server-3.6.15/ebin The complete contents of the app file are as follows (pay attention to the half angle period after):
Found: loopback_ The < < guest > > in users is deleted.
[{rabbit, [{loopback_users, []}]}].


5. Enable rabbitmq remote access
Add user: rabbitmqctl add_user XRom XRom123 / / XRom is the user name and XRom123 is the user password
Add permission: rabbitmqctl set_permissions -p “/” XRom “." ".” “.*”
Modify user role: rabbitmqctl set_user_tags XRom administrator
Then you can access it remotely, and then you can directly configure user permissions and other information

3, rabbitmq common commands

add_user        <UserName> <Password>
delete_user    <UserName>
change_password <UserName> <NewPassword>
add_vhost    <VHostPath>
delete_vhost <VHostPath>
list_vhostsset_permissions  [-p <VHostPath>] <UserName> <Regexp> <Regexp> <Regexp>
clear_permissions [-p <VHostPath>] <UserName>
list_permissions  [-p <VHostPath>]
list_user_permissions <UserName>
list_queues    [-p <VHostPath>] [<QueueInfoItem> ...]
list_exchanges [-p <VHostPath>] [<ExchangeInfoItem> ...]
list_bindings  [-p <VHostPath>]
list_connections [<ConnectionInfoItem> ...]

Original address: Install and configure RabbitMQ on Centos7 (yum source and docker installation)

Added by scrypted on Thu, 10 Feb 2022 15:35:32 +0200