【安装epel】
[[email protected] opt]# wget -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
--2015-12-27 15:46:14-- http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
正在解析主机 dl.fedoraproject.org... 209.132.181.24, 209.132.181.25, 209.132.181.26, ...
正在连接 dl.fedoraproject.org|209.132.181.24|:80... 已连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度:14540 (14K) [application/x-rpm]
正在保存至: “epel-release-6-8.noarch.rpm”
100%[===========================================================================================>] 14,540 23.2K/s in 0.6s
2015-12-27 15:46:16 (23.2 KB/s) - 已保存 “epel-release-6-8.noarch.rpm” [14540/14540])
[[email protected] opt]# ls
epel-release-6-8.noarch.rpm
[[email protected] opt]# rpm -ivh epel-release-6-8.noarch.rpm
warning: epel-release-6-8.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY
Preparing... ########################################### [100%]
1:epel-release ########################################### [100%]
[[email protected] opt]#
[[email protected] opt]#
[[email protected] opt]#
[[email protected] opt]#
[[email protected] opt]#
[[email protected] opt]# cd /etc/yum.repos.d/;ls
epel.repo epel-testing.repo
[[email protected] yum.repos.d]# wget -c http://mirrors.163.com/.help/CentOS6-Base-163.repo
--2015-12-27 15:48:34-- http://mirrors.163.com/.help/CentOS6-Base-163.repo
正在解析主机 mirrors.163.com... 123.58.173.186, 123.58.173.185
正在连接 mirrors.163.com|123.58.173.186|:80... 已连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度:2006 (2.0K) [application/octet-stream]
正在保存至: “CentOS6-Base-163.repo”
100%[=============================>] 2,006 --.-K/s in 0s
2015-12-27 15:48:34 (284 MB/s) - 已保存 “CentOS6-Base-163.repo” [2006/2006])
[[email protected] yum.repos.d]# yum clean all
Loaded plugins: fastestmirror, refresh-packagekit, security
Cleaning repos: base epel extras updates
Cleaning up Everything
Cleaning up list of fastest mirrors
[[email protected] yum.repos.d]# yum makecache
Loaded plugins: fastestmirror, refresh-packagekit, security
Determining fastest mirrors
epel/metalink | 4.2 kB 00:00
* epel: mirrors.opencas.cn
base | 3.7 kB 00:00
base/group_gz | 219 kB 00:00
base/filelists_db | 6.3 MB 00:11
base/primary_db | 4.6 MB 00:12
base/other_db | 2.8 MB 00:12
epel | 4.3 kB 00:00
epel/group_gz | 149 kB 00:00
epel/filelists_db | 7.9 MB 00:28
epel/updateinfo | 709 kB 00:01
epel/primary_db | 5.7 MB 00:18
epel/other_db | 2.9 MB 00:09
extras | 2.9 kB 00:00
extras/filelists_db | 36 kB 00:00
extras/primary_db | 33 kB 00:00
extras/other_db | 48 kB 00:00
updates | 3.4 kB 00:00
updates/filelists_db | 2.5 MB 00:11
updates/prestodelta | 289 kB 00:01
updates/primary_db | 3.3 MB 00:13
updates/other_db | 39 MB 01:26
Metadata Cache Created
[[email protected] yum.repos.d]# yum -y install rabbitmq-server
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
* epel: mirrors.opencas.cn
Setting up Install Process
Resolving Dependencies
--> Running transaction check
...
---> Package tcl.x86_64 1:8.5.7-6.el6 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
=======================================================================
Package Arch Version Repository
Size
=======================================================================
Installing:
rabbitmq-server noarch 3.1.5-1.el6 epel 3.6 M
Installing for dependencies:
SDL x86_64 1.2.14-7.el6_7.1 updates 193 k
erlang x86_64 R14B-04.3.el6 epel 26 k
...
wxGTK-gl x86_64 2.8.12-1.el6.centos extras 31 k
Transaction Summary
=======================================================================
Install 66 Package(s)
Total download size: 45 M
Installed size: 90 M
Downloading Packages:
(1/66): SDL-1.2.14-7.el6_7.1.x86_64.rpm | 193 kB 00:00
...
(66/66): wxGTK-gl-2.8.12-1.el6.centos.x86_64.rp | 31 kB 00:00
-----------------------------------------------------------------------
Total 248 kB/s | 45 MB 03:07
warning: rpmts_HdrFromFdno: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
Importing GPG key 0x0608B895:
Userid : EPEL (6) <[email protected]>
Package: epel-release-6-8.noarch (installed)
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
Installing : erlang-crypto-R14B-04.3.el6.x86_64 1/66
...
Verifying : erlang-cosEvent-R14B-04.3.el6.x86_64 66/66
Installed:
rabbitmq-server.noarch 0:3.1.5-1.el6
Dependency Installed:
SDL.x86_64 0:1.2.14-7.el6_7.1
erlang.x86_64 0:R14B-04.3.el6
...
wxGTK-gl.x86_64 0:2.8.12-1.el6.centos
Complete!
[[email protected] yum.repos.d]# erl
Erlang R14B04 (erts-5.8.5) [source] [64-bit] [rq:1] [async-threads:0] [kernel-poll:false]
Eshell V5.8.5 (abort with ^G)
1>
BREAK: (a)bort (c)ontinue (p)roc info (i)nfo (l)oaded
(v)ersion (k)ill (D)b-tables (d)istribution
^C
[[email protected] yum.repos.d]#
[[email protected] yum.repos.d]#
[[email protected] yum.repos.d]#
[[email protected] yum.repos.d]#
[[email protected] yum.repos.d]#
[[email protected] yum.repos.d]#
[[email protected] yum.repos.d]# ls
CentOS6-Base-163.repo epel.repo epel-testing.repo other
[[email protected] yum.repos.d]#
[[email protected] yum.repos.d]#
[[email protected] yum.repos.d]# cd /usr/lib/rabbitmq/
[[email protected] rabbitmq]# ls
bin lib
[[email protected] rabbitmq]# cd bin
[[email protected] bin]# ls
rabbitmqctl rabbitmq-env rabbitmq-server
rabbitmq-defaults rabbitmq-plugins
[[email protected] bin]# ./rabbitmq-plugins list #查看插件表
[ ] amqp_client 3.1.5
[ ] cowboy 0.5.0-rmq3.1.5-git4b93c2d
[ ] eldap 3.1.5-gite309de4
[ ] mochiweb 2.7.0-rmq3.1.5-git680dba8
[ ] rabbitmq_amqp1_0 3.1.5
[ ] rabbitmq_auth_backend_ldap 3.1.5
[ ] rabbitmq_auth_mechanism_ssl 3.1.5
[ ] rabbitmq_consistent_hash_exchange 3.1.5
[ ] rabbitmq_federation 3.1.5
[ ] rabbitmq_federation_management 3.1.5
[ ] rabbitmq_jsonrpc 3.1.5
[ ] rabbitmq_jsonrpc_channel 3.1.5
[ ] rabbitmq_jsonrpc_channel_examples 3.1.5
[ ] rabbitmq_management 3.1.5
[ ] rabbitmq_management_agent 3.1.5
[ ] rabbitmq_management_visualiser 3.1.5
[ ] rabbitmq_mqtt 3.1.5
[ ] rabbitmq_shovel 3.1.5
[ ] rabbitmq_shovel_management 3.1.5
[ ] rabbitmq_stomp 3.1.5
[ ] rabbitmq_tracing 3.1.5
[ ] rabbitmq_web_dispatch 3.1.5
[ ] rabbitmq_web_stomp 3.1.5
[ ] rabbitmq_web_stomp_examples 3.1.5
[ ] rfc4627_jsonrpc 3.1.5-git5e67120
[ ] sockjs 0.3.4-rmq3.1.5-git3132eb9
[ ] webmachine 1.10.3-rmq3.1.5-gite9359c7
[[email protected] bin]# ls
rabbitmqctl rabbitmq-env rabbitmq-server
rabbitmq-defaults rabbitmq-plugins
[[email protected] bin]# ./rabbitmq-plugins enable rabbitmq_management #启动web插件
The following plugins have been enabled:
mochiweb
webmachine
rabbitmq_web_dispatch
amqp_client
rabbitmq_management_agent
rabbitmq_management
Plugin configuration has changed. Restart RabbitMQ for changes to take effect.
[[email protected] bin]# /etc/init.d/rabbitmq-server start #启动服务
Starting rabbitmq-server: SUCCESS
rabbitmq-server.
[[email protected] bin]# /etc/init.d/rabbitmq-server status #查看状态
Status of node [email protected] ...
[{pid,27920},
{running_applications,
[{rabbitmq_management,"RabbitMQ Management Console","3.1.5"},
{rabbitmq_web_dispatch,"RabbitMQ Web Dispatcher","3.1.5"},
{webmachine,"webmachine","1.10.3-rmq3.1.5-gite9359c7"},
{mochiweb,"MochiMedia Web Server","2.7.0-rmq3.1.5-git680dba8"},
{rabbitmq_management_agent,"RabbitMQ Management Agent","3.1.5"},
{rabbit,"RabbitMQ","3.1.5"},
{mnesia,"MNESIA CXC 138 12","4.5"},
{os_mon,"CPO CXC 138 46","2.2.7"},
{inets,"INETS CXC 138 49","5.7.1"},
{xmerl,"XML parser","1.2.10"},
{amqp_client,"RabbitMQ AMQP Client","3.1.5"},
{sasl,"SASL CXC 138 11","2.1.10"},
{stdlib,"ERTS CXC 138 10","1.17.5"},
{kernel,"ERTS CXC 138 10","2.14.5"}]},
{os,{unix,linux}},
{erlang_version,
"Erlang R14B04 (erts-5.8.5) [source] [64-bit] [rq:1] [async-threads:30] [kernel-poll:true]\n"},
{memory,
[{total,31040512},
{connection_procs,5296},
{queue_procs,5296},
{plugins,251696},
{other_proc,9663216},
{mnesia,57360},
{mgmt_db,52400},
{msg_index,20920},
{other_ets,1043720},
{binary,7576},
{code,17075518},
{atom,1548833},
{other_system,1308681}]},
{vm_memory_high_watermark,0.4},
{vm_memory_limit,411407155},
{disk_free_limit,1000000000},
{disk_free,95179345920},
{file_descriptors,
[{total_limit,924},{total_used,3},{sockets_limit,829},{sockets_used,1}]},
{processes,[{limit,1048576},{used,191}]},
{run_queue,0},
{uptime,4}]
...done.
[[email protected] bin]# netstat -tlnp | grep beam #查看端口
tcp 0 0 0.0.0.0:53906 0.0.0.0:* LISTEN 27920/beam
tcp 0 0 0.0.0.0:15672 0.0.0.0:* LISTEN 27920/beam
tcp 0 0 0.0.0.0:55672 0.0.0.0:* LISTEN 27920/beam
tcp 0 0 :::5672 :::* LISTEN 27920/beam
[[email protected] bin]# rabbitmqctl list_queues #显示所有队列
Listing queues ...
...done.
[[email protected] bin]# rabbitmqctl list_vhosts #遍历所有虚拟主机信息
Listing vhosts ...
/
...done.
[[email protected] bin]# rabbitmqctl add_vhost vhostname #创建vhost
Creating vhost "vhostname" ...
...done.
[[email protected] bin]# rabbitmqctl list_vhosts #遍历所有虚拟主机信息
Listing vhosts ...
/
vhostname
...done.
[[email protected] bin]# rabbitmqctl add_user wsyht 123456 #添加用户及密码
Creating user "wsyht" ...
...done.
[[email protected] bin]# rabbitmqctl list_users #查看用户表
Listing users ...
guest [administrator]
wsyht []
...done.
[[email protected] bin]# rabbitmqctl set_user_tags wsyht administrator #给用户添加管理员权限
Setting tags for user "wsyht" to [administrator] ...
...done.
【WEB访问登陆】