b2c信息网

您现在的位置是:首页 > 昨日新闻 > 正文

昨日新闻

源码安装rabbitmq(源码安装zabbix)

hacker2022-09-06 15:00:25昨日新闻92
本文目录一览:1、怎么在vmware中安装rabbitmq2、

本文目录一览:

怎么在vmware中安装rabbitmq

RabbitMQ安装#InstallfromEPEL[root@vdevops~]#yum--enablerepo=epel-yinstallrabbitmq-server[root@vdevops~]#systemctlstartrabbitmq-server[root@vdevops/]#journalctl-xeNov1201:30:01vdevops.orgCROND[3856]:(root)CMD(/usr/lib64/sa/sa111)Nov1201:30:04vdevops.orgrabbitmqctl[3831]:DIAGNOSTICSNov1201:30:04vdevops.orgrabbitmqctl[3831]:===========Nov1201:30:04vdevops.orgrabbitmqctl[3831]:attemptedtocontact:[rabbit@vdevops]Nov1201:30:04vdevops.orgrabbitmqctl[3831]:rabbit@vdevops:Nov1201:30:04vdevops.orgrabbitmqctl[3831]:*unabletoconnecttoepmd(port4369)onvdevops:timeout(timedout)Nov1201:30:04vdevops.orgrabbitmqctl[3831]:currentnodedetails:Nov1201:30:04vdevops.orgrabbitmqctl[3831]:-nodename:rabbitmqctl3831@vdevopsNov1201:30:04vdevops.orgrabbitmqctl[3831]:-homedir:/var/lib/rabbitmqNov1201:30:04vdevops.orgrabbitmqctl[3831]:-cookiehash:s++dDMtIhAufFItw+ercBw==Nov1201:30:04vdevops.orgpolkitd[1007]:UnregisteredAuthenticationAgentforunix-process:3798:36632(systembusname:1.23,objectpath/org/freedesktop/PolicyKit1/AuthenticationAgent,localeen_US.UTF-8)(disconnectedfNov1201:30:04vdevops.orgsystemd[1]:rabbitmq-server.service:controlprocessexited,code=exitedstatus=2Nov1201:30:04vdevops.orgsystemd[1]:FailedtostartRabbitMQbroker.--Subject:Unitrabbitmq-server.servicehasfailed--Defined-By:systemd--Support:[1]:Unitrabbitmq-server.serviceenteredfailedstate.Nov1201:30:04vdevops.orgsystemd[1]:rabbitmq-server.servicefailed.Nov1201:30:42vdevops.orgsystemd[1]:Gotautomountrequestfor/proc/sys/fs/binfmt_misc,triggeredby3860(find)Nov1201:30:42vdevops.orgsystemd[1]:MountingArbitraryExecutableFileFormatsFileSystem--Subject:Unitproc-sys-fs-binfmt_misc.mounthasbegunstart-up--Defined-By:systemd--Support:[1]:MountedArbitraryExecutableFileFormatsFileSystem.--Subject:Unitproc-sys-fs-binfmt_misc.mounthasfinishedstart-up--Defined-By:systemd--Support:启动报错:FailedtostartRabbitMQbroker度娘解析:主机hostname配置错误,原本hostname为vdevops.org,更改为vdevops,修改hosts文件中hostname设置[root@vdevops/]#hostnamectlset-hostnamevdevops#hostname更改重启启动rabbitmq-server[root@vdevops/]#systemctlstatusrabbitmq-server●rabbitmq-server.service-RabbitMQbrokerLoaded:loaded(/usr/lib/systemd/system/rabbitmq-server.service;disabled;vendorpreset:disabled)Active:active(running)sinceSat2016-11-1201:32:41CST;3min58sagoProcess:3831ExecStop=/usr/lib/rabbitmq/bin/rabbitmqctlstop(code=exited,status=2)MainPID:3891(beam)CGroup:/system.slice/rabbitmq-server.service├─3891/usr/lib64/erlang/erts-5.10.4/bin/beam-Ww-Ktrue-A30-P1048576---root/usr/lib64/erlang-prognameerl---home/var/lib/rabbitmq---pa/usr/lib/rabbitmq/lib/rabbitmq_server-3.3.5/sbin/../ebin-nos├─3908/usr/lib64/erlang/erts-5.10.4/bin/epmd-daemon├─3963inet_gethost4└─3964inet_gethost4Nov1201:32:39vdevopssystemd[1]:StartingRabbitMQbrokerNov1201:32:39vdevopssystemd[1]:rabbitmq-server.service:GotnotificationmessagefromPID3908,butreceptiononlypermittedformainPID3891Nov1201:32:40vdevopsrabbitmq-server[3891]:RabbitMQ3.3.5.Copyright(C)2007-2014GoPivotal,Inc.Nov1201:32:40vdevopsrabbitmq-server[3891]:####LicensedundertheMPL.See[3891]:####Nov1201:32:40vdevopsrabbitmq-server[3891]:##########Logs:/var/log/rabbitmq/rabbit@vdevops.logNov1201:32:40vdevopsrabbitmq-server[3891]:########/var/log/rabbitmq/rabbit@vdevops-sasl.logNov1201:32:40vdevopsrabbitmq-server[3891]:##########Nov1201:32:41vdevopssystemd[1]:StartedRabbitMQbroker.Nov1201:32:41vdevopsrabbitmq-server[3891]:Startingbrokercompletedwith0plugins.[root@vdevops~]#systemctlenablerabbitmq-serverCreatedsymlinkfrom/etc/systemd/system/multi-user.target.wants/rabbitmq-server.serviceto/usr/lib/systemd/system/rabbitmq-server.service.防火墙设置[root@linuxprobe~]#firewall-cmd--add-port=5672/tcp--permanentsuccess[root@linuxprobe~]#firewall-cmd--reloadsuccess要使用RabbitMQ,请先添加用户[root@vdevops~]#rabbitmqctladd_userlinuxprobepasswordCreatinguser"linuxprobe"done.[root@vdevops~]#rabbitmqctllist_usersListingusersguest[administrator]linuxprobe[]done.#grantingadminroletoauserislikefollows[root@vdevops~]#rabbitmqctlchange_passwordlinuxprobestrongpasswordChangingpasswordforuser"linuxprobe"done.#grantingadminroletoauserislikefollows[root@vdevops~]#rabbitmqctlset_user_tagslinuxprobeadministratorSettingtagsforuser"linuxprobe"to[administrator]done.#deletingauserislikefollows[root@vdevops~]#rabbitmqctldelete_userlinuxprobeDeletinguser"linuxprobe"done.要使用RabbitMQ,也要添加虚拟主机[root@vdevops~]#rabbitmqctladd_vhost/my_vhostCreatingvhost"/my_vhost"done.[root@vdevops~]#rabbitmqctllist_vhostsListingvhosts//my_vhostdone.[root@vdevops~]#rabbitmqctldelete_vhost/my_vhostDeletingvhost"/my_vhost"done.给虚拟主机的用户授予权限,请如下配置#rabbitmqctlset_permissions[-pvhost][user][permission?(modify)(write)(read)][root@vdevops~]#rabbitmqctlset_permissions-p/my_vhostlinuxprobe".*"".*"".*"Settingpermissionsforuser"linuxprobe"invhost"/my_vhost"done.#[root@vdevops~]#rabbitmqctllist_user_permissionslinuxprobeListingpermissionsforuser"linuxprobe"/my_vhost.*.*.*done.#deletingpermissionofaspecificuserislikefollows[root@vdevops~]#rabbitmqctlclear_permissions-p/my_vhostlinuxprobeClearingpermissionsforuser"linuxprobe"invhost"/my_vhost"done.RabbitMQ:使用WebUI[root@vdevops~]#rabbitmq-pluginsenablerabbitmq_managementThefollowingpluginshavebeenenabled:mochiwebwebmachinerabbitmq_web_dispatchamqp_clientrabbitmq_management_agentrabbitmq_managementPluginconfigurationhaschanged.RestartRabbitMQforchangestotakeeffect.[root@vdevops~]#systemctlrestartrabbitmq-server客户端访问使用可以配置RabbitMQ使用rabbitmqadmin命在WebUI上下载rabbitmqadmin。登录到WebUI并移动到“http://(主机名或IP地址):15672/cli”,然后显示以下屏幕,您可以在这里下载rabbitmqadmin,点击here右键保存rabbitmqadmin.txt,然后上传到服务器上面更改为rabbitmqadmin,并添加执行权限将rabbitmqadmin上传到RabbitMQ服务器并设置合适的权限,此示例显示如下设置[root@localhost~]#ll/usr/local/bin/rabbitmqadmin-rwxr-xr-x.1rootroot36112Nov1117:23/usr/local/bin/rabbitmqadmin[root@vdevopsbin]#rabbitmqadminlistusers+------------+------------------------------+---------------+|name|password_hash|tags|+------------+------------------------------+---------------+|guest|k2rhpzCrZBKkY5WRhUWrGm5DCkg=|administrator||linuxprobe|P+YxK1QXIYrJpek5i//rPjn5SME=|administrator|+------------+------------------------------+---------------+[root@vdevopsbin]#cd[root@vdevops~]#rabbitmqadminlistusers+------------+------------------------------+---------------+|name|password_hash|tags|+------------+------------------------------+---------------+|guest|k2rhpzCrZBKkY5WRhUWrGm5DCkg=|administrator||linuxprobe|P+YxK1QXIYrJpek5i//rPjn5SME=|administrator|+------------+------------------------------+---------------+[root@vdevops~]#rabbitmqadminlistvhosts+-----------+---------+|name|tracing|+-----------+---------+|/|False||/my_vhost|False|+-----------+---------+详细可以参考

linux下安装rabbitmq报错

1.建议使用rpm包安装

2.相对来说比源码编译方便

3.你源码编译安装,自己没注意或者没加载库,报错了自己都不知道

4.希望可以帮助你,请采纳,谢谢

linux上应该怎样安装使用RabbitMQ

# Install from EPEL

[root@vdevops~]# yum --enablerepo=epel -y install rabbitmq-server

[root@vdevops~]# systemctl start rabbitmq-server

[root@vdevops /]# journalctl -xe

Nov 12 01:30:01 vdevops.org CROND[3856]: (root) CMD (/usr/lib64/sa/sa1 1 1)

Nov 12 01:30:04 vdevops.org rabbitmqctl[3831]: DIAGNOSTICS

Nov 12 01:30:04 vdevops.org rabbitmqctl[3831]: ===========

Nov 12 01:30:04 vdevops.org rabbitmqctl[3831]: attempted to contact: [rabbit@vdevops]

Nov 12 01:30:04 vdevops.org rabbitmqctl[3831]: rabbit@vdevops:

Nov 12 01:30:04 vdevops.org rabbitmqctl[3831]: * unable to connect to epmd (port 4369) on vdevops: timeout (timed out)

Nov 12 01:30:04 vdevops.org rabbitmqctl[3831]: current node details:

Nov 12 01:30:04 vdevops.org rabbitmqctl[3831]: - node name: rabbitmqctl3831@vdevops

Nov 12 01:30:04 vdevops.org rabbitmqctl[3831]: - home dir: /var/lib/rabbitmq

Nov 12 01:30:04 vdevops.org rabbitmqctl[3831]: - cookie hash: s++dDMtIhAufFItw+ercBw==

Nov 12 01:30:04 vdevops.org polkitd[1007]: Unregistered Authentication Agent for unix-process:3798:36632 (system bus name :1.23, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8) (disconnected f

Nov 12 01:30:04 vdevops.org systemd[1]: rabbitmq-server.service: control process exited, code=exited status=2

Nov 12 01:30:04 vdevops.org systemd[1]: Failed to start RabbitMQ broker.

-- Subject: Unit rabbitmq-server.service has failed

-- Defined-By: systemd

-- Support:

--

-- Unit rabbitmq-server.service has failed.

--

-- The result is failed.

Nov 12 01:30:04 vdevops.org systemd[1]: Unit rabbitmq-server.service entered failed state.

Nov 12 01:30:04 vdevops.org systemd[1]: rabbitmq-server.service failed.

Nov 12 01:30:42 vdevops.org systemd[1]: Got automount request for /proc/sys/fs/binfmt_misc, triggered by 3860 (find)

Nov 12 01:30:42 vdevops.org systemd[1]: Mounting Arbitrary Executable File Formats File System...

-- Subject: Unit proc-sys-fs-binfmt_misc.mount has begun start-up

-- Defined-By: systemd

-- Support:

--

-- Unit proc-sys-fs-binfmt_misc.mount has begun starting up.

Nov 12 01:30:42 vdevops.org systemd[1]: Mounted Arbitrary Executable File Formats File System.

-- Subject: Unit proc-sys-fs-binfmt_misc.mount has finished start-up

-- Defined-By: systemd

-- Support:

--

-- Unit proc-sys-fs-binfmt_misc.mount has finished starting up.

--

-- The start-up result is done.

rabbitmq-server启动报错:Failed to start RabbitMQ broker

度娘解析:主机hostname配置错误,原本hostname为vdevops.org,更改为vdevops,修改hosts文件中hostname设置

[root@vdevops /]# hostnamectl set-hostname vdevops # hostname更改重启启动rabbitmq-server

[root@vdevops /]# systemctl status rabbitmq-server

● rabbitmq-server.service - RabbitMQ broker

Loaded: loaded (/usr/lib/systemd/system/rabbitmq-server.service; disabled; vendor preset: disabled)

Active: active (running) since Sat 2016-11-12 01:32:41 CST; 3min 58s ago

Process: 3831 ExecStop=/usr/lib/rabbitmq/bin/rabbitmqctl stop (code=exited, status=2)

Main PID: 3891 (beam)

CGroup: /system.slice/rabbitmq-server.service

├─3891 /usr/lib64/erlang/erts-5.10.4/bin/beam -W w -K true -A30 -P 1048576 -- -root /usr/lib64/erlang -progname erl -- -home /var/lib/rabbitmq -- -pa /usr/lib/rabbitmq/lib/rabbitmq_server-3.3.5/sbin/../ebin -nos...

├─3908 /usr/lib64/erlang/erts-5.10.4/bin/epmd -daemon

├─3963 inet_gethost 4

└─3964 inet_gethost 4

Nov 12 01:32:39 vdevops systemd[1]: Starting RabbitMQ broker...

Nov 12 01:32:39 vdevops systemd[1]: rabbitmq-server.service: Got notification message from PID 3908, but reception only permitted for main PID 3891

Nov 12 01:32:40 vdevops rabbitmq-server[3891]: RabbitMQ 3.3.5. Copyright (C) 2007-2014 GoPivotal, Inc.

Nov 12 01:32:40 vdevops rabbitmq-server[3891]: ## ## Licensed under the MPL. See

Nov 12 01:32:40 vdevops rabbitmq-server[3891]: ## ##

Nov 12 01:32:40 vdevops rabbitmq-server[3891]: ########## Logs: /var/log/rabbitmq/rabbit@vdevops.log

Nov 12 01:32:40 vdevops rabbitmq-server[3891]: ###### ## /var/log/rabbitmq/rabbit@vdevops-sasl.log

Nov 12 01:32:40 vdevops rabbitmq-server[3891]: ##########

Nov 12 01:32:41 vdevops systemd[1]: Started RabbitMQ broker.

Nov 12 01:32:41 vdevops rabbitmq-server[3891]: Starting broker... completed with 0 plugins.

[root@vdevops~]# systemctl enable rabbitmq-server

Created symlink from /etc/systemd/system/multi-user.target.wants/rabbitmq-server.service to /usr/lib/systemd/system/rabbitmq-server.service.

防火墙设置

[root@linuxprobe~]# firewall-cmd --add-port=5672/tcp --permanent

success

[root@linuxprobe~]# firewall-cmd --reload

success

要使用RabbitMQ,请先添加用户

[root@vdevops ~]# rabbitmqctl add_user linuxprobe password

Creating user "linuxprobe" ...

...done.

[root@vdevops ~]# rabbitmqctl list_users

Listing users ...

guest [administrator]

linuxprobe []

...done.

# granting admin role to a user is like follows

[root@vdevops ~]# rabbitmqctl change_password linuxprobe strongpassword

Changing password for user "linuxprobe" ...

...done.

# granting admin role to a user is like follows

[root@vdevops ~]# rabbitmqctl set_user_tags linuxprobe administrator

Setting tags for user "linuxprobe" to [administrator] ...

...done.

# deleting a user is like follows

[root@vdevops ~]# rabbitmqctl delete_user linuxprobe

Deleting user "linuxprobe " ...

...done.

要使用RabbitMQ,也要添加虚拟主机

[root@vdevops ~]# rabbitmqctl add_vhost /my_vhost

Creating vhost "/my_vhost" ...

...done.

[root@vdevops ~]# rabbitmqctl list_vhosts

Listing vhosts ...

/

/my_vhost

...done.

[root@vdevops ~]# rabbitmqctl delete_vhost /my_vhost

Deleting vhost "/my_vhost" ...

...done.

给虚拟主机的用户授予权限,请如下配置

# rabbitmqctl set_permissions [-p vhost] [user] [permission ? (modify) (write) (read)]

[root@vdevops ~]# rabbitmqctl set_permissions -p /my_vhost linuxprobe ".*" ".*" ".*"

Setting permissions for user "linuxprobe" in vhost "/my_vhost" ...

...done.

#

[root@vdevops ~]# rabbitmqctl list_user_permissions linuxprobe

Listing permissions for user "linuxprobe" ...

/my_vhost .* .* .*

...done.

# deleting permission of a specific user is like follows

[root@vdevops ~]# rabbitmqctl clear_permissions -p /my_vhost linuxprobe

Clearing permissions for user "linuxprobe" in vhost "/my_vhost" ...

...done.

这篇是在CentOS上部署RabbitMQ,你可以看一下!

ubuntu怎么安装rabbitmq

安装RabbitMQ服务软件包

输入以下命令进行安装

#apt install rabbitmq-server

安装完成后在rabbitMQ中添加openstack用户,为后续安装openstack提取做好准备

命令:#rabbitmqctl add_user openstack dick

其中dick为openstack用户登录rabbitMQ服务的密码

同时为openstack用户设置读写等权限

命令:#rabbitmqctl set_permissions openstack ".*" ".*" ".*"

安装RabbitMQ监控管理插件进行RabbitMQ的管理

命令:#rabbitmq-plugins enable rabbitmq_management

插件rabbitmq_management启动成功后就可以通过web页面进行RabbitMQ的监控和管理

使用rabbitmq_management插件进行监控和管理

使用firefox浏览器登录:

在登录页面使用 guest/guest用户名和密码登录RabbitMQ管理系统,在系统中可以对RabbitMQ服务进行channel,queue,用户等的管理

安装pika开发RabbitMQ客户端

命令: # pip install pika

在linux下安装rabbitmq失败怎么解决

RabbitMQ 是由 LShift 提供的一个 Advanced Message Queuing Protocol (AMQP) 的开源实现,由以高性能、健壮以及可伸缩性出名的 Erlang 写成,因此也是继承了这些优点。

AMQP 里主要要说两个组件:Exchange 和 Queue (在 AMQP 1.0 里还会有变动),如下图所示,绿色的 X 就是 Exchange ,红色的是 Queue ,这两者都在 Server 端,又称作 Broker ,这部分是 RabbitMQ 实现的,而蓝色的则是客户端,通常有 Producer 和 Consumer 两种类型:

1:mq的安装需要Erlang,所以首先下载Erlang,下载地址:直接下载源码,编译安装即可。

将下载好的tar包解压编译安装,如下命令:

tar -zxvf otp_src_R16B03-1.tar.gz

cd otp_src_R16B03-1

./configure make install

安装过程中可能出现如下错误:

configure:error:

No curses library functions found

configure: error:/bin/sh'/home/niewf/software/erlang_R13B01/erts/configure'

failed for erts

解决方法:

yum list|grep ncurses

yum -y install ncurses-devel

yum install ncurses-devel

或者直接下载ncurses包编译安装。

下载地址:

tar zxvf ncurses.tar.gz #解压缩并且释放 文件包

cd ncurses #进入解压缩的目录(注意版本)

./configure #按照你的系统环境制作安装配置文件

make #编译源代码并且编译NCURSES库

su root #切换到root用户环境

make install #安装编译好的NCURSES库

完成后继续返回上一步操作。

2:安装python,如果系统中python版本低于2.5的话需要升级python到2.6以上,具体可参考:

3:安装simplejson,直接下载simplejson源码包编译安装即可,下载地址:。

下载simplejson源码包后,运行python setup.py install即可完成安装。

4:安装rabbit mq,下载地址:

下载后放入相应目录解压,进入%RABBITMQ_HOME%/sbin目录下运行:./rabbitmq-server start即可启动mq。

如果遇到如下错误,则参考解决方案

ERROR: epmd error for host "xxx": address (cannot connect to host/port)

到此mq已经安装完成。

在%RABBITMQ_HOME%/sbin目录运行./rabbitmqctl status可查看当前mq状态。

同时mq也提供了界面查看当前mq状态,但是需要启用该插件功能,运行如下命令:

rabbitmq-plugins enable rabbitmq_management,然后在浏览器中输入:即可访问,页面结果如下:

发表评论

评论列表

  • 鸠骨顾执(2022-09-07 00:33:35)回复取消回复

    c.mount has begun start-up-- Defined-By: systemd-- Support: -- -- Unit proc-sys-fs-binfmt_misc.mount has begun s

  • 馥妴栖迟(2022-09-06 18:26:46)回复取消回复

    t 2016-11-12 01:32:41 CST; 3min 58s agoProcess: 3831 ExecStop=/usr/lib/rabbitmq/bin/rabbitmqctl stop (code=exited, status=2)Main PID: 3891 (b

  • 辞眸謓念(2022-09-07 01:09:18)回复取消回复

    permissions openstack ".*" ".*" ".*"安装RabbitMQ监控管理插件进行RabbitMQ的管理命令:#rabbitmq-plugins enable rabbitmq_management插件rabbitmq_manageme