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
##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中文網其他相關文章!