1. Install erlang
1.1 Preparation, first install dependent libraries
yum -y install make gcc gcc-c++ kernel-devel m4 ncurses-devel openssl-devel yum install ncurses-devel
1.2 Download erlang source code
wget http://www.erlang.org/download/otp_src_R16B02.tar.gz cp otp_src_R16B02.tar.gz /usr/src/otp_src_R16B02.tar.gz cd /usr/src tar -xzvf otp_src_R16B02.tar.gz mv otp_src_R16B02 erlang_R16B
1.3 Compile and install
cd erlang_R16B/ ./configure --prefix=/usr/local/erlang --with-ssl --enable-threads --enable-smp-support --enable-kernel-poll --enable-hipe --without-javac//不用java编译,故去掉java避免错误 make && make install //编译后安装
1.4 Configure environment variables
vi /etc/profile ERL_HOME=/usr/local/erlang export PATH=$PATH:$ERL_HOME/bin
2 Install rabbitmq
2.1 Download
wget http://www.rabbitmq.com/releases/rabbitmq-server/v3.1.5/rabbitmq-server-3.1.5.tar.gz cp rabbitmq-server-3.1.5.tar.gz /usr/src cd /usr/src tar -xzvf rabbitmq-server-3.1.5.tar.gz
2.2 Install dependent libraries
yum -y install xmlto
Otherwise, the compilation will fail:
/bin/sh: line 1: xmlto: command not found
2.3 Compilation
cd rabbitmq-server-3.1.5 make make install TARGET_DIR=/usr/local/rabbitmq SBIN_DIR=/usr/local/rabbitmq/sbin MAN_DIR=/usr/local/rabbitmq/man //将rabbitmq编译到/opt/mq/rabbitmq目录
2.4 Install web plug-in management interface
cd /usr/local/rabbitmq/sbin mkdir /etc/rabbitmq/ ./rabbitmq-plugins enable rabbitmq_management
View plugin list
./rabbitmq-plugins list
2.5 Common commands
Start rabbitmq
./rabbitmq-server -detached
Enter http://127.0.0.1:15672/ on the browser to log in to the management interface
Using the login name and password will be considered a guest by default
Close rabbitmq
./rabbitmqctl stop
The above is the detailed content of Steps to install Erlang and RabbitMQ on CentOS 6.4. For more information, please follow other related articles on the PHP Chinese website!