#操作系统环境
Centos6.7
#使用的版本:
Rabbit mq:3.2.2
Erlang:r16b03
#1, preparation for work
Download Rabbit mq:http://www.rabbitmq.com/releases/
Download erlang:http://www.erlang.org/download/
#安装ncurses
Yum List|grep ncurses
Yum-y Install Ncurses-devel
#升级make版本和xslt版本
Yum-y Install Libxslt-devel
#2, installing Erlang
Execute command:
TAR-ZXVF otp_src_R16B03.tar.gz
CD OTP_SRC_R16B03
./configure
Make
Make install
Test:
Command line input: Erl--version
The version information appears and succeeds.
#3, installing RABBITMQ
Tar zxvf rabbitmq-server-3.2.2.tar.gz
CD rabbitmq-server-3.2.2
Make
Make install
#4, troubleshooting
Get an error when make install:
echo "Put your EZs here and use Rabbitmq-plugins to enable them." > Plugins/readme
Rm-f Plugins/rabbit_common*.ez
Please set Target_dir.
Please set Sbin_dir.
Please set Man_dir.
Please set Doc_install_dir.
Make: * * [Install_dirs] Error 1
Solutions
Say let's add environment variable, workaround: (rabbitmq-server-3.2.2 directory execution)
Export TARGET_DIR=/HOME/SITAPP/RABBITMQ
Export Sbin_dir=/home/sitapp/rabbitmq/sbin
Export Man_dir=/home/sitapp/rabbitmq/man
Export Doc_install_dir=/home/sitapp/rabbitmq/doc
Re-make install and get an error:
/bin/sh:xmlto:command not found
/bin/sh:line 2:xmlto:command not found
Make: * * [docs/rabbitmqctl.1.gz] Error 127
Install the Xmlto command, yum install-y Xmlto
Re-make install complete.
#5, configuration RABBITMQ:
To set the log and message persistence directory:
Ln-s/home/sitapp/rabbitmq/sbin/rabbitmq-server/usr/bin/rabbitmq-server
Ln-s/home/sitapp/rabbitmq/sbin/rabbitmq-env/usr/bin/rabbitmq-env
#6, boot rabbitmq (rabbitmq/sbin directory):
./Rabbitmq-server
./rabbitmq-server-detached (Background boot)
The following message appears, indicating success:
##########
Starting broker ... completed with 0 plugins.
#7, view service status:
lsof-i:5672
#8, close the RABBITMQ service:
./rabbitmqctl Stop
#9, start/close Web management tools:
Start:./rabbitmq-plugins Enable Rabbitmq_management
Close:./rabbitmq-plugins Disable Rabbitmq_management
Error occurred
Error: {cannot_write_enabled_plugins_file, "/etc/rabbitmq/enabled_plugins",
Enoent
To create a directory:
Mkdir/etc/rabbitmq
Start from NEW:
./rabbitmq-plugins Enable Rabbitmq_management
The following message appears:
The following plugins has been enabled:
Mochiweb
Webmachine
Rabbitmq_web_dispatch
Amqp_client
Rabbitmq_management_agent
Rabbitmq_management
Plugin configuration has changed. Restart RabbitMQ for changes to take effect.
Restart the RABBITMQ service.
By accessing the http://IP:15672/user name password guest access is available.
This article is from the "11088237" blog, please be sure to keep this source http://11098237.blog.51cto.com/11088237/1732554
RBBITMQ stand-alone construction