Linux系统:CentOS7
1、安装系统
基础设施服务器:Java平台、Linux远程管理、开发工具
2、打开网络连接:
(1)cd /etc/sysconfig/network-scripts/ #进入网络配置文件目录
(2)vi ifcfg-eno16777736 #编辑配置文件,修改以下内容
(3)将onboot从no改为yes
(4)退出编辑
(5)service network restart
3、关闭selinux
(1)setenforce 0
(2)vi /etc/sysconfig/selinux
把里边的一行改为
SELINUX=disabled
4、安装Erlang
su -c 'rpm -Uvh http://download.Fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm'
sudo yum install erlang
检查是否安装好:
[root@localhost /]# erl
Erlang R16B03-1 (erts-5.10.4) [source] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false]
5、安装RabbitMQ
(1)下载安装包
wget http://www.rabbitmq.com/releases/rabbitmq-server/v3.6.0/rabbitmq-server-3.6.0-1.noarch.rpm
(2)安装
rpm --import https://www.rabbitmq.com/rabbitmq-signing-key-public.asc
yum install rabbitmq-server-3.6.0-1.noarch.rpm
(3)启用web管理插件
rabbitmq-plugins enable rabbitmq_management
6、启动RabbitMQ
chkconfig rabbitmq-server on
/sbin/service rabbitmq-server start
7、打开对应端口
# firewall-cmd --permanent --zone=public --add-port=5672/tcp
# firewall-cmd --permanent --zone=public --add-port=15672/tcp
# firewall-cmd --reload
8、增加用户
# rabbitmqctl add_user xyt xyt
# rabbitmqctl set_user_tags xyt administrator
9、安装pika
# wget https://bootstrap.pypa.io/get-pip.py
# Python get-pip.py
# pip install pika