Seize the day

POST : Backend study

GCP 우분투 focal에 Nginx/Mongodb/Deno 다시 설치하기

https://dajkim76.tistory.com/532 의 과정을 다시한다. 

MongoDB 5.0.x 설치

Mongodb 5.0이 우분투 하위버전에서 설치가 되지 않아서 GCP에 디스크를 추가하고 상위버전 우분투 이미지를 사용했다.
Mongodb 5.0.2 설치는 간단히 완료됬다. 
Install MongoDB Community Edition on Ubuntu — MongoDB Manual

kimdaejeong@base-backend-1:~$ history
    1  wget -qO - https://www.mongodb.org/static/pgp/server-5.0.asc | sudo apt-key add -
    2  echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-5.0.list
    3  sudo apt-get update
    4  sudo apt-get install -y mongodb-org
    5  ps --no-headers -o comm 1
    6  sudo systemctl start mongod
    7  mongo

 

Nginx 설치하기 

    9  sudo apt-get install nginx
   10  nginx -V
   11  sudo service nginx start

nginx version: nginx/1.18.0 (Ubuntu) 

Nginx에 SSL 적용하기

   20  sudo apt-get install certbot
   21  cat /etc/nginx/sites-enabled/default
   22  sudo certbot certonly --webroot -w /var/www/html -d app.mdiwebma.com
   23  sudo ls -al /etc/letsencrypt/live/app.mdiwebma.com
   24  sudo vi  /etc/nginx/sites-enabled/default
   25  sudo service nginx restart

Deno 설치

   14  sudo apt-get install unzip -y
   15  curl -fsSL https://deno.land/x/install/install.sh | sh
   16  vi .bashrc
   17  . .bashrc
   18  deno

 

서버 동작 테스트

   28  mkdir server
   29  cd server
   30  vi server.ts
   31  deno run --inspect  --allow-net --unstable server.ts &

https://app.mdiwebma.com/lt/v1/tslist 로 연결 확인 

이 모든 과정을 삽질없이 완료했다. 이전 영구 디스크 이미지는 이제 지워도 될 것 같다. 

top

posted at

2021. 8. 5. 22:10


CONTENTS

Seize the day
BLOG main image
김대정의 앱 개발 노트와 사는 이야기
RSS 2.0Tattertools
공지
아카이브
최근 글 최근 댓글
카테고리 태그 구름사이트 링크