이 문서는 CentOS 7에 Nginx 설치 가이드를 공유하기 위해 작성되었다.
목차
Nginx 설치 순서
1. Nginx 저장소 추가
# vim /etc/yum.repos.d/nginx.repo
2. 저장소에 아래 내용 추가
[nginx] name=nginx repo baseurl=http://nginx.org/packages/centos/7/$basearch/ gpgcheck=0 enabled=1
3. Nginx 설치
# yum install -y nginx
4. 방화벽 웹포트 허용
# firewall-cmd -permanent -zone=public -add-service=http # firewall-cmd -permanent -zone=public -add-service=https # firewall-cmd -reload
5. Nginx 서비스 등록
# systemctl start nginx # systemctl enable nginx
6. Nginx 정상 설치 확인
웹브라우저에서 http://설치한ip주소 입력시 아래와 같이 노출되면 정상적으로 설치된것