"Nginx"의 두 판 사이의 차이
둘러보기로 가기
검색하러 가기
잔글 |
잔글 |
||
93번째 줄: | 93번째 줄: | ||
== PHP 사용 설정 == | == PHP 사용 설정 == | ||
− | PHP 설치 | + | |
+ | |||
+ | [[PHP_5.2.5|PHP]]를 설치 합니다. | ||
+ | |||
+ | {| cellspacing="1" cellpadding="1" style="color: rgb(0, 0, 0); font-family: sans-serif; line-height: 20.7999992370605px; width: 771px;" | ||
+ | |- | ||
+ | | style="background-color: rgb(241, 241, 241);" | | ||
+ | yum install php php-* | ||
+ | |||
+ | mkdir /<span style="color: rgb(0, 0, 0); font-family: sans-serif; line-height: 19.5px; background-color: rgb(241, 241, 241);">var/lib/php/upload</span> | ||
+ | |||
+ | |} | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | vi /etc/php.ini | ||
+ | |||
+ | {| cellspacing="1" cellpadding="1" style="line-height: 20.7999992370605px; color: rgb(0, 0, 0); font-family: sans-serif; width: 771px;" | ||
+ | |- | ||
+ | | style="background-color: rgb(241, 241, 241);" | | ||
+ | date.timezone = Asia/Seoul<br/>upload_tmp_dir = "/var/lib/php/upload"<br/>session.save_path = "/var/lib/php/session" | ||
+ | |||
+ | |} | ||
+ | |||
+ | |||
+ | |||
+ | PHP-FPM 서비스를 실행 합니다 | ||
+ | |||
+ | {| cellspacing="1" cellpadding="1" style="line-height: 20.7999992370605px; color: rgb(0, 0, 0); font-family: sans-serif; width: 771px;" | ||
+ | |- | ||
+ | | style="background-color: rgb(241, 241, 241);" | | ||
+ | service php-fpm restart | ||
+ | |||
+ | |} | ||
+ | |||
+ | |||
+ | |||
+ | |||
yum install php php-* | yum install php php-* |
2014년 9월 18일 (목) 15:19 판
비동기 이벤트 기반의 Web Server인 nginx를 정리 합니다.
- 홈페이지 : http://www.nginx.net/
- 다운로드 :
- 라이선스 :
- 플랫폼 : C
nginx 개요
CentOS 6.5에서 설치
Nginx 저장소 생성
vi /etc/yum.repos.d/nginx.repo
[nginx] name=nginx repo baseurl=http://nginx.org/packages/centos/$releasever/$basearch/ gpgcheck=0 enabled=1 |
Nginx 설치
yum install nginx mkdir -p /etc/nginx/sites-enabled |
Nginx 설정 파일
- /etc/nginx/ : 설정 파일 폴더
- nginx.conf
- conf.d/
- /var/log/nginx/ : 로그 폴더
- access.log
- error.log
- /usr/share/nginx/html/ : Document Root 폴더
기본 설정
vi /etc/nginx/nginx.conf
worker_processes 1; #--- core 수만큼 지정 gzip on; |
vi /etc/nginx/conf.d/default.conf
server_name ossnode101.ossbiz.co.kr; |
방화벽 설정 및 서비스 기동
setup #--- 방화벽에서 80/tcp port를 오픈 합니다. service nginx restart |
브라우저에서 http://ossnode101.ossbiz.co.kr:80/ 으로 접속 합니다.
PHP 사용 설정
PHP를 설치 합니다.
yum install php php-* mkdir /var/lib/php/upload |
vi /etc/php.ini
date.timezone = Asia/Seoul |
PHP-FPM 서비스를 실행 합니다
service php-fpm restart |
yum install php php-*