KKIM의 ft_server 학습일지 - 1.1 Working Env - Install Nginx

Logo (merry christmas lol)


Nginx 설치하기 Install Nginx

Last time, we downloaded docker.

Now, we'll download Debian Buster!

Open your terminal, input this command.

지난 시간에 저희는 도커를 다운받았었습니다.

이젠 데미안 부스터를 설치할 시간이네요!

터미널을 여시고, 밑의 명령어를 입력하세요.

docker pull debian:buster

Complete? Input next command to check.

완료되셨나요? 이 명령어를 입력하여 확인하세요!

docker images

Do you see [debian     buster    ...] like Pic 0? then your success!

밑 사진의 [debian     buster    ...]가 보이시나요? 그렇게 나오셨다면 성공!

Pic 0 - Install Nginx 0

Input this command to run debian buster.

이 명령어를 입력하여 데비안 부스터를 실행시키세요!

docker run -it --name con_debian -p 80:80 -p 443:443 debian:buster

If your terminal shows like this, PERFECT! (press exit to end! press attach to reconnect!)

이렇게 나오셨다면 완벽해요! (종료하려면 exit 입력! 재접속하려면 attach!)

Pic 1 - Install Nginx 1

NOW IS THE MAIN. input next commands to install nginx.

지금이 메인이에요. 다음 명령어를 입력해서 nginx 설치!!

apt-get -y install nginx curl

if you got error like Pic 3? lets update apt-get. Input next commands!

만약 Pic 3처럼 에러가 발생한다면? apt-get을 업데이트 해보자구요. 밑의 명령어 순서대로 입력!

apt-get update
apt-get upgrade

Pic 3 - Install Nginx 2


Nginx 서버 구동 Run Nginx Server

Start nginx server. input next commands!

nginx 서버를 시작하세요. 아래 명령어 입력!

service nginx start
service nginx status

Pic 4 - Run nginx server 0

Connect next site to check your server. ISN'T IT LOVELY? (both okay)

아래 사이트에 접속하여 서버를 체크하세요.. 사랑스럽지 않나요? (둘 다 okay)

localhost
localhost:80

Pic 5 - Run nginx server 1

Input next commands to check this on your terminal.

아래 명령어를 입력하여 터미널로 실행시켜 보세요.

curl localhost
curl localhost:80

Pic 6 - Run ngnix server 2

If you want to stop nginx server, put this.

nginx 서버를 멈추려면 이걸 입력하세요.

service nginx stop

Reference

 

[ft_server] 총 정리 : 도커 설치부터 워드프레스 구축까지

과제 시작부터 마무리까지 기록한 내용들.

velog.io