rabbitmq和erlang版本对应信息
https://www.rabbitmq.com/which-erlang.html
安装版本
rabbitmq-server-3.7.12-1.el6.noarch.rpm
erlang-21.3.8.11-1.el6.x86_64.rpm
el6/el7是指系统版本,如cenos6/cenos7
安装时报错
error: failed dependencies:
socat is needed by rabbitmq-server-3.7.12-1.el6.noarch.rpm
yum install socat
找不到就自行下载一个
yum install 下载的socat
启动时报错Failed to create cookie file '/home/rabbitmq/.erlang.cookie'
手动在/home/rabbitmq下创建
cd /home/rabbitmq
touch .erlang.cookie
再次启动报错
权限问题
Error when reading /var/lib/rabbitmq/.erlang.cookie: eacces
解决地址:https://my.oschina.net/johnhjwsosd/blog/1647966
chown rabbitmq:rabbitmq .erlang.cookie
chmod 400 .erlang.cookie
再再次启动报错
Too short cookie string
.erlang.cookie文件内容为空就会报这个错误
解决地址:https://stackoverflow.com/questions/10655556/ejabberdctl-dump-errors-with-too-short-cookie-string/13299311#13299311
vim .erlang.cookie
LOBGMGERILECQBFOFTLL
保存退出
再再再次启动报错
could_not_start_listener,\"::\",5672
此为部分错误
端口被占用
netstat -nap | grep 5672
lsof -i:port 使用lsof -i :port就能看见所指定端口运行的程序,同时还有当前连接
//kill前要确定暂用此端口的程序不再使用
kill PID
再再再再次启动成功
参考博客:
https://stackoverflow.com/questions/10655556/ejabberdctl-dump-errors-with-too-short-cookie-string/13299311#13299311
https://blog.youkuaiyun.com/xcy1193068639/article/details/95484649
https://blog.youkuaiyun.com/weixin_41918841/article/details/84296807
https://blog.youkuaiyun.com/roc1029/article/details/51249196
https://www.cnblogs.com/gne-hwz/p/10714321.html
https://www.bilibili.com/video/av44972929?t=576