安装erlang
安装依赖
yum -y install gcc glibc-devel make ncurses-devel openssl-devel xmlto perl wget gtk2-devel binutils-devel
下载安装包
wget http://erlang.org/download/otp_src_22.0.tar.gz
解压、配置过程命令
tar -zxvf otp_src_22.0.tar.gz
mv otp_src_22.0 /usr/local/
cd /usr/local/otp_src_22.0/
mkdir ../erlang
./configure --prefix=/usr/local/erlang
结果抓图
安装
make install
添加环境变量
echo 'export PATH=$PATH:/usr/local/erlang/bin' >> /etc/profile
刷新环境变量
source /etc/profile
验证,执行以下命令
erl
安装RabbitMQ
rabbitmq下载地址:https://github.com/rabbitmq/rabbitmq-server/releases/tag/v3.7.15
部署过程
tag -xvf rabbitmq-server-generic-unix-3.7.15.tar.xz
mv rabbitmq_server-3.7.15/ /usr/local/rabbitmq
echo 'export PATH=$PATH:/usr/local/rabbitmq/sbin' >> /etc/profile
source /etc/profile
mkdir /etc/rabbitmq
启动:
rabbitmq-server -detached
停止:
rabbitmqctl stop
状态:
rabbitmqctl status
开启web管理插件
rabbitmq-plugins enable rabbitmq_management
默认只有一个guest用户,只能本地登陆,添加一个管理员用户:rabbitmq
rabbitmqctl add_user rabbitmq rabbitmq
rabbitmqctl set_permissions -p / rabbitmq ".*" ".*" ".*"
rabbitmqctl set_user_tags rabbitmq administrator
访问:http://rabbitmq所在服务器IP:15672/,界面如下: