yum -y install gcc glibc-devel make ncurses-devel openssl-devel xmlto perl wget
wget http://www.erlang.org/download/otp_src_18.3.tar.gz //Download the erlang package
tar -xzvf otp_src_18.3.tar.gz //Unzip.gz package
cd otp_src_18.3///Switch to the installation path./configure --prefix=/usr/local/wang/erlang //Production installation configuration
make && make install //Compile and install the screen is serious, don’t panic
vi /etc/profile
//Add the following
# set erlang environment
ERL_HOME=/usr/local/wang/erlang
PATH=$ERL_HOME/bin:$PATH
export ERL_HOME PATH
//Configuration file takes effect
source /etc/profile
Whether the test was successful
erl //If you enter the erlang shell, the installation is successful, just ctrl c to exit.
Download and unzip
cd /usr/local/wang///Switch to the directory where RabbitMQ is planned to be installed, I put it here/usr/local/wang/
wget http://www.rabbitmq.com/releases/rabbitmq-server/v3.6.1/rabbitmq-server-generic-unix-3.6.1.tar.xz //Download the RabbitMQ installation package
xz -d rabbitmq-server-generic-unix-3.6.1.tar.xz //Unzip.xz package
tar -xvf rabbitmq-server-generic-unix-3.6.1.tar //Unzip.tar package
vi /etc/profile
# set rabbitmq environment
export PATH=$PATH:/usr/local/wang/rabbitmq_server-3.6.1/sbin
source /etc/profile
rabbitmq-server -detached //-detached represents the background daemon start.
Check status
rabbitmqctl status
If it is as follows, it is ok
mkdir /etc/rabbitmq
Start the plugin
rabbitmq-plugins enable rabbitmq_management
The plug-in requires a username and password by default
rabbitmqctl add_user root root //Add user, the next two parameters are username and password respectively, mine is root
rabbitmqctl set_permissions -p / root ".*"".*"".*"//Add permissions
rabbitmqctl set_user_tags superrd administrator //Modify user role
(When connecting in the code: the port is 5672), pay attention to open the relevant port
Here is a supplementary operation command related to permissions
(1) Add a user
rabbitmqctl add_user Username Password
(2) Delete a user
rabbitmqctl delete_user Username
(3) Modify the user's password
rabbitmqctl change_password Username Newpassword
(4) View current user list
rabbitmqctl list_users
According to personal understanding, user roles can be divided into five categories, super administrators, monitors, policy makers, ordinary managers and others.
(1) Super administrator (administrator)
You can log in to the management console (when the management plugin is enabled), you can view all the information, and you can operate on users and policies.
(2) Monitoring (monitoring)
You can log in to the management console (when the management plugin is enabled), and you can view the relevant information of the rabbitmq node (number of processes, memory usage, disk usage, etc.)
Recommended Posts