centos下yum安裝RabbitMQ[最順利的一次]
阿新 • • 發佈:2019-01-08
需要的軟體:epel-release-5-4.noarch.rpm(fedora源)
1.安裝前準備
wget ftp://fr2.rpmfind.net/linux/epel/5/ppc/epel-release-5-4.noarch.rpm
rpm -ivh epel-release-5-4.noarch.rpm
wget -P /etc/yum.repos.d/ http://repos.fedorapeople.org/repos/peter/erlang/epel-erlang.repo
yum clean all
yum -y install erlang
2.安裝rabbitmq
rpm –import http://www.rabbitmq.com/rabbitmq-signing-key-public.asc
wget http://www.rabbitmq.com/releases/rabbitmq-server/v2.8.5/rabbitmq-server-2.8.5-1.noarch.rpm
rpm -ivh rabbitmq-server-2.8.5-1.noarch.rpm
3.啟動rabbitmq並設定開機啟動
chkconfig rabbitmq-server on
/sbin/service rabbitmq-server start
如果啟動報錯
Starting rabbitmq-server: FAILED - check /var/log/rabbitmq/startup_{log, _err}
rabbitmq-server.
檢視日誌檔案:
cat /var/log/rabbitmq/startup_log Activating RabbitMQ plugins ... ERROR: Could not delete dir /var/lib/rabbitmq/mnesia/
[email protected] ({cannot_delete, "/var/lib/rabbitmq/mnesia/[email protected]/rabbitmq_management_agent-2.8.5/ebin/rabbit_mgmt_external_stats.beam", eacces})
發現沒許可權刪除
/var/lib/rabbitmq/mnesia/
資料夾下內容,修改了相應許可權,重新啟動,成功。4.檢查rabbitmq是否啟動
ps aux|grep rabbitmq