Note: The following content is installed in centos. Depending on the actual environment, there will be a lack of dependencies. I encountered a lack of xmlo during the installation process. If there is a problem, Google it, install the dependency and then install rabbitmq.
Source: http://blog.chenlb.com/2010/04/install-rabbitmq-on-linux.html
Rabbitmq is written in the Erlang language, so Erlang must be installed.
To install Erlang, you must install Python and simplejson. I have installed Python 2.6.4 in the environment and simplejson only requires easy_install.
Easy_install simplejson
On the http://www.erlang.org/download.html download, I downloaded otp_src_r13b04.tar.gz.
- Wget http://www.erlang.org/download/otp_src_R13B04.tar.gz
- Tar-zxf otp_src_r13b04.tar.gz
- CD otp_src_r13b04
- ./Configure
- Make
- Sudo make install
It is best not to use -- prefix to specify the Erlang installation directory. By default, it is installed in/usr/local, which is inconvenient if rabbitmq is installed.
Download rabbitmq source code http://www.rabbitmq.com/server.html, I download the license rabbitmq-server-1.7.2.tar.gz.
- Wget http://www.rabbitmq.com/releases/rabbitmq-server/v1.7.2/rabbitmq-server-1.7.2.tar.gz
- Tar-zxf rabbitmq-server-1.7.2.tar.gz
- CD rabbitmq-server-1.7.2
- Make target_dir =/home/chenlb/rabbitmq sbin_dir =/home/chenlb/rabbitmq/sbin man_dir =/home/chenlb/rabbitmq/man install
Installation of Erlang is still smooth (if there is not smooth, you can look at the http://hi.baidu.com/%CD%BE%D6%D0%B5%C4%BE%B5%D7%D3/blog/item/3797be2b5eb479325243c1d8.html), the installation of rabbitmq is not smooth.
At first, Erlang was installed in/home/chenlb/Erlang, and rabbitmq cannot be installed as make.
Later, rabbitmq was installed.
Mkdir-P
Mkdir: Too few arguments
Try 'mkdir -- help' for more information.
Make: *** [install_dirs] Error 1
After a long time, there was no answer. The above installation Link said: rabbitmq was relatively smooth, but there was an important prompt that some parameters were added during make.
Then, let's take a look at the mkdir-related operations of makefile. The target_dir, sbin_dir, and man_dir parameters are required.
Parameters are added to make, but they are not added to make install ...... I am not familiar with makefile in Linux.
Later, make target_dir =/home/chenlb/rabbitmq sbin_dir =/home/chenlb/rabbitmq/sbin man_dir =/home/chenlb/rabbitmq/man install.
For more information about rabbitmq, click here.