CentOS 에 Nginx 설치
설치 환경: Linux 서버 CentOS 7.3, Root 권한
1、Install the prerequisites:
sudo yum install yum-utils
2、To set up the yum repository, create the file named /etc/yum.repos.d/nginx.repo with the following contents:
(OS 버 전 교체 주의: $releasever, 예 를 들 어 centos 버 전이 7 이면 7 로 교체)
명령:
vim 로 nginx. repo 파일 편집 하기
vim /etc/yum.repos.d/nginx.repo
Nginx 의 yum 원본 설정:
다음 내용 을 nginx. repo 파일 에 붙 여 넣 습 니 다.
[nginx-stable]
name=nginx stable repo
baseurl=http://nginx.org/packages/centos/$releasever/$basearch/
gpgcheck=1
enabled=1
gpgkey=https://nginx.org/keys/nginx_signing.key
module_hotfixes=true
vim 명령 입력 :wq 저장 및 종료
3、To install nginx, run the following command:
sudo yum install nginx
중간 에 y 를 입력 하여 설치 확인
4、When prompted to accept the GPG key, verify that the fingerprint matches 573B FD6B 3D8F BC64 1079 A6AB ABF5 BD82 7BD9 BF62, and if so, accept it.
마지막 으로 fingerprint 를 출력 합 니 다. 위의 빨간색 부분 과 일치 하면 y 를 입력 하여 확인 합 니 다.
5 、 시작 | 정지 | 다시 시작 Nginx:
#
systemctl start nginx.service
#
systemctl stop nginx.service
#
systemctl restart nginx.service
6. Nginx 의 모든 설치 위치 보기:
rpm 는 Liux 의 rpm 패키지 관리 도구 입 니 다. - q 는 문의 모드 를 대표 하고 - l 은 목록 을 되 돌려 줍 니 다.
rpm -ql nginx
7. Nginx 프로필:
/etc/nginx/conf.d
/etc/nginx/conf.d/default.conf
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
다양한 언어의 JSONJSON은 Javascript 표기법을 사용하여 데이터 구조를 레이아웃하는 데이터 형식입니다. 그러나 Javascript가 코드에서 이러한 구조를 나타낼 수 있는 유일한 언어는 아닙니다. 저는 일반적으로 '객체'{}...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.