[오픈소스컨설팅]Nginx 1.2.7 설치가이드__v1

1,911 views

Published on

This is a guide document for installation NginX on Linux platform

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,911
On SlideShare
0
From Embeds
0
Number of Embeds
5
Actions
Shares
0
Downloads
27
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

[오픈소스컨설팅]Nginx 1.2.7 설치가이드__v1

  1. 1. Confidential[Megabox]Tomcat_설정보고서.docxLast printed on 4/2/2013 10:16:00 AMNginx 1.2.7 설치 가이드 문서Project Name: Nginx 설치Department: 오픈소스 컨설팅 미들웨어Focus Area: Web ServerProduct/Process: Nginx 1.2.7 Stable versionPrepared By:Document Owner(s) Project/Organization RoleMan-Woong Choi Technical AssistanceProject Status Report Version ControlVersion Date Author Change Description1.0 2013/03/27 Man-Woong Choi Document created[Version #] [mm/dd/yy] [Change owner] [Change 1] [Change 2] [Change n]
  2. 2. Confiugration ReportConfidential Page 2 4/2/2013TABLE OF CONTENTS1 1. 본 문서의 목적 ......................................................................................................................31.1 작업 일시 ....................................................................................................................31.2 작업의 범위..................................................................................................................32 NGINX 설치...........................................................................................................................42.1 설치 시스템 정보 ...........................................................................................................42.2 설치 파일 다운로드 ........................................................................................................42.3 설치 전 필수 library pkg 설치 .........................................................................................52.4 Nginx Source Compile & Build..................................................................................52.5 Nginx 의 시작..............................................................................................................72.6 Nginx 작동 상태 점검하기...............................................................................................82.7 Nginx 의 정지..............................................................................................................83 NGINX 설치 승인.....................................................................................................................94 APPENDICES....................................................................................................................104.1 Document Guidelines .............................................................................................104.2 Project Migration Report Sections Omitted..............................................................101
  3. 3. Confiugration ReportConfidential Page 3 4/2/20131. 본 문서의 목적본 문서의 목적은 현재 WebServer 플랫폼으로 각광을 받고 있는 Nginx 관련 설치에 대한 내용을 정리한문서 입니다.본 문서에는 Nginx 설치에 대한 정보를 모두 포함하고 있습니다.1.1 작업 일시구분 내용 시간 2013 년 4 월 1 일 오전 10 시~12 시 장소 오픈소스 컨설팅 본사 작업자 최만웅 차장(mwchoi@osci.kr) 담당 매니저 최지웅 이사(jchoi@osci.kr)1.2 작업의 범위작업에 대한 결과 리포트는 아래와 같은 내용을 포함하고 있습니다. Nginx 1.2.7 Stable version Install
  4. 4. Confiugration ReportConfidential Page 4 4/2/20132 Nginx 설치2.1 설치 시스템 정보설치 시스템 정보는 다음과 같습니다. RHEL 6.4[mwchoi-vm01:/]# uname -aLinux mwchoi-vm01 2.6.32-358.el6.x86_64 #1 SMP Tue Jan 29 11:47:41 EST 2013 x86_64x86_64 x86_64 GNU/Linux[mwchoi-vm01:/]#2.2 설치 파일 다운로드다음의 URL 에서 설치를 할 Stable Version 을 다운 로드 받습니다.http://nginx.org/en/download.html
  5. 5. Confiugration ReportConfidential Page 5 4/2/20132.3 설치 전 필수 library pkg 설치Nginx 를 설치하기 위해서 기본적으로 설치되어 하는 OS 패키지는 다음과 같습니다.A. gccB. pcre-develC. zlib-develD. openssl-devel[mwchoi-vm01:/data/nginx]# yum install gcc zlib-devel openssl-devel pcre-develLoaded plugins: aliases, changelog, downloadonly, kabi, presto, product-id, refresh-packagekit, security,: subscription-manager, tmprepo, verify, versionlockThis system is not registered to Red Hat Subscription Management. You can usesubscription-manager to register.Loading support for Red Hat kernel ABISetting up Install ProcessPackage gcc-4.4.7-3.el6.x86_64 already installed and latest versionPackage zlib-devel-1.2.3-29.el6.x86_64 already installed and latest versionPackage openssl-devel-1.0.0-27.el6.x86_64 already installed and latest versionPackage pcre-devel-7.8-6.el6.x86_64 already installed and latest versionNothing to do[mwchoi-vm01:/data/nginx]#2.4 Nginx Source Compile & Build다운받은 Nginx 의 stable version 을 압축해제 합니다.[mwchoi-vm01:/data/nginx]# tar -xvzf nginx-1.2.7.tar.gz[mwchoi-vm01:/data/nginx]# ls -ltotal 4drwxr-xr-x. 8 1001 1001 4096 Dec 11 23:27 nginx-1.2.7압축 해제한 Nginx 디렉토리로 이동하여 Build 를 진행합니다.[mwchoi-vm01:/data/nginx]# ls -ltotal 4drwxr-xr-x. 8 1001 1001 4096 Dec 11 23:27 nginx-1.2.7[mwchoi-vm01:/data/nginx]# cd nginx-1.2.7/
  6. 6. Confiugration ReportConfidential Page 6 4/2/2013[mwchoi-vm01:/data/nginx/nginx-1.2.7]# ls -ltotal 568drwxr-xr-x. 6 1001 1001 4096 Apr 2 14:20 auto-rw-r--r--. 1 1001 1001 213065 Dec 11 23:27 CHANGES-rw-r--r--. 1 1001 1001 324660 Dec 11 23:27 CHANGES.rudrwxr-xr-x. 2 1001 1001 4096 Apr 2 14:20 conf-rwxr-xr-x. 1 1001 1001 2369 Aug 7 2012 configuredrwxr-xr-x. 3 1001 1001 4096 Apr 2 14:20 contribdrwxr-xr-x. 2 1001 1001 4096 Apr 2 14:20 html-rw-r--r--. 1 1001 1001 1397 Aug 7 2012 LICENSEdrwxr-xr-x. 2 1001 1001 4096 Apr 2 14:20 man-rw-r--r--. 1 1001 1001 49 Oct 31 2011 READMEdrwxr-xr-x. 8 1001 1001 4096 Apr 2 14:20 src[mwchoi-vm01:/data/nginx/nginx-1.2.7]#Prefix 를 이용하여 configure 를 실행시킵니다.[mwchoi-vm01:/data/nginx/nginx-1.2.7]# ./configure > --prefix=/data/nginx > --sbin-path=/data/nginx/bin/nginx > --conf-path=/data/nginx/conf/nginx.conf > --pid-path=/data/nginx/pid/nginx.pid > --lock-path=/data/nginx/lock/nginx > --error-log-path=/data/nginx/logs/error.log > --http-log-path=/data/nginx/logs/access.log > --http-client-body-temp-path=/data/nginx/tmp/client/ > --http-proxy-temp-path=/data/nginx/tmp/proxy/ > --http-fastcgi-temp-path=/data/nginx/tmp/fcgi/ > --http-uwsgi-temp-path=/data/nginx/tmp/uwsgi/ > --http-scgi-temp-path=/data/nginx/tmp/scgi/ > --with-http_ssl_module > --with-http_realip_module > --with-http_addition_module > --with-http_sub_module > --with-http_dav_module > --with-http_flv_module > --with-http_gzip_static_module > --with-http_stub_status_module > --with-http_perl_module > --with-http_geoip_module[mwchoi-vm01:/data/nginx/nginx-1.2.7]# make[mwchoi-vm01:/data/nginx/nginx-1.2.7]# make install설치가 모두 되었다면 디렉토리를 확인합니다.[mwchoi-vm01:/data/nginx]# ls -l
  7. 7. Confiugration ReportConfidential Page 7 4/2/2013total 24drwxr-xr-x. 2 root root 4096 Apr 2 15:00 bindrwxr-xr-x. 2 root root 4096 Apr 2 15:00 confdrwxr-xr-x. 2 root root 4096 Apr 2 15:00 htmldrwxr-xr-x. 2 root root 4096 Apr 2 15:00 logsdrwxr-xr-x. 2 root root 4096 Apr 2 15:00 piddrwxr-xr-x. 2 root root 4096 Apr 2 15:01 tmp[mwchoi-vm01:/data/nginx]#2.5 Nginx 의 시작설치 완료가 된 상태에서 서버를 기동합니다.[mwchoi-vm01:/data/nginx]# cd bin[mwchoi-vm01:/data/nginx/bin]# ls -ltotal 5288-rwxr-xr-x. 1 root root 5414275 Apr 2 15:00 nginx[mwchoi-vm01:/data/nginx/bin]# ./nginx
  8. 8. Confiugration ReportConfidential Page 8 4/2/20132.6 Nginx 작동 상태 점검하기[mwchoi-vm01:/data/nginx/bin]# ps –ef|grep nginxroot 20165 1 0 15:01 ? 00:00:00 nginx: master process nginxnobody 20166 20165 0 15:01 ? 00:00:00 nginx: worker processroot 20228 14774 0 15:08 pts/1 00:00:00 grep nginx브라우저를 통한 Nginx Index 페이지를 확인합니다.2.7 Nginx 의 정지서버를 중지하기 위해서는 다음의 명령어를 통해 진행합니다.[mwchoi-vm01:/data/nginx/bin]# ps -ef|grep nginxroot 21103 1 0 16:47 ? 00:00:00 nginx: master process ./nginxnobody 21104 21103 0 16:47 ? 00:00:00 nginx: worker processroot 21109 14774 0 16:47 pts/1 00:00:00 grep nginx[mwchoi-vm01:/data/nginx/bin]# ./nginx -s stop[mwchoi-vm01:/data/nginx/bin]# ps -ef|grep nginxroot 21115 14774 0 16:48 pts/1 00:00:00 grep nginx[mwchoi-vm01:/data/nginx/bin]#
  9. 9. Confiugration ReportConfidential Page 9 4/2/20133 Nginx 설치 승인Prepared by __________________________________Middleware Consultant, Open Source Consulting, Inc.Approved by __________________________________Project Manager
  10. 10. Confiugration ReportConfidential Page 10 4/2/20134 APPENDICES4.1 Document Guidelineshttp://wiki.nginx.org/Main4.2 Project Migration Report Sections OmittedN/A

×