安裝依賴環境git
yum -y install gcc glibc-devel make ncurses-devel openssl-devel xmlto perl wget gtk2-devel binutils-develgithub
下載最新 Erlangweb
wget http://erlang.org/download/otp_src_22.0.tar.gzspa
解壓unix
tar -zxvf otp_src_22.0.tar.gzserver
移走xml
mv otp_src_22.0 /usr/local/rabbitmq
切換目錄ssl
cd /usr/local/otp_src_22.0/get
建立即將安裝的目錄
mkdir ../erlang
配置安裝路徑
./configure --prefix=/usr/local/erlang
安裝
make install
make
make install
配置/etc/profile
ERLANG_HOME= /usr/local/erlang/bin
PATH=$PATH:$JAVA_HOME/bin:$ERLANG_HOME/bin
使其生效
source /etc/profile
echo $PATH
檢驗erl:輸入命令 erl
wget https://github.com/rabbitmq/rabbitmq-server/releases/download/v3.7.15/rabbitmq-server-generic-unix-3.7.15.tar.xz
/bin/xz -d rabbitmq-server-generic-unix-3.7.15.tar.xz
tar -xvf rabbitmq-server-generic-unix-3.7.15.tar
mv rabbitmq_server-3.7.15/ /usr/local/
mv /usr/local/rabbitmq_server-3.7.15 rabbitmq
啓用web管理界面
./rabbitmq-plugins enable rabbitmq_management
啓動
rabbitmq-server -detached
中止:rabbitmqctl stop
狀態:rabbitmqctl status
添加用戶
rabbitmqctl add_user admin(帳號) admin(密碼)
設置權限
rabbitmqctl set_user_tags admin administrator
查看全部用戶
rabbitmqctl list_users
開機自啓:
chkconfig rabbitmq-server on