我们选择在Linux虚拟机中进行我们的RabbitMQ安装学习
1、下载
那么首先我们可以在window中下载三个安装包
erlang: www.rabbitmq.com/releases/erlang/erlang-18.3-1.el7.centos.x86_64.rpm
RabbitMQ-Server: www.rabbitmq.com/releases/rabbitmq-server/v3.6.5/rabbitmq-server-3.6.5-1.noarch.rpm
socat: http://repo.iotti.biz/CentOS/7/x86_64/socat-1.7.3.2-5.el7.lux.x86_64.rpm
然后把三个包上传到我们的虚拟机中
2、安装
依次安装三个包
rpm -ivh erlang-18.3-1.el7.centos.x86_64.rpm
rpm -ivh socat-1.7.3.2-5.el7.lux.x86_64.rpm
rpm -ivh rabbitmq-server-3.6.5-1.noarch.rpm
此时若出现了如下报错(没出现如下报错则跳过第二步剩下的步骤)
Failed dependencies: libc.so.6(GLIBC_2.14)(64bit) is needed by erlang-18.3-1.el7.centos.x86
查看已安装的 gblic 版本
strings /lib64/libc.so.6 | grep GLIBC
执行如下:
GLIBC_2.2.5
GLIBC_2.2.6
GLIBC_2.3
GLIBC_2.3.2
GLIBC_2.3.3
GLIBC_2.3.4
GLIBC_2.4
GLIBC_2.5
GLIBC_2.6
GLIBC_2.7
GLIBC_2.8
GLIBC_2.9
GLIBC_2.10
GLIBC_2.11
GLIBC_2.12
GLIBC_PRIVATE
[root@VM_0_5_centos glibc-2.14]#
使用yum更新安装依赖
yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gcc make -y
下载rpm包
wget http://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-x86_64/glibc-2.17-55.fc20/glibc-utils-2.17-55.el6.x86_64.rpm &
wget http://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-x86_64/glibc-2.17-55.fc20/glibc-static-2.17-55.el6.x86_64.rpm &
wget http://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-x86_64/glibc-2.17-55.fc20/glibc-2.17-55.el6.x86_64.rpm &
wget http://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-x86_64/glibc-2.17-55.fc20/glibc-common-2.17-55.el6.x86_64.rpm &
wget http://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-x86_64/glibc-2.17-55.fc20/glibc-devel-2.17-55.el6.x86_64.rpm &
wget http://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-x86_64/glibc-2.17-55.fc20/glibc-headers-2.17-55.el6.x86_64.rpm &
wget http://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-x86_64/glibc-2.17-55.fc20/nscd-2.17-55.el6.x86_64.rpm &
下载好后,安装包如下:
[root@VM_0_5_centos glibc-2.17]# ls -ll -h
total 22M
-rw-r--r-- 1 root root 4.0M Feb 17 2015 glibc-2.17-55.el6.x86_64.rpm
-rw-r--r-- 1 root root 14M Feb 17 2015 glibc-common-2.17-55.el6.x86_64.rpm
-rw-r--r-- 1 root root 1020K Feb 17 2015 glibc-devel-2.17-55.el6.x86_64.rpm
-rw-r--r-- 1 root root 663K Feb 17 2015 glibc-headers-2.17-55.el6.x86_64.rpm
-rw-r--r-- 1 root root 1.7M Feb 17 2015 glibc-static-2.17-55.el6.x86_64.rpm
-rw-r--r-- 1 root root 193K Feb 17 2015 glibc-utils-2.17-55.el6.x86_64.rpm
-rw-r--r-- 1 root root 250K Feb 17 2015 nscd-2.17-55.el6.x86_64.rpm
[root@VM_0_5_centos glibc-2.17]#
安装rpm包
rpm -Uvh *-2.17-55.el6.x86_64.rpm --force --nodeps
安装完毕后,再次查看版本
[root@VM_0_5_centos glibc-2.17]# strings /lib64/libc.so.6 | grep GLIBC
GLIBC_2.2.5
GLIBC_2.2.6
GLIBC_2.3
GLIBC_2.3.2
GLIBC_2.3.3
GLIBC_2.3.4
GLIBC_2.4
GLIBC_2.5
GLIBC_2.6
GLIBC_2.7
GLIBC_2.8
GLIBC_2.9
GLIBC_2.10
GLIBC_2.11
GLIBC_2.12
GLIBC_2.13
GLIBC_2.14
GLIBC_2.15
GLIBC_2.16
GLIBC_2.17
GLIBC_PRIVATE
可以看到一次性增加了 13 到 17 的版本号。
3、拷贝rabbitmq的配置文件
拷贝rabbitmq的配置文件rabbitmq.config.example
从/usr/share/doc/rabbitmq-server-3.6.5/到/etc/rabbitmq/
cp /usr/share/doc/rabbitmq-server-3.6.5/rabbitmq.config.example /etc/rabbitmq/rabbitmq.config
4、修改配置文件
修改/etc/rabbitmq/rabbitmq.config
vim /etc/rabbitmq/rabbitmq.config
去掉%%号和,号
5、启动插件管理
执行如下命令,启动rabbitmq插件管理
rabbitmq-plugins enable rabbitmq_management
6、启动rabbitmq服务
执行启动命令
service rabbitmq-server start
service rabbitmq-server start 启动
service rabbitmq-server restart 重启
service rabbitmq-server stop 停止
7、访问rabbitmq的web管理界面
访问http://虚拟机的ip地址:15672/
比如我的就是http://192.168.19.128:15672/
初始访问账号:guest
初始访问密码:guest