-
[nginx] CentOS 7 설치오픈소스/nginx 2021. 5. 18. 13:32
1. add yum nginx repository
yum 저장소에는 nginx가 없기 때문에 외부 저장소를 추가
$ cd /etc/yum.repos.d $ vi nginx.repo
/etc/yum.repos.d/ 경로에 nginx.repo 파일을 추가하고 아래와 같이 작성
[nginx] name=nginx_repo baseurl=http://nginx.org/packages/centos/7/$basearch/ gpgcheck=0 enabled=1
2. yum install
yum install 명령어를 이용해서 설치
$ yum install -y nginx
3. open firewall
$ firewall-cmd --permanent --zone=public --add-port=8080/tcp success $ firewall-cmd --reload success $ firewall-cmd --list-ports 8080/tcp
4. setup nginx port
$ vi /etc/nginx/conf.d/default.conf
5. start nginx daemon
$ systemctl start nginx $ systemctl enable nginx
'오픈소스 > nginx' 카테고리의 다른 글
[nginx] Permission denied while reading upstream 이슈 해결 (0) 2021.06.01 [nginx] upstream timed out while reading 이슈 해결 (1) 2021.06.01