rabbitmq install

 环境:CentOS Linux release 7.4.17

#/bin/bash

#rabbitmq install

yum install xmlto kernel-devel m4 ncurses-devel openssl-devel unixODBC-devel wxBase wxGTK wxGTK-gl perl –y

cd /usr/local/src/rabbitmq_install

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

tar zxvf otp_src_19.2.tar.gz

cd otp_src_19.2

./configure --prefix=/usr/local/erlang

make

make install

echo export PATH=$PATH:/usr/local/erlang/bin >>/etc/profile

source /etc/profile

cd /usr/local/src/rabbitmq_install

tar zxvf xz-5.2.4.tar.gz

cd xz-5.2.4

./configure --prefix=/usr/local/xz

make && make install

echo export PATH=$PATH:/usr/local/xz/bin >>/etc/profile

source /etc/profile

cd /usr/local/src/rabbitmq_install

xz -d /usr/local/src/rabbitmq_install/rabbitmq-server-generic-unix-3.6.14.tar.xz

tar xvf rabbitmq-server-generic-unix-3.6.14.tar

mv /usr/local/src/rabbitmq_install/rabbitmq_server-3.6.14 /usr/local/rabbitmq_server-3.6.14

ln -s /usr/local/rabbitmq_server-3.6.14 /usr/local/rabbitmq

/usr/local/rabbitmq/sbin/rabbitmq-server start–detached&

/usr/local/rabbitmq/sbin/rabbitmq-plugins  enable rabbitmq_management

netstat -tnlpu |grep 5672

#/usr/local/rabbitmq/sbin/rabbitmq-plugins  disable rabbitmq_management

cd /usr/local/rabbitmq/sbin

./rabbitmqctl  add_user mq passwd

./rabbitmqctl set_user_tags mq administrator

./rabbitmqctl set_permissions -p "/" mq ".*" ".*" ".*"

./rabbitmqctl delete_user guest

你可能感兴趣的:(rabbitmq install)