>  기사  >  운영 및 유지보수  >  nginx 설치 종속성 패키지

nginx 설치 종속성 패키지

王林
王林앞으로
2020-07-01 17:09:376336검색

nginx 설치 종속성 패키지

nginx 설치 종속성 패키지

(권장 학습: nginx 튜토리얼)

  • nginx 설치는 GCC, openssl-devel, pcre-devel 및 zlib-devel 소프트웨어 라이브러리에 따라 다릅니다.

  • Pcre 전체 이름(Perl 호환 정규 표현식), 중국어 Perl 호환 정규 표현식, pcre 공식 웹사이트.

yum install  pcre pcre-devel -y 
yum install openssl openssl-devel -y

컴파일 명령

tar -zxf nginx-1.10.1.tar.gz 
cd nginx-1.10.1/
./configure --prefix=/data/nginx-1.10.1 --user=nginx --group=nginx  --with-http_ssl_module  --with-http_stub_status_module

useradd nginx -M -s /sbin/nologin 
make && make install 
ln -s /data/nginx-1.10.1 /data/nginx

nginx 구성 파일이 정상인지 테스트하세요

/data/nginx/sbin/nginx -t 
nginx: the configuration file /data/nginx-1.10.1/conf/nginx.conf syntax is ok
nginx: configuration file /data/nginx-1.10.1/conf/nginx.conf test is successful

nginx 서버 시작

/data/nginx/sbin/nginx  -t  ##检查配置文件
/data/nginx/sbin/nginx      ##确定nginx服务
netstat -lntup |grep nginx      ## 检查进程是否正常
curl http://localhost           ## 确认结果

위 내용은 nginx 설치 종속성 패키지의 상세 내용입니다. 자세한 내용은 PHP 중국어 웹사이트의 기타 관련 기사를 참조하세요!

성명:
이 기사는 csdn.net에서 복제됩니다. 침해가 있는 경우 admin@php.cn으로 문의하시기 바랍니다. 삭제