In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly explains "how to build rabbitMQ single node in linux environment". The content of the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "how to build rabbitMQ single node in linux environment".
Linux environment CentOS-6.5-x86_64
Erlang version of otp_src_20.0.tar.gz
Wget http://erlang.org/download/otp_src_20.0.tar.gz
RabbitMQ version of rabbitmq-server-generic-unix-3.6.15.tar.xz
Https://www.rabbitmq.com/releases/rabbitmq-server/v3.6.15/
Start building.
Modify hosts first to name the host name. 192.168.220.129 is an IP of my virtual machine.
# vi / etc/hosts
192.168.220.129 rabbitmq
# cd / usr/local/src (upload otp_src_20.0.tar.gz and rabbitmq-server-generic-unix-3.6.15.tar to this directory)
# tar xvf otp_src_20.0.tar.gz (since rabbitmq is developed in the erlang language, install the erlang environment first)
# cd otp_src_20.0
#. / configure-prefix=/usr/local/erlang-with-ssl-enable-threads-enable-smp-support-enable-kernel-poll-enable-hipe-without-javac
After execution, ncurses-devel.x86_64 is also required if the red box shown in the following figure appears
Will report a small mistake: Makefile:248: / usr/local/otp_src_20.0/make/x86_64-unknown-linux-gnu/otp_ded.mk: No such file or directory error: No curses library functions found
# yum install ncurses-devel.x86_64
#. / configure-prefix=/usr/local/erlang-with-ssl-enable-threads-enable-smp-support-enable-kernel-poll-enable-hipe-without-javac
Continue to execute, and the following message appears, indicating that it is normal
# make & & make install
After installation, configure the environment variables for erlang
# vi / etc/profile
Save exit after adding
# source / etc/profile
Use source to make the file effective immediately
# erl
The erlang environment is OK, followed by the installation of rabbitMQ
# cd / usr/local/src
# tar xvf rabbitmq-server-generic-unix-3.6.15.tar
[root@rabbitmq src] # mv rabbitmq_server-3.6.15/.. / rabbitmq
# vi / etc/profile
Configure the rabbitMQ environment variable as shown above and execute source / etc/profile
# source / etc/profile
# rabbitmq-server-detached
Execute rabbitmq-server-detached to start the background daemon, otherwise rabbitmq exits after shell exits.
# rabbitmqctl status
Check whether the rabitmq status is started, if the following error is thrown
Status of node rabbit@rabbitmq
Error: unable to connect to node rabbit@rabbitmq: nodedown
DIAGNOSTICS
=
Attempted to contact: [rabbit@rabbitmq]
Rabbit@rabbitmq:
* connected to epmd (port 4369) on rabbitmq
* epmd reports: node 'rabbit' not running at all
No other nodes on rabbitmq
* suggestion: start the node
Current node details:
-node name: 'rabbitmq-cli-31@rabbitmq'
-home dir: / root
-cookie hash: JTCyebhk7sHDdUd5ICe4kg==
Execute rabbitmq-service stop to stop the service first.
# rabbitmq-server stop
If the following command is thrown after the stop command is executed, it probably means that erlang also depends on openssl
BOOT FAILED
=
Error description:
{error, {missing_dependencies, [crypto,ssl]
[cowboy,cowlib,rabbitmq_management
Rabbitmq_management_agent
Rabbitmq_trust_store]}}
Log files (may contain more information):
/ usr/local/rabbitmq/var/log/rabbitmq/rabbit@rabbitmq.log
/ usr/local/rabbitmq/var/log/rabbitmq/rabbit@rabbitmq-sasl.log
Stack trace:
[{rabbit_plugins,ensure_dependencies,1
[{file, "src/rabbit_plugins.erl"}, {line,185}]}
{rabbit_plugins,prepare_plugins,1
[{file, "src/rabbit_plugins.erl"}, {line,203}]}
{rabbit,broker_start,0, [{file, "src/rabbit.erl"}, {line,300}]}
{rabbit,start_it,1, [{file, "src/rabbit.erl"}, {line,424}]}
{init,start_em,1, []}
{init,do_boot,3, []}]
{"init terminating in do_boot", {error, {missing_dependencies, [crypto,ssl], [cowboy,cowlib,rabbitmq_management,rabbitmq_management_agent,rabbitmq_trust_store]}}
Init terminating in do_boot ({error, {missing_dependencies, [crypto,ssl], [cowboy,cowlib,rabbitmq_management,rabbitmq_management_agent,rabbitmq_trust_store]}})
Crash dump is being written to: erl_crash.dump...done
Go to the / usr/local/src directory to download openssl
# cd / usr/local/src
# wget http://www.openssl.org/source/openssl-1.0.1s.tar.gz
# tar-zvxf openssl-1.0.1s.tar.gz
# cd openssl-1.0.1s
#. / config-prefix=/usr/local/openssl
# vi Makefile
Use / search CFLAG to add as shown in the following figure, which is actually adding-fPIC
# make & & make install
After the installation is complete, you also need to reinstall erlang. There is a change in the way that openssl specifies the installation path and goes back to the otp_src_20.0 installation package.
# cd / usr/local/src/otp_src_20.0
#. / configure-prefix=/usr/local/erlang-with-ssl=/usr/local/openssl-enable-threads-enable-smp-support-enable-kernel-poll-enable-hipe-without-javac
# make & & make install
After the installation is complete, restart rabbitmq
# rabbitmq-server-detached
# ps-ef | grep rabbitmq
# rabbitmqctl status
The rabbitmq service has been built, and then the rabbitmq web service is opened. When you see started 6 plugins, it indicates that the service has been started successfully.
# rabbitmq-plugins enable rabbitmq_management
The rest is to turn on the firewall.
# vi / etc/sysconfig/iptables
-An INPUT-m state-- state NEW-m tcp-p tcp-- dport 5672-j ACCEPT
-An INPUT-m state-- state NEW-m tcp-p tcp-- dport 15672-j ACCEPT
# service iptables restart
Open the browser and enter your IP:15672 to access it.
Thank you for reading, the above is the content of "how to build rabbitMQ single node in linux environment". After the study of this article, I believe you have a deeper understanding of how to build rabbitMQ single node in linux environment. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.