728x90
1. 사전 작업
Docker와 Docker compose를 미리 설치해야 한다. 설치 방법은 [이 글]에 있다.
openvidu는 포트를 많이 쓰기 때문에 아래 포트를 전부 열어야 한다.
openvidu의 http, https 포트로 80, 443 외에 다른 걸 쓰려면 그 포트도 연다. (밑의 명령어는 80, 443만 열려있다.)
# ufw 설치
sudo apt install ufw
# 포트 열기
ufw allow ssh
ufw allow 80/tcp
ufw allow 443/tcp
ufw allow 3478/tcp
ufw allow 3478/udp
ufw allow 40000:57000/tcp
ufw allow 40000:57000/udp
ufw allow 57001:65535/tcp
ufw allow 57001:65535/udp
ufw enable
2. OpenVidu on premise 설치
1) OpenVidu 설치
sudo su
cd /opt
curl <https://s3-eu-west-1.amazonaws.com/aws.openvidu.io/install_openvidu_latest.sh> | bash
2) OpenVidu 설정
openvidu configuration 파일을 수정해야한다. 다음 명령어로 .env파일을 vi모드로 연다.
cd openvidu
sudo vi .env
3) .env 파일
certificate_type을 letsencrypt로 설정했으므로 HTTP 포트를 다르게 설정해도 첫 실행에는 무조건 80포트로 진행된다. 따라서 첫 실행 후 openvidu를 멈췄다가 재시작한다.
나는 HTTP로 4444, HTTPS로 4443포트를 설정했다.
# OpenVidu configuration
# ----------------------
# Documentation: <https://docs.openvidu.io/en/stable/reference-docs/openvidu-config/>
# NOTE: This file doesn't need to quote assignment values, like most shells do.
# All values are stored as-is, even if they contain spaces, so don't quote them.
# Domain name. If you do not have one, the public IP of the machine.
# For example: 198.51.100.1, or openvidu.example.com
DOMAIN_OR_PUBLIC_IP=도메인주소
# OpenVidu SECRET used for apps to connect to OpenVidu server and users to access to OpenVidu Dashboard
OPENVIDU_SECRET=MY_SECRET
# Certificate type:
# - selfsigned: Self signed certificate. Not recommended for production use.
# Users will see an ERROR when connected to web page.
# - owncert: Valid certificate purchased in a Internet services company.
# Please put the certificates files inside folder ./owncert
# with names certificate.key and certificate.cert
# - letsencrypt: Generate a new certificate using letsencrypt. Please set the
# required contact email for Let's Encrypt in LETSENCRYPT_EMAIL
# variable.
CERTIFICATE_TYPE=letsencrypt
# If CERTIFICATE_TYPE=letsencrypt, you need to configure a valid email for notifications
LETSENCRYPT_EMAIL=이메일주소
# Proxy configuration
# If you want to change the ports on which openvidu listens, uncomment the following lines
# Allows any request to http://DOMAIN_OR_PUBLIC_IP:HTTP_PORT/ to be automatically
# redirected to https://DOMAIN_OR_PUBLIC_IP:HTTPS_PORT/.
# WARNING: the default port 80 cannot be changed during the first boot
# if you have chosen to deploy with the option CERTIFICATE_TYPE=letsencrypt
HTTP_PORT=4444
# Changes the port of all services exposed by OpenVidu.
# SDKs, REST clients and browsers will have to connect to this port
HTTPS_PORT=4443
# Old paths are considered now deprecated, but still supported by default.
# OpenVidu Server will log a WARN message every time a deprecated path is called, indicating
# the new path that should be used instead. You can set property SUPPORT_DEPRECATED_API=false
# to stop allowing the use of old paths.
# Default value is true
# SUPPORT_DEPRECATED_API=true
# If true request to with www will be redirected to non-www requests
# Default value is false
# REDIRECT_WWW=false
4) 실행
/opt/openvidu 위치에서 실행한다.
./openvidu start
3. OpenVidu 명령어
./openvidu start
./openvidu stop
./openvidu restart
./openvidu logs
./openvidu kms-logs
./openvidu version
./openvidu report
./openvidu help
참고 : https://docs.openvidu.io/en/2.22.0/deployment/ce/on-premises/
'기록 > CI&CD' 카테고리의 다른 글
[AWS] 같은 브랜치에 있는 프론트엔드, 백엔드 자동배포하기 (2) Docker, Docker Compose 설치 (0) | 2022.08.11 |
---|---|
[AWS] 같은 브랜치에 있는 프론트엔드, 백엔드 자동배포하기 (1) 초기설정 (0) | 2022.08.10 |
[AWS] ec2에 mysql 설치하기 (0) | 2022.08.08 |
CI(Continuous Integration) (0) | 2022.08.01 |
Docker + Jenkins + Vue (0) | 2022.06.18 |
댓글