Nginx 설치 - Ubuntu



 Nginx 공식 사이트 : https://nginx.org/

Nginx 공식 문서 : https://nginx.org/en/docs/

설치시 참고한 공식 문서 : https://nginx.org/en/linux_packages.html


1. apt 업데이트

$ sudo apt update





2. 필요 apt install

$ sudo apt install curl gnupg2 ca-certificates lsb-release ubuntu-keyring





3. 공식 nginx 서명 키를 다운

$ curl https://nginx.org/keys/nginx_signing.key | gpg --dearmor | sudo tee /usr/share/keyrings/nginx-archive-keyring.gpg >/dev/null





4. 공식 nginx 서명 키를 검증

$ gpg --dry-run --quiet --no-keyring --import --import-options import-show /usr/share/keyrings/nginx-archive-keyring.gpg





5. Nginx 패키지의 안정적 설치를 위하여 커멘드 실행

$ echo "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] https://nginx.org/packages/ubuntu `lsb_release -cs` nginx" | sudo tee /etc/apt/sources.list.d/nginx.list





6. Nginx 설치

$ sudo apt install nginx





7. Nginx 동작확인

$ sudo systemctl status nginx




8. Nginx 버전확인

$ nginx -v




nginx가 실행되는 웹사이트에 접속하면 위 사진과 같이 출력됩니다.


유용한 링크 : Nginx와 CertBot을 이용한 SSL 환경 구축



댓글

이 블로그의 인기 게시물

Lesson 12_1 프로퍼티 노드(Property Node)

DAQ로 전압 측정하기-2

Lesson 12_2 참조를 이용한 프로퍼티노드(Property Node)