注意:安装时使用的系统是CentOS-7,MQ基本概念和RabbitMQ的相关知识请查看写的文章。
在线安装依赖环境:
yum install build-essential openssl openssl-devel unixODBC unixODBC-devel
make gcc gcc-c++ kernel-devel m4 ncurses-devel tk tc xz
RabbitMQ的开发语言是Erlang,所以需要安装Erlang依赖环境。
上传安装包
erlang-18.3-1.el7.centos.x86 64.rpm
socat-1.7.3.2-5.el7.lux.x86 64.rpm
rabbitmg-server-3.6.5-1.noarch.rpm
安装
rpm -ivh erlang-18.3-1.el7.centos.x86 64.rpm
如果报下面的错
说明gblic 版本太低。可以查看当前机器的gblic版本
strings /lib64/libc.so.6|grep GLIBC
使用yum更新安装依赖
sudo yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlit e-devel readline-devel tk-devel gcc make -y
下载rpm包
1. wget http://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-e16/epel-6-x86_64/glibc-2.17-55.fc20/glibc-utils-2.17-55.el6.x86_64.rpm &
2. wgethttp://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-e16/epel-6-x86_64/glibc-2.17-55.fc20/glibc-static-2.17-55.el6.x86_64.rpm &
3. wget httpi//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 &
4. 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 &
5. 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.e16.x86_64.rpm &
6. 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 &
7. wget http://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-x86_64/glibc-2.17-55.fc20/nscd-2.17-55.e16.x86_64.rpm &
安装rpm包
sudo rpm -Uvh *-2.17-55.el6.x86_64.rpm --force --nodeps
安装完毕后再查看glibc版本,发现glibc版本已经到2.17了
strings /lib64/libc.so.6 | grep GLIBC
#安装
rpm -ivh socat-1.7.3.2-1.1.el7.x86_64.rpm
#安装
rpm-ivh rabbitmg-server-3.6.5-1.noarch.rpm
#开启管理界面
rabbitmq-plugins enable rabbitmq_management
#修改默认配置信息
vim /usr/lib/rabbitmq/lib/rabbitmq_server-3.6.5/ebin/rabbit.app
#比如修改密码、配置等等,例如:loopback users 中的 <<"guest">>,只保留guest
service rabbitmq-server start #启动服务
service rabbitmq-server start #停止服务