1. erlang(运行环境)
1.1 安装依赖
rpm -ivh http://rpmfind.net/linux/centos/7.6.1810/os/x86_64/Packages/openssl-libs-1.0.2k-16.el7.x86_64.rpm --force
1.2 安装
rpm -ivh https://github.com/rabbitmq/erlang-rpm/releases/download/v21.3.6/erlang-21.3.6-1.el7.x86_64.rpm
1.3 关闭自动更新
yum install yum-plugin-versionlock
yum versionlock erlang
2.RabbitMQ
2.1 导入签名
rpm --import https://github.com/rabbitmq/signing-keys/releases/download/2.0/rabbitmq-release-signing-key.asc
2.2 安装
yum -y install https://github.com/rabbitmq/rabbitmq-server/releases/download/v3.7.14/rabbitmq-server-3.7.14-1.el7.noarch.rpm
2.3 启动
chkconfig rabbitmq-server on
service rabbitmq-server start
2.4 导入默认配置
cp /usr/share/doc/rabbitmq-server-3.7.14/rabbitmq.config.example /etc/rabbitmq/rabbitmq.config
2.5 开启管理后台
rabbitmq-plugins enable rabbitmq_management
firewall-cmd--zone=public --add-port=15672/tcp --permanent
firewall-cmd --reload
2.6 添加管理员用户
rabbitmqctl add_user 用户名 密码
rabbitmqctl set_user_tags 用户 administrator
rabbitmqctl set_permissions -p / 用户 ".*" ".*" ".*"
2.7 修改打开文件数量
mkdir /etc/systemd/system/rabbitmq-server.service.d/
vim /etc/systemd/system/rabbitmq-server.service.d/limits.conf
添加保存以下内容:
[Service]
LimitNOFILE=数量 如65536
重新加载配置
systemctl daemon-reload
service rabbitmq-server restart
——————————————————————————————————————
网友评论