centos7下安装rabbitmq 折腾了三天最后做了以下总结
Centos7安装Rabbitmq: RabbitMq需要erlang配合,所以需要安装Rabbitmq-server和erlang,也可以用迅雷下载然后拷贝到Centos中。
如果未安装二郎则安装的RabbitMQ的时候会提示:
erlang> = R16B-03被rabbitmq-server-3.6.6-1.el7.noarch需要
[root @ localhost workspace]#wgethttp://www.rabbitmq.com/releases/rabbitmq-server/v3.5.0/rabbitmq-server-3.5.0-1.noarch.rpm
[root @ localhost workspace]#wgethttp://www.rabbitmq.com/releases/erlang/erlang-19.0.4-1.el7.centos.x86_64.rpm
先查看一电脑名 :示例
1 #hostname2 3 name
查看一下hosts配置文件:如果如下结果,就要修改下
1 #cat /etc/hosts2 3 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
修改hosts: 如下
1 #vim /etc/hosts2 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 name3 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
安装相关文件:为了不出错,要装 EPEL源,顺手安装一下 redis
##1. 安装 EPEL源#yum install epel-release#yum repolist##2. 安装 redis#yum install redis##3. 安装 erlang //rabbit运行支持环境#yum install erlang#Wget //下载#rpm -ivh rabbitmq-server-3.5.0-1.noarch.rpm //安装#chkconfig rabbitmq-server on //开机启动###配置配置文件:#cd /etc/rabbitmq #//进入目录#cp /user/share/doc/rabbitmq-server-3.5.0/rabbitmq.config.example /etc/rabbitmq/ #//复制 配置文件#mv rabbitmq.config.example rabbitmq.config //改名###开启用户远程访问#vi /etc/rabbitmq/rabbitmq.config{loopback_users,[]}. //改前 {loopback_users,[]} //改后##13. 开启WEB界面管理工具#rabbitmq-plugins enable rabbitmq_management //安装插件#service rabbitmq-server restart //重启服务###14. 开放端口 15672 5672
以上是centos7安装rabbitmq的实例教程的详细内容。更多信息请关注PHP中文网其他相关文章!