服务器为阿里云服务器,操作系统为Alibaba Cloud Linux 3.2104 64位
跟着尚硅谷视频,安装好的RabbitMQ一直启动不了,前提已经放开相应端口,搜了一圈有人说是没有修改/etc/hosts
vim /etc/hosts
这个命令打开
前两行为这个,第三行写自己ip和主机名,类似 XXX.XXX.XXX.XXX 主机名
按i插入写好后ESC键 输入:wq! 保存并退出
然而没有用,索性卸载重安装。
2、重新安装第一步 安装erlang
rpm -ivh erlang-21.3-1.el7.x86_64.rpm
error: Failed dependencies:
libcrypto.so.10()(64bit) is needed by erlang-23.3.4.4-1.el7.x86_64
libcrypto.so.10(OPENSSL_1.0.1_EC)(64bit) is needed by erlang-23.3.4.4-1.el7.x86_64
libcrypto.so.10(OPENSSL_1.0.2)(64bit) is needed by erlang-23.3.4.4-1.el7.x86_64
libcrypto.so.10(libcrypto.so.10)(64bit) is needed by erlang-23.3.4.4-1.el7.x86_64
libnsl.so.1()(64bit) is needed by erlang-23.3.4.4-1.el7.x86_64
我记起来第一次安装的时候 在后边加了 –force (这就是导致我RabbitMQ未能启动的根本原因),所以必须安装libcrypto.so.10(OPENSSL_1.0.2)(64bit)解决问题,不能强制安装,首先安装OpenSSL 1.0.2,点如下连接
http://rpmfind.net/linux/rpm2html/search.php?query=libcrypto.so.10(OPENSSL_1.0.2)(64bit)&submit=Search+…&system=&arch=
最后一行找到,点开下载以后传到服务器中,直接安装会报冲突,所以加–force
[root@c opt]# rpm -ivh openssl-libs-1.0.2k-19.el7.x86_64.rpm --force
warning: openssl-libs-1.0.2k-19.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID f4a80eb5: NOKEY
Verifying... ################################# [100%]
Preparing... ################################# [100%]
Updating / installing...
1:openssl-libs-1:1.0.2k-19.el7 ################################# [100%]
安装成功,回到安装erlang来
[root@c opt]# rpm -ivh erlang-21.3-1.el7.x86_64.rpm
warning: erlang-21.3-1.el7.x86_64.rpm: Header V4 RSA/SHA1 Signature, key ID 6026dfca: NOKEY
error: Failed dependencies:
libnsl.so.1()(64bit) is needed by erlang-21.3-1.el7.x86_64
比之前报的缺依赖要少了,哈哈哈,运行
dnf install libnsl
dnf install libnsl
完成后重新试一下
[root@c opt]# rpm -ivh erlang-21.3-1.el7.x86_64.rpm
warning: erlang-21.3-1.el7.x86_64.rpm: Header V4 RSA/SHA1 Signature, key ID 6026dfca: NOKEY
Verifying... ################################# [100%]
Preparing... ################################# [100%]
Updating / installing...
1:erlang-21.3-1.el7 ################################# [100%]
这次成功了!!!!!
2、安装socat
[root@c opt]# yum install socat -y
3、安装rabbitmq
[root@cty opt]# rpm -ivh rabbitmq-server-3.8.8-1.el7.noarch.rpm
warning: rabbitmq-server-3.8.8-1.el7.noarch.rpm: Header V4 RSA/SHA256 Signature, key ID 6026dfca: NOKEY
Verifying... ################################# [100%]
Preparing... ################################# [100%]
Updating / installing...
1:rabbitmq-server-3.8.8-1.el7 ################################# [100%]
[/usr/lib/tmpfiles.d/rabbitmq-server.conf:1] Line references path below legacy directory /var/run/, updating /var/run/rabbitmq → /run/rabbitmq; please update the tmpfiles.d/ drop-in file accordingly.
4、安装成功后试着启动
[root@cty opt]# /sbin/service rabbitmq-server start
Redirecting to /bin/systemctl start rabbitmq-server.service
这次启动成功了,因为查看状态 /sbin/service rabbitmq-server status
发现
唉终于完成,有问题留言,搞了好长时间,累了