1.安装依赖
yum install gcc glibc-devel make ncurses-devel openssl-devel xmlto
2.下载erlang
wget http://www.erlang.org/download/otp_src_20.1.tar.gz
3.安装配置erlang
tar -xzf otp_src_20.1.tar.gzcd otp_src_20.1mkdir /usr/local/erlang./configure --prefix=/usr/local/erlang make && make install
执行完以上命名后切换到
cd /usr/local/erlang/bin./erl
出现:
Erlang/OTP 20 [erts-9.1] [source] [64-bit] [smp:1:1] [ds:1:1:10] [async-threads:10] [hipe] [kernel-poll:false]
Eshell V9.1 (abort with
就是安装成功!
4.把erl添加到环境变量
vim /etc/profile# 添加export PATH=$PATH:/usr/local/erlang/bin# 使配置生效source /etc/profile
5.下载rabbitMQ服务器
wget http://www.rabbitmq.com/releases/rabbitmq-server/v3.6.1/rabbitmq-server-generic-unix-3.6.1.tar.xz
6.解压且安装rabbitMQ服务器
xz -d rabbitmq-server-generic-unix-3.6.1.tar.xztar -xvf rabbitmq-server-generic-unix-3.6.1.tar -C /usr/local/# 到解压后的目录下cd /usr/local/# 重名名为rabbitmqmv rabbitmq_server-3.6.1/ ./rabbitmq# 配置rabbitmq环境变量vim /etc/profile# 添加export PATH=$PATH:/usr/local/rabbitmq/sbin# 使配置生效source /etc/profile
7.RabbitMQ服务启动关闭
cd /usr/local/rabbitmq/sbin# 启动服务./rabbitmq-server -detached# 查看服务状态./rabbitmqctl status# 关闭服务 ./rabbitmqctl stop
7.配置网页访问
#启动插件./rabbitmq-plugins enable rabbitmq_management# 配置linux 端口 15672 网页管理 5672 AMQP端口vim /etc/sysconfig/iptables# 添加-A INPUT -p tcp -m state --state NEW -m tcp --dport 15672 -j ACCEPT-A INPUT -p tcp -m state --state NEW -m tcp --dport 5672 -j ACCEPT# 重启防火墙systemctl restart iptables.service# 远程访问配置rabbitmqctl add_user liuhaizhuang password#添加用户rabbitmqctl set_permissions -p "/" liuhaizhuang ".*" ".*" ".*" #添加权限rabbitmqctl set_user_tags liuhaizhuang administrator # 修改用户的角色
8.测试访问