• 돌아가기
  • 아래로
  • 위로
  • 목록
  • 댓글
Ubuntu

Ubuntu 22.04 LTS에 Nginx 최신버전 설치하기.

달소 달소 1681

3

2

04/29 기준 nginx repo도 업뎃됐습니다~

안녕하세요. 달소입니다.

이번글은 앞서 설치한 Ubuntu 22.04 LTS버전에 Nginx 최신버전을 설치하는 방법입니다.

기본적으로 Ubuntu의 기본 레포지터리는 매우 보수적이기때문에 안정적인 Stable 버전의 패키지만 지원해주는데요.

Nginx는.. 해도해도 너무한 1.18버전입니다 ㅠㅠ

그래서 우분투의 레포에 Nginx 의 mainline/stable 버전의 레포를 등록해주고 nginx를 설치해주시면됩니다.

22/04/04 기준 현재 Mainline은 1.21.6 Stable은 1.20.2 버전입니다.

저는 메인라인으로 설치해보겠습니다만 Stable버전을 하실분들은 레포주소만 바꿔주시면됩니다.

필요 패키지 설치하기

패키지 설치이전에 apt update && apt -y upgrade로 최신상태에서 시작해 주시는게 좋습니다.

그리고 아래 패키지들을 설치해주세요.

sudo apt install curl gnupg2 ca-certificates lsb-release

nginx repository 등록 (mainline / stable)

이제 nginx mainline의 레포지토리를 등록하겠습니다. 혹시 stable 버전설치를 원하면 두번째 줄에있는 명령어를 사용하면 됩니다.

echo "deb http://nginx.org/packages/mainline/ubuntu `lsb_release -cs` nginx" \
| sudo tee /etc/apt/sources.list.d/nginx.list
echo "deb http://nginx.org/packages/ubuntu `lsb_release -cs` nginx" \
| sudo tee /etc/apt/sources.list.d/nginx.list

그리고 공식 서명키를 받아와서 apt가 패키지의 진위여부를 확인할 수 있도록 합니다.

현재 ubuntu22가 정식패키지가 아니라서 아직 업데이트가 안된듯하네요.

++ 04/29기준으로 업뎃됐습니다.

curl -fsSL https://nginx.org/keys/nginx_signing.key | sudo apt-key add -

다시 apt update로 패키지를 최신목록화 시켜주고

이제 apt list nginx로 버전을 확인해보면 메인라인 버전을 확인할 수 있습니다.

apt install nginx로 설치를 진행합니다.

설치가 완료되면

systemctl enable nginx 로 부팅시 자동으로 실행되도록 해주고
service nginx start 명령어로 nginx 서비스를 시작해주세요.

그리고 ip로 접근해보면 아래처럼 nginx가 잘뜨는걸 확인하실 수 있습니다.

신고공유스크랩
2
3명이 추천

댓글 쓰기 권한이 없습니다. 로그인

취소 댓글 등록

cmt alert

신고

"님의 댓글"

이 댓글을 신고하시겠습니까?

댓글 삭제

"님의 댓글"

삭제하시겠습니까?


목록

공유

facebooktwitterpinterestbandkakao story

본 게시판은 서버구축 게시판과 통합되었습니다.

서버구축 게시판 이동하기
분류 제목 글쓴이 날짜 조회 추천
공지 서버OS(ESXi/Linux/Router 등) 게시판 이용안내. 달소 21.11.16.17:43 591 +1
ESXi 공지 ESXi 관련 추천글 모음 5 달소 21.04.23.12:19 3784 +6
ESXi USB LAN으로 ESXi8 설치하기.(Feat. Realtek LAN) 15 달소 23.01.01.18:51 2211 +2
Assistant OS 당신이 알아야할 새로운 스탠다드 Matter란 무엇인가 5 DarkAcid 22.12.30.02:38 747 +1
Proxmox 인텔 igpu는 gvt-g를 이용해 두개 이상의 가상머신에 패스스루 해줄 수 있네요. 13 니즛 22.12.23.02:19 1399 +1
Ubuntu
image
달소 22.08.01.22:56 8322 +4
Ubuntu
image
달소 22.04.01.17:29 5505 +5
Ubuntu
image
달소 22.04.01.15:34 5074 +3
Ubuntu
image
달소 22.04.04.17:28 4822 +3
Ubuntu
image
달소 22.04.22.11:46 2321 +3
Ubuntu
image
달소 22.09.05.17:26 2073 0
Ubuntu
image
레노 22.10.01.09:43 1752 +2
Ubuntu
image
달소 22.05.03.14:51 1681 +3
Ubuntu
image
달소 22.05.03.09:26 1655 0
Ubuntu
image
달소 21.02.26.15:02 1579 0
Ubuntu
image
달소 22.05.03.15:15 1238 +4
Ubuntu
image
달소 22.08.01.22:29 1099 0
Ubuntu
image
달소 22.03.30.21:30 1037 +1
Ubuntu
image
달소 22.05.12.12:00 926 +1
Ubuntu
image
달소 21.12.07.23:47 856 +1
Ubuntu
image
달소 22.04.01.14:58 852 +1
Ubuntu
image
달소 22.05.19.13:27 838 +2
Ubuntu
image
달소 21.03.22.23:48 760 0
Ubuntu
image
달소 21.04.22.11:37 741 0
Ubuntu
image
달소 22.08.21.15:03 670 0
Ubuntu
image
달소 22.12.16.11:00 642 0
Ubuntu
image
달소 21.03.22.22:59 620 +1
Ubuntu
image
달소 21.04.15.04:56 614 +2
Ubuntu
image
달소 22.04.28.18:44 613 +1
Ubuntu
normal
syaro 22.03.19.18:15 605 +1
Ubuntu
image
달소 21.03.26.16:55 595 +1
Ubuntu
image
달소 22.06.25.20:23 512 +2
Ubuntu
image
고양이 22.07.09.23:24 489 +3
Ubuntu
image
달소 21.01.19.14:53 392 0
Ubuntu
image
달소 21.03.19.23:31 377 0
Ubuntu
image
달소 21.04.22.17:11 332 +1
Ubuntu
image
달소 21.01.06.20:51 311 0
Ubuntu
image
달소 21.04.28.18:00 295 0
Ubuntu
image
달소 21.01.15.18:45 295 0
Ubuntu
image
달소 22.04.28.18:19 288 0
Ubuntu
image
달소 21.05.11.11:22 285 0
Ubuntu
image
달소 21.03.17.16:50 281 +1
Ubuntu
image
광기의초심자 21.11.20.22:27 271 +1
Ubuntu
image
달소 21.01.15.23:25 257 +1
Ubuntu
image
달소 21.04.22.14:28 242 0
Ubuntu
image
나스초보 22.06.14.17:20 221 0
Ubuntu
image
달소 21.01.06.15:18 218 +1
Ubuntu
image
달소 21.03.17.18:31 216 0
Ubuntu
image
달소 21.04.15.15:09 215 0
Ubuntu
image
달소 21.01.12.11:51 215 0
Ubuntu
image
달소 21.07.15.18:26 212 0
Ubuntu
image
달소 21.01.25.14:19 209 0
Ubuntu
image
달소 22.04.22.11:12 203 +3
Ubuntu
normal
만곰이 22.11.17.13:20 184 0
Ubuntu
image
달소 21.10.09.21:29 177 +1
Ubuntu
image
달소 21.01.11.18:21 161 +1
Ubuntu
image
달소 21.07.10.21:14 158 0
Ubuntu
image
달소 21.08.05.12:10 155 0
Ubuntu
image
달소 20.12.31.12:29 154 0
Ubuntu
image
달소 21.07.10.13:21 144 +1
Ubuntu
image
달소 21.03.19.18:34 144 0
Ubuntu
image
달소 21.01.07.16:13 138 0
Ubuntu
image
달소 21.01.19.22:52 130 +1
Ubuntu
normal
섭리 22.06.01.19:30 116 0
Ubuntu
image
달소 20.12.31.12:30 98 0
Ubuntu
normal
서버융 22.04.19.16:57 92 +1
Ubuntu
image
달소 22.04.01.11:35 84 +1
Ubuntu
image
달소 21.03.19.23:52 38 0