>  기사  >  백엔드 개발  >  우분투에서 nginx 컴파일 및 설치

우분투에서 nginx 컴파일 및 설치

WBOY
WBOY원래의
2016-08-08 09:31:23959검색

업데이트 소스: apt-get update
업그레이드 소프트웨어: apt-get 업그레이드
업데이트 시스템: apt-get dist-upgrade
apt-get install openssl
apt-get install libssl-dev
yum -y install openssl openssl-devel
groupadd www-data
useradd -g www-data www-data
위 말도 안되는 내용이 사용될 수 있습니다
zlib pcre openssl 다운로드
./configure - -prefix=/usr/local/tengine --user=www-data --group=www-data --with-zlib=/home/zlib-1.2.8 --with-pcre=/home/pcre-8.36 - -with-openssl=/home/openssl-1.0.1k
(여기서 zlib pcre 및 openssl은 다운로드한 파일의 압축이 풀린 경로입니다)
구성 요약
+ PCRE 라이브러리 사용: /home/ pcre-8.36
+ OpenSSL 라이브러리 사용: /home/openssl-1.0.1k
+ md5: OpenSSL 라이브러리 사용
+ sha1: OpenSSL 라이브러리 사용
+ zlib 라이브러리 사용: /home/zlib- 1.2.8
+ jemalloc 라이브러리가 비활성화되었습니다.
nginx 경로 접두사: "/usr/local/tengine"
nginx 바이너리 파일: "/usr/local/tengine/sbin/nginx"
nginx 구성 접두사: " /usr/local/tengine/conf"
nginx 구성 파일: "/usr/local/tengine/conf/nginx.conf"
nginx pid 파일: "/usr/local/tengine/logs/ nginx.pid "
nginx 오류 로그 파일: "/usr/local/tengine/logs/error.log"
nginx http 액세스 로그 파일: "/usr/local/tengine/logs/access.log"
nginx http 클라이언트 요청 본문 임시 파일: "client_body_temp"
nginx dso 모듈 경로: "/usr/local/tengine/modules/"
nginx http 프록시 임시 파일: "proxy_temp"
nginx http fastcgi 임시 파일: "fastcgi_temp"
nginx http uwsgi 임시 파일: "uwsgi_temp"
nginx http scgi 임시 파일: "scgi_temp"
nginx를 시작하려면 /usr/local/nginx/sbin/nginx 명령을 직접 실행하세요. . nginx가 시작되면 -s 매개변수로 nginx를 호출하여 제어할 수 있습니다. 사용되는 구문 형식은 다음과 같습니다:
nginx -s signal
여기서 signal은 다음 매개변수 중 하나일 수 있습니다.
* 빠른 종료 중지
* 정상 종료 종료
* reload 구성 파일 다시 로드
* 다시 열기 로그 파일 다시 열기
#/usr/local/nginx/sbin/nginx # nginx를 대체하도록 PATH 변수 수정
/etc/profile을 수정하고 마지막으로 줄 추가
export PATH=/ usr/ local/tengine/sbin:$PATH
//다시 시작
소스 /etc/profile
부팅 추가
echo "/usr/local/tengine/sbin/nginx" >>/ 기타 /rc.local

위 내용은 관련 내용을 포함하여 우분투에서 nginx를 컴파일하고 설치하는 방법을 소개하고 있으니 PHP 튜토리얼에 관심이 있는 친구들에게 도움이 되길 바랍니다.

성명:
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.