linux 安装rabbitmq
Posted 飞翔的贺兰猪
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了linux 安装rabbitmq相关的知识,希望对你有一定的参考价值。
1.安装elarge:
wget http://packages.erlang-solutions.com/erlang-solutions-1.0-1.noarch.rpm
rpm -Uvh erlang-solutions-1.0-1.noarch.rpm
安装各种依赖:
yum -y install unixODBC unixODBC-devel wxBase wxGTK SDL wxGTK-gl
yum -y install install make gcc gcc-c++ kernel-devel m4 ncurses-devel openssl openssl-devel xmlto zip unzip
yum -y install gtk2-devel binutils-devel
下载这三个依赖:
wget http://dl.fedoraproject.org/pub/epel/6/x86_64/wxGTK3-3.0.2-14.el6.x86_64.rpm
wget http://dl.fedoraproject.org/pub/epel/6/x86_64/wxGTK3-3.0.2-14.el6.x86_64.rpm
wget http://dl.fedoraproject.org/pub/epel/6/x86_64/wxBase3-3.0.2-14.el6.x86_64.rpm
安装下载的三个依赖:
rpm -ivh wxBase3-3.0.2-14.el6.x86_64.rpm
rpm -ivh libmspack-0.5-0.1.alpha.el6.x86_64.rpm
rpm -ivh libmspack-0.5-0.1.alpha.el6.x86_64.rpm
下载otp_src_19.3.tar.gz:
wget http://erlang.org/download/otp_src_19.3.tar.gz
解压otp_src_19.3.tar.gz:
tar -xvzf otp_src_19.3.tar.gz
cd otp_src_19.3
配置cd otp_src_19.3:
./configure --enable-smp-support --enable-threads --enable-sctp --enable-kernel-poll --enable-hipe --with-ssl
make && make install
下面几步为检测erlang 是否安装正常
find / -name erlang
/root/otp_src_19.3/lib/jinterface/java_src/com/ericsson/otp/erlang
/usr/share/java/erlang
/usr/local/lib/erlang
/usr/lib64/erlang
find / -name erl
/root/otp_src_19.3/bin/erl
/root/otp_src_19.3/bootstrap/bin/erl
/root/otp_src_19.3/erts/etc/win32/msys_tools/erl
/root/otp_src_19.3/erts/etc/win32/cygwin_tools/erl
/usr/local/bin/erl
/usr/local/lib/erlang/erts-8.3/bin/erl
/usr/local/lib/erlang/bin/erl
如果有如下信息提示出现,则标示 erlang 安装正常
[[email protected] ~]# /usr/local/bin/erl
Erlang/OTP 19 [erts-8.3] [source] [64-bit] [smp:2:2] [async-threads:10] [hipe] [kernel-poll:false]
2.安装rabbitMQ
下载rabbitmq-server-generic-unix-3.6.9.tar.xz :
wget http://www.rabbitmq.com/releases/rabbitmq-server/v3.6.9/rabbitmq-server-generic-unix-3.6.9.tar.xz
安装xz解压软件:
yum -y install xz
解压:
xz -d rabbitmq-server-generic-unix-3.6.9.tar.xz
tar -xvf rabbitmq-server-generic-unix-3.6.9.tar
配置环境变量
ERL_HOME=/usr/local/lib/erlang
RABBITMQ_HOME=/usr/local/rabbitmq
PATH=$PATH:$ERL_HOME/bin:/usr/local/rabbitmq/sbin
export ERL_HOME PATH RABBITMQ_HOME
配置立即生效
source /etc/profile
rabbitmq-server start
此时登陆http://IP:15672/ 还不能看到管理界面。
进行如下操作。
添加用户
[[email protected] sbin]# rabbitmqctl add_user admin admin
Creating user "admin" ...
设置用户权限为administrator
[[email protected] sbin]# rabbitmqctl set_user_tags admin administrator
Setting tags for user "admin" to [administrator] ...
[[email protected] sbin]#
查看插件
[[email protected] sbin]# rabbitmq-plugins list
Configured: E = explicitly enabled; e = implicitly enabled
| Status: * = running on [email protected]
|/
[ ] amqp_client 3.6.9
[ ] cowboy 1.0.4
[ ] cowlib 1.0.2
[ ] rabbitmq_amqp1_0 3.6.9
[ ] rabbitmq_auth_backend_ldap 3.6.9
启用插件 ,可以使用rabbitmq管理界面
[[email protected] sbin]# rabbitmq-plugins enable rabbitmq_management
The following plugins have been enabled:
amqp_client
cowlib
cowboy
rabbitmq_web_dispatch
rabbitmq_management_agent
rabbitmq_management
Applying plugin configuration to [email protected] started 6 plugins.
查看运行状态
[[email protected] sbin]# rabbitmqctl status
/usr/local/rabbitmq/sbin/rabbitmq-server -detached
以上是关于linux 安装rabbitmq的主要内容,如果未能解决你的问题,请参考以下文章
Springboot 整合 RabbitMQrabbitmq介绍:安装,下载,创建队列交换机,5种工作模式