본문 바로가기
MessageQueue/RabbitMQ

RabbitMQ 설치 (Centos 6/7)

by 아이티.파머 2019. 3. 31.
반응형

2019/03/31 - [MessageQueue/RabbitMQ] - Rabbit MQ

2019/03/31 - [MessageQueue/RabbitMQ] - RabbitMQ 설치 (Centos 6/7)

2021/01/19 - [MessageQueue/RabbitMQ] - Rabbit MQ 사용자 추가 명령어

2021/01/19 - [MessageQueue/RabbitMQ] - Rabbit MQ WebConsole

 

Rabbit MQ 설치 

1. Erlang 을 설치 
1.1 Epel 저장소 설치. 

> sudo yum install epel-release 

# 경로 다운로드 수동 설치  
> yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7-11.noarch.rpm  


1.2 erlang 설치  

# 기존에 사용중인 erlang pacakge는 삭제  
> yum list installed | grep erlang  
> yum remove erlang-erts-R16B-03.17.el7.x86_64 

# 다운로드 및 저장소 추가  
> sudo wget https://packages.erlang-solutions.com/erlang-solutions-1.0-1.noarch.rpm 
> sudo rpm -Uvh erlang-solutions-1.0-1.noarch.rpm 
   => /etc/yum.repo.d/erlang.....repo  > 자동으로 생성  


#추가 : 저장소 수동 추가 방법  
> sudo vim /etc/yum.repos.d/erlang_solutions.repo 
======================================================== 
[erlang-solutions] 
name=Centos $releasever - $basearch - Erlang Solutions 
baseurl=http://packages.erlang-solutions.com/rpm/centos/$releasever/$basearch 
gpgcheck=0 
gpgkey=http://packages.erlang-solutions.com/debian/erlang_solutions.asc 
enabled=1 
======================================================== 



> sudo yum install erlang 
> sudo erl -version 

2. yum 저장소 사용을 위해 레파지토리 추가  

2.1 레파지토리 파일 생성  [centos 7] 
> vim /etc/yum.repos.d/rabbitmq.repo    

[bintray-rabbitmq-server] 
name=bintray-rabbitmq-rpm 
baseurl=https://dl.bintray.com/rabbitmq/rpm/rabbitmq-server/v3.7.x/el/7/ 
gpgcheck=0 
repo_gpgcheck=0 
enabled=1 

2.1 rpm 사인키 추가 (키생성) 
# import the new PackageCloud key that will be used starting December 1st, 2018 (GMT) 
> sudo rpm --import https://packagecloud.io/rabbitmq/rabbitmq-server/gpgkey 


3. RabbitMQ 설치  
3.1 Yum 설치  

> yum install rabbitmq-server 

3.2 수동 파일 다운로드 및 설치  
> wget https://github.com/rabbitmq/rabbitmq-server/releases/download/v3.7.9/rabbitmq-server-3.7.9-1.el7.noarch.rpm 
> rpm --import https://github.com/rabbitmq/signing-keys/releases/download/2.0/rabbitmq-release-signing-key.asc 
> yum install rabbitmq-server-3.7.9-1.el7.noarch.rpm 



5. 시스템 자동 시작 설정  (명령어)
5.1 시스템 구동시 자동 실행  
> chkconfig rabbitmq-server on 


5.2 시스템 시작/종료  
   # CENT OS 6 이하 명령어  
      > /sbin/service rabbitmq-server start 
      > /sbin/service rabbitmq-server stop 

 

   # CENT OS 7 명령어  
     > sudo systemctl status rabbitmq-server   [start/stop] 


웹콘솔 활성화  
   > sudo rabbitmq-plugins enable rabbitmq_management 

상태 및 버전 확인  
   > sudo rabbitmqctl status 

참고  
※ hosts 명이 다른 경우 시작시 Time out error 발생  
> sudo vim /etc/hosts   

   -----------------------------------
   127.0.0.1 {컴퓨터 NAME} 

   ------------------------------------

반응형

'MessageQueue > RabbitMQ' 카테고리의 다른 글

Rabbit MQ WebConsole  (0) 2021.01.19
Rabbit MQ 사용자 추가 명령어  (0) 2021.01.19
Rabbit MQ  (0) 2019.03.31