|軟件|版本|
|-|-|
|RHEL |7 update3|
|Erlong|19.3|
|rabbitMQ|3.6.10|html
rabbitMQ是使用erlang這種編程語言開發的,因此安裝rabbitMQ的前提是安裝Erlong語言。此次全都是離線安裝,以便在遠離internet的生產環境部署。java
|編譯報錯|解決辦法|下載網址|
|-|-|-|
|crypto : No usable OpenSSL found |yum install openssl openssl-devel|rhel7.3光盤自帶,創建本地源|
|jinterface : No Java compiler found| rpm -ivh jdk-8u144-linux-x64.rpm|http://www.oracle.com/technet...
|odbc : ODBC library - link check failed| rpm -ivh unixODBC-2.3.1-11.el7.x86_64.rpm unixODBC-devel-2.3.1-11.el7.x86_64.rpm|ftp://195.220.108.108/linux/centos/7.3.1611/os/x86_64/Packages/unixODBC-2.3.1-11.el7.x86_64.rpm ftp://195.220.108.108/linux/centos/7.3.1611/os/x86_64/Packages/unixODBC-devel-2.3.1-11.el7.x86_64.rpm|
|ssh : No usable OpenSSL found|yum install openssl openssl-devel|rhel7.3光盤自帶,創建本地源|
|ssl : No usable OpenSSL found|yum install openssl openssl-devel|rhel7.3光盤自帶,創建本地源|node
編譯Erlong還須要安裝ncurses,也是rhel7.3光盤自帶。以及fop(生成文檔用),centos7光盤有,rhel7光盤中沒有。python
yum install fop yum install ncurses-devel ncurses yum install openssl openssl-devel rpm -ivh unixODBC-2.3.1-11.el7.x86_64.rpm unixODBC-devel-2.3.1-11.el7.x86_64.rpm rpm -ivh jdk-8u144-linux-x64.rpm
下載網址 http://erlang.org/download/
對應的版本自選,我選擇的是 19.3版本
即 http://erlang.org/download/ot...linux
cd /tmp wget http://erlang.org/download/otp_src_19.3.tar.gz tar -zxvf otp_src_19.3.tar.gz cd otp_src_19.3 ./configure -prefix=/usr/local/erlang make make install cd /usr/local/erlang cd bin ln -s /usr/local/erlang/bin/erl /usr/local/bin/erl
erl -v
下載連接
http://www.rabbitmq.com/relea...git
wget http://www.rabbitmq.com/releases/rabbitmq-server/v3.6.10/rabbitmq-server-generic-unix-3.6.10.tar.xz tar -Jxvf rabbitmq-server-generic-unix-3.6.10.tar.xz tar -xvf rabbitmq-server-generic-unix-3.6.10.tar cp -R rabbitmq_server-3.6.10/ /usr/local/rabbitmq/ chmod -R 755 /usr/local/rabbitmq/sbin
cd /usr/local/rabbitmq/sbin ./rabbitmq-server
cd /usr/local/rabbitmq/sbin ./rabbitmq-plugins enable rabbitmq_management
cd /usr/local/rabbitmq/sbin ./rabbitmqctl stop ## 停應用 ./rabbitmq-server ## 啓動應用
訪問http://localhost:15672
默認用戶/密碼 : guest/guest
注意初始狀態只能本地登陸,不可經過遠程web訪問,給權限也不行。須要遠程訪問的,必須新建用戶並賦權限。github
cd /usr/local/rabbitmq/sbin ./rabbitmqctl add_user mqadmin mqadmin
./rabbitmqctl set_user_tags mqadmin administrator
./rabbitmqctl set_permissions -p / mqadmin '.*' '.*' '.*'
在瀏覽器中輸入:http://ip:15672 如:http://192.168.137.200:15672/便可
輸入新添加的用戶名和密碼登陸web
|端口|說明|
|-|-|
|4369| epmd, a peer discovery service used by RabbitMQ nodes and CLI tools|
|5672, 5671| used by AMQP 0-9-1 and 1.0 clients without and with TLS|
|25672| used by Erlang distribution for inter-node and CLI tools communication and is allocated from a dynamic range (limited to a single port by default, computed as AMQP port + 20000). See networking guide for details.|
|15672| HTTP API clients and rabbitmqadmin (only if the management plugin is enabled)|
|61613, 61614| STOMP clients without and with TLS (only if the STOMP plugin is enabled)|
|1883, 8883| (MQTT clients without and with TLS, if the MQTT plugin is enabled|
|15674| STOMP-over-WebSockets clients (only if the Web STOMP plugin is enabled)|
|15675| MQTT-over-WebSockets clients (only if the Web MQTT plugin is enabled)|編程
基於anaconda環境,下載pika離線包
https://anaconda.org/conda-fo...ubuntu
cd /tmp wget https://anaconda.org/conda-forge/pika/0.10.0/download/linux-64/pika-0.10.0-py36_0.tar.bz2 conda install pika-0.10.0-py36_0.tar.bz2 conda list | grep pika ##檢查
綜上,一個基本的開源MQ環境搭建完成,最重要的是離線安裝脫離了internet的捆綁。
http://erlang.org/doc/install...
https://sites.google.com/site...
https://www.rabbitmq.com/netw...
https://github.com/linux-on-i...
https://gist.github.com/craig...
http://blog.csdn.net/amuseme_...