centos安装RabbitMQ
系统:centos 5.5 (32位)
需要的软件包:
otp_src_R15B01.tar.gz
rabbitmq-server-2.8.5.tar.gz
simplejson-2.6.1.tar.gz
epel-release-5-4.noarch.rpm
jdk-7u3-linux-i586.rpm
1.准备工作
rpm -ivh http://download.slogra.com/epel-release-5-4.noarch.rpm
去jdk官网下载jdk 1.7
地址:http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1637583.html
rpm -ivh jdk-7u3-linux-i586.rpm
vi /etc/profile
在最下方加入:
保存退出后执行
source /etc/profile
vi /etc/profile
在最下方加入:
保存退出后执行
source /etc/profile
备份老的python版本,并使用新python版本的方法,可以去看我这篇文章centos下yum升级python.
2.安装erlang
wget http://www.erlang.org/download/otp_src_R15B01.tar.gz
tar zxf otp_src_R15B01.tar.gz && cd otp_src_R15B01
./configure
如果提示fop is missing,不用管直接make,后面安装RabbitMQ的时候,会自动安装的.
make
make install
3.安装simplejson
wget http://pypi.python.org/packages/source/s/simplejson/simplejson-2.6.1.tar.gz#md5=03fbb6c4a4d37a767af7848f902e2ad4
tar zxf simplejson-2.6.1.tar.gz && cd simplejson-2.6.1
python setup.py build
如果提示:
WARNING: The C extension could not be compiled, speedups are not enabled.
Plain-Python installation succeeded.
不用管直接执行:
python setup.py install
4.安装RabbitMQ Server
wget http://www.rabbitmq.com/releases/rabbitmq-server/v2.8.5/rabbitmq-server-2.8.5.tar.gz
tar zxf rabbitmq-server-2.8.5.tar.gz && cd rabbitmq-server-2.8.5
make
make install TARGET_DIR=/usr/local SBIN_DIR=/usr/local/sbin MAN_DIR=/usr/local/man
然后去/usr/local/sbin/目录,查看是否有下面文件
rabbitmqctl
rabbitmq-defaults
rabbitmq-env
rabbitmq-plugins
rabbitmq-server
5.启动RabbitMQ
/usr/local/sbin/rabbitmq-server start
或者后台运行
nohup /usr/local/sbin/rabbitmq-server start > /usr/local/sbin/nohup.out &
6.RabbitMQ常用命令
添加用户:
rabbitmqctl add_user username password
删除用户:
rabbitmqctl delete_user username
更改密码:
rabbimqctl change_password username newpassword
需要的软件包:
otp_src_R15B01.tar.gz
rabbitmq-server-2.8.5.tar.gz
simplejson-2.6.1.tar.gz
epel-release-5-4.noarch.rpm
jdk-7u3-linux-i586.rpm
1.准备工作
rpm -ivh http://download.slogra.com/epel-release-5-4.noarch.rpm
去jdk官网下载jdk 1.7
地址:http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1637583.html
rpm -ivh jdk-7u3-linux-i586.rpm
vi /etc/profile
在最下方加入:
export JAVA_HOME=/usr/java/jdk1.7.0_03 export JRE_HOME=/usr/java/jdk1.7.0_03/jre export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
保存退出后执行
source /etc/profile
yum install -y docbook-style-xsl xmlto git \ wxGTK wxGTK-devel expat expat-devel librabbitmq \ make gcc44 gcc44-c++ libstdc++44-devel hg libtool \ openssl openssl-devel unixODBC unixODBC-devel unixODBC-libs \ ncurses ncurses-devel tk python26
vi /etc/profile
在最下方加入:
export CC=/usr/bin/gcc44 or export CC=/usr/bin/gcc export CXX=/usr/bin/g++44
保存退出后执行
source /etc/profile
备份老的python版本,并使用新python版本的方法,可以去看我这篇文章centos下yum升级python.
2.安装erlang
wget http://www.erlang.org/download/otp_src_R15B01.tar.gz
tar zxf otp_src_R15B01.tar.gz && cd otp_src_R15B01
./configure
如果提示fop is missing,不用管直接make,后面安装RabbitMQ的时候,会自动安装的.
make
make install
3.安装simplejson
wget http://pypi.python.org/packages/source/s/simplejson/simplejson-2.6.1.tar.gz#md5=03fbb6c4a4d37a767af7848f902e2ad4
tar zxf simplejson-2.6.1.tar.gz && cd simplejson-2.6.1
python setup.py build
如果提示:
WARNING: The C extension could not be compiled, speedups are not enabled.
Plain-Python installation succeeded.
不用管直接执行:
python setup.py install
4.安装RabbitMQ Server
wget http://www.rabbitmq.com/releases/rabbitmq-server/v2.8.5/rabbitmq-server-2.8.5.tar.gz
tar zxf rabbitmq-server-2.8.5.tar.gz && cd rabbitmq-server-2.8.5
make
make install TARGET_DIR=/usr/local SBIN_DIR=/usr/local/sbin MAN_DIR=/usr/local/man
然后去/usr/local/sbin/目录,查看是否有下面文件
rabbitmqctl
rabbitmq-defaults
rabbitmq-env
rabbitmq-plugins
rabbitmq-server
5.启动RabbitMQ
/usr/local/sbin/rabbitmq-server start
或者后台运行
nohup /usr/local/sbin/rabbitmq-server start > /usr/local/sbin/nohup.out &
6.RabbitMQ常用命令
添加用户:
rabbitmqctl add_user username password
删除用户:
rabbitmqctl delete_user username
更改密码:
rabbimqctl change_password username newpassword
评论: