CentOS 6.5 컴 파일 설치 Nginx 와 OpenSsl
Nginx 컴 파일 설치:
1. OpenSsl 다운로드
[root@Node1 ~] # wget http://www.openssl.org/source/openssl-1.0.2.tar.gz 2. nginx 다운로드
[root@Node1 ~] # wget http://nginx.org/download/nginx-1.6.2.tar.gz 3. 압축 해제 소프트웨어
[root@Node1 ~] # tar zxf openssl-1.0.2.tar.gz [root@Node1 ~] # tar zxf nginx-1.6.2.tar.gz 4. Nginx 컴 파일
[root@Node1 ~] # cd nginx-1.6.2
[root@Node1 nginx-1.6.2] # ./configure --user=www --group=www --prefix=/data/nginx1.6.2
--with-http_stub_status_module --with-http_gzip_static_module --with-http_ssl_module
--with-openssl=/root/openssl-1.0.2
메모: nginx 를 컴 파일 하여 ssl 지원 을 추가 합 니 다. 컴 파일 이 필요 한 openssl 은 opensll 을 컴 파일 할 필요 가 없습니다. -- with - openssl = DIR DIR 는 openssl 의 소스 경로 입 니 다. openssl 의 설치 경로 가 아 닙 니 다. 그렇지 않 으 면 make 에서 오류 가 발생 합 니 다.make [1]: Entering directory ` /root/nginx-1 .6.2' cd /server/openssl \ && make clean \ && . /config --prefix= /server/openssl/openssl no-shared no-threads \ && make \ && make install make [2]: Entering directory ` /server/openssl ' make [2]: *** No rule to make target `clean'. Stop. make [2]: Leaving directory ` /server/openssl ' make [1]: *** [ /server/openssl/openssl/include/openssl/ssl .h] Error 2 make [1]: Leaving directory ` /root/nginx-0 .7.61' make : *** [build] Error 2
하면, 만약, 만약.... /configure : error: the HTTP rewrite module requires the PCRE library. You can either disable the module by using --without-http_rewrite_module option, or install the PCRE library into the system, or build the PCRE library statically from the source with nginx by using --with-pcre= option.
pcre & 가 설치 되 어 있 지 않다 는 뜻 입 니 다. pcre - devel 패키지, 여기 yum 설치
[root@Node1 nginx-1.6.2] # yum -y install pcre pcre-devel
5. Nginx 설치[root@Node1 nginx-1.6.2] # make
[root@Node1 nginx-1.6.2] # make install
6. 시작 하기 전에 nginx 검사
[root@Node1 nginx-1.6.2] # /data/nginx1.6.2/sbin/nginx -t nginx: the configuration file /data/nginx1 .6.2 /conf/nginx .conf syntax is ok nginx: [emerg] getpwnam( "www" ) failed nginx: configuration file /data/nginx1 .6.2 /conf/nginx .conf test failed
사용자 가 실행 되 지 않 았 는 지 확인 하고 ww 계 정 이 추가 되 었 습 니 다.[root@Node1 nginx-1.6.2] # groupadd www [root@Node1 nginx-1.6.2] # useradd -g www -s /sbin/nologin -d /dev/null www
7. 재검사
[root@Node1 nginx-1.6.2]# /data/nginx1.6.2/sbin/nginx -t nginx: the configuration file /data/nginx1.6.2/conf/nginx.conf syntax is ok nginx: configuration file /data/nginx1.6.2/conf/nginx.conf test is successful
8. Nginx 시작
[root@Node1 nginx-1.6.2] # /data/nginx1.6.2/sbin/nginx
9. 포트 검사
[root@Node1 nginx-1.6.2] # netstat -ntlup |grep :80 tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN
19849 /nginx
10. 프로 세 스 검사[root@Node1 nginx-1.6.2] # ps aux |grep nginx root 19849 0.0 0.0 22664 852 ? Ss 11:19 0:00 nginx: master process
/data/nginx1 .6.2 /sbin/nginx www 19850 0.0 0.1 23100 1448 ? S 11:19 0:00 nginx: worker process root 19858 0.0 0.0 103244 856 pts /0 S+ 11:21 0:00 grep nginx
11. 사이트 방문
다음으로 이동:http://www.centoscn.com/nginx/2015/0304/4782.html
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
바이너리 파일cat 또는tail, 터미널 디코딩 시 처리 방법cat으로 바이너리 파일을 보려고 할 때 코드가 엉망이 되어 식은땀이 났다. 웹에서 스크롤된 정보의 처리 방법과alias의 설정을 요약합니다. reset 명령을 사용하여 터미널을 재설정합니다.이렇게 하면 고치지 못하...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.