Ubuntu 24에서 Nginx 설치 및 실행 방법
1. 패키지 목록 업데이트
최신 패키지 정보를 받아오기 위해 아래 명령어를 먼저 실행함.
sudo apt update
2. Nginx 설치
Nginx 웹 서버를 apt를 통해 설치함.
sudo apt install nginx -y
3. Nginx 상태 확인
서비스가 잘 설치되었는지 확인하려면 아래 명령어 사용.
sudo systemctl status nginx
4. Nginx 실행 및 부팅 시 자동 실행 설정
서비스를 수동으로 실행하고, 재부팅 시에도 자동으로 실행되도록 설정함.
sudo systemctl start nginx
sudo systemctl enable nginx
위 단계까지 완료하면 Nginx가 정상적으로 작동 중임.
한방 명령어
sudo apt update && sudo apt install nginx -y && sudo systemctl status nginx && sudo systemctl start nginx && sudo systemctl enable nginx
Was this helpful?
0 / 0