rabbitMQ学习笔记(一) ubuntu12.4 与Windows 下rabbitMQ的安装

一、Ubuntu12.4下安装方式

安装rabbitMQ之前需要先按抓功能ERLang 。

安装ERLang之前需要安装一下依赖项

sudo apt-get install build-essential   

sudo apt-get install libncurses5-dev   

sudo apt-get install libssl-dev 

如果无法安装可以换个源试试,我刚开始用的hk香港的源,安装了多次没有成功,后来换成163的了,就成功了。

/etc/apt/sources.list内容如下

deb http://mirrors.163.com/ubuntu/ precise main restricted
deb-src http://mirrors.163.com/ubuntu/ precise main restricted
deb http://mirrors.163.com/ubuntu/ precise-updates main restricted
deb-src http://mirrors.163.com/ubuntu/ precise-updates main restricted
deb http://mirrors.163.com/ubuntu/ precise universe
deb-src http://mirrors.163.com/ubuntu/ precise universe
deb http://mirrors.163.com/ubuntu/ precise-updates universe
deb-src http://mirrors.163.com/ubuntu/ precise-updates universe
deb http://mirrors.163.com/ubuntu/ precise multiverse
deb-src http://mirrors.163.com/ubuntu/ precise multiverse
deb http://mirrors.163.com/ubuntu/ precise-updates multiverse
deb-src http://mirrors.163.com/ubuntu/ precise-updates multiverse
deb http://mirrors.163.com/ubuntu/ precise-backports main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ precise-backports main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ precise-security main restricted
deb-src http://mirrors.163.com/ubuntu/ precise-security main restricted
deb http://mirrors.163.com/ubuntu/ precise-security universe
deb-src http://mirrors.163.com/ubuntu/ precise-security universe
deb http://mirrors.163.com/ubuntu/ precise-security multiverse
deb-src http://mirrors.163.com/ubuntu/ precise-security multiverse
deb http://extras.ubuntu.com/ubuntu precise main
deb-src http://extras.ubuntu.com/ubuntu precise main
deb http://www.rabbitmq.com/debian/ testing main



然后去ERLang官网下载源码进行安装 ,下载地址:http://www.erlang.org/download_release/19

下载后,解压 tar -zxvf otp_src_R16B01.tar.gz

然后进入目录 cd otp_src_R16B01

然后配置 ./configure --prefix /opt/erlang 

然后够make与make install


如果现在输入erl命令能进入erl界面,那么就表示安装成功了。


接下在安装rabbitMQ

使用apt-get的方式安装方便一些 ,不过要先加入源。

编辑 /etc/apt/sources.list 加入 deb http://www.rabbitmq.com/debian/ testing main

然后 sudo apt-get update

再然后 sudo apt-get install rabbitmq-server


如果在安装失败后再次安装,必须先移除软件包 sudo dpkg -r rabbitmq-server ,否则会一直安装不成功



二、Windows下安装方式

首先是到ERLang官网去下载ERlang  地址:http://www.erlang.org/download.html

然后安装ERLang。

然后设置ERLang的环境变量。

在环境变量中加入 ERL_HOME = erlang安装目录

在path中添加 %ERL_HOME%\bin


然后从http://www.rabbitmq.com/releases/rabbitmq-server/v3.1.5/rabbitmq-server-3.1.5.exe下载rabbitmq-server 并安装。

然后从 开始菜单中找到 rabbitmq-start 打开  

此刻rabbitmq-server就启动了






你可能感兴趣的:(rabbitMQ学习笔记(一) ubuntu12.4 与Windows 下rabbitMQ的安装)