로그인

검색

조회 수 1118 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 게시글 수정 내역 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 게시글 수정 내역 댓글로 가기 인쇄


Install Nginx, PHP5, PHP-FPM and MySQL on Ubuntu 11.04:

1. Install MySQL

sudo apt-get install mysql-server

sudo apt-get install mysql-server mysql-client

2. Install nginx

(1) Add nginx ppa source in sources.list:

sudo vim /etc/apt/sources.list

deb http://ppa.launchpad.net/nginx/development/ubuntu maverick main

deb-src http://ppa.launchpad.net/nginx/development/ubuntu maverick main

(2) add key, and then update

sudo apt-key adv –keyserver keyserver.ubuntu.com –recv-keys C300EE8C
sudo apt-get update

(3) Install nginx

sudo apt-get install nginx

3. Install php and php-fpm

(1) Create directory

sudo mkdir /var/www

(2) installation

sudo apt-get install php5-cgi php5-mysql php5-fpm php5-curl php5-gd php5-idn php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-mhash php5-ming php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl

4. Configuration

(1) Modify php.ini

sudo vim /etc/php5/fpm/php.ini

Change cgi.fix_pathinfo=1

INTO cgi.fix_pathinfo=0

(2) Modify /etc/nginx/sites-available/default

sudo vim /etc/nginx/sites-available/default

server {
listen [::]:80 default ipv6only=on;
listen 80;
server_name localhost;
root /var/www/;

#access_log /var/www/log/xxx-access.log;
#error_log /var/www/logs/xxx-error.log;

location / {
index index.php index.html index.htm;
}

#error_page 404 /404.html;

# redirect server error pages to the static page /50x.html
#
#error_page 500 502 503 504 /50x.html;
#location = /50x.html {
# root /var/www/nginx-default;
#}

location ~ \.php$ {

fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi_params;
}
}

(3) Edit /etc/nginx/fastcgi_params, add the following line at the end:

fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_script_name;
fastcgi_connect_timeout 60;
fastcgi_send_timeout 180;
fastcgi_read_timeout 180;
fastcgi_buffer_size 128k;
fastcgi_buffers 4 256k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k;
fastcgi_intercept_errors on;

5. Start nginx and php-fpm

sudo /etc/init.d/nginx restart
sudo /etc/init.d/php5-fpm reload


http://turbolinux.org/2011/05/install-nginx-php5-php-fpm-and-mysql-on-ubuntu-11-04/



리눅스

유용한 정보 및 자료

List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
204 Server 테이블 형태 변경하기 MyISAM -> InnoDB(또는 InnoDB -> MyISAM) 보석 2011.10.21 25963
203 KimsQ 킴스큐 RBShop유플러스(UPLUS - 엘지데이콤) 결제후 주문서가 접수 되지 않는 오류 보석 2013.08.23 15266
202 XE 콘텐츠 위젯 제목에 코드 노출되는 문제 보석 2012.04.27 11552
201 Pydio 웹하드 솔루션 - AjaXplorer 4.0 한글패치 file 보석 2012.09.30 10128
200 기타 원하는 크기로 새창 띄우기 보석 2013.08.23 14294
199 XE 원하는 위치에 아이콘샵 아이콘 출력하기 보석 2012.09.05 22657
198 Server 우분투에서 압축하고 풀기( tar, gzip, tar.gz ) 보석 2011.08.31 15714
197 Server 우분투에 메일서버를 설치하자. file 보석 2011.12.10 10649
196 Server 우분투(리눅스) 상위폴더로 전체 데이터 옮기기 1 보석 2016.05.18 212
195 Server 우분투 프록시서버 만들기 file 보석 2014.02.03 9686
194 Server 우분투 폴더 소유권 설정 보석 2011.05.15 16403
193 Server 우분투 폴더 삭제 및 폴더 생성 보석 2011.05.15 21160
192 Server 우분투 트림활성화 및 수동 트림하기 보석 2012.11.04 19855
191 Server 우분투 크론 (예약작업) 설정 자동 백업 4 보석 2011.09.01 15846
190 Server 우분투 원격데스크톱 설정 보석 2012.03.30 12098
189 Server 우분투 오래된 커널 삭제 방법 보석 2016.01.14 310
188 Server 우분투 업데이트 서버 변경 보석 2012.11.11 12051
187 Server 우분투 업데이트 서버 변경 보석 2016.06.21 78
186 Server 우분투 센드메일 설치 및 설정 sendmail 2 보석 2011.05.16 22216
185 Server 우분투 서버(커맨드 모드)에서 외부 아이피 알아내기 보석 2012.04.05 14163
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 11 Next
/ 11