RabbitMQ的安装部署
RabbitMQ安装部署
一、软件准备
wget http://erlang.org/download/otp_src_19.3.tar.gz
wget http://www.rabbitmq.com/releases/rabbitmq-server/v3.6.9/rabbitmq-server-3.6.9-1.el6.noarch.rpm
二、各种软件安装
1、安装依赖包:
yum -y install make ncurses-devel gcc gcc-c++ unixODBC unixODBC-devel openssl openssl-devel
2、安装otp_src:
tar zxvf otp_src_19.3.tar.gz cd otp_src_19.3 ./configure --prefix=/usr/local/erlang --enable-smp-support --enable-threads --enable-sctp --enable-kernel-poll --enable-hipe --with-ssl make && make install
3、添加环境变量:
vi /etc/profile ERL_HOME=/usr/local/erlang PATH=$ERL_HOME/bin:$PATH export ERL_HOME PATH
使其生效:
source /etc/profile
4、安装RabbitMQ:
rpm -i --nodeps rabbitmq-server-3.6.9-1.el6.noarch.rpm
ln -s /usr/local/erlang/bin/erl /usr/bin/erl
5、创建用户:
rabbitmqctl add_user admin passowrd #添加用户 rabbitmqctl set_user_tags admin administrator #将用户添加到管理员角色 rabbitmqctl list_users #显示用户列表
三、启动服务
service rabbitmq-server start
注:如启动失败,错误为“epmd error for host jinfu-002: timeout (timed out)”,请修改 /etc/hosts:
127.0.0.1 hostname
rabbitmq默认监听15672和5672端口,正常启动后,可以通过IP:15672来访问管理页面,如下图: