로그인

검색

조회 수 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 Pydio ajaxplorer 3.0 설정 및 한글 파일 다운로드 및 압축문제 해결 file 보석 2011.10.16 16441
203 Pydio ajaXplorer 한글파일 업로드시 411 에러 해결법 보석 2014.02.09 7504
202 Server CSS Background 속성 보석 2011.10.03 9759
201 Server DB 백업 스크립트 (우분투 기준) 보석 2011.05.15 12307
200 Server Install Nginx, PHP5, PHP-FPM and MySQL on Ubuntu 11.04 보석 2011.10.31 25494
199 Server Installing Nginx With PHP5 (And PHP-FPM) And MySQL Support On Ubuntu 11.10 1 보석 2011.11.01 25692
198 KimsQ kimsq v1.1.0 기준 nginx rewrite rule 보석 2013.08.23 12775
197 Server kimsq 파일 다운로드시 포인트 차감 설정 보석 2011.05.18 11305
196 기타 MySQL 기본쿼리 : DELETE 문 보석 2013.03.14 15555
195 Server mysql 튜닝 방법 보석 2013.08.25 17570
194 Server Nginx 가상호스트 설정 1 보석 2011.10.31 27860
193 Server nginx 무한 F5 막기 보석 2014.04.08 6522
192 Server Nginx 버전 정보 숨기기 보석 2013.08.23 16920
191 Server nginx 첨부파일 용량 설정 보석 2012.04.02 18747
190 Server Proftp 버전 및 프로그램명 숨기기 보석 2013.08.23 18295
189 Pydio Pydio AjaXplorer Mcrypt Enabled, Security Brench, Server charset encoding, php output disabled 오류해결 보석 2016.05.18 100
188 Pydio Pydio AjaXplorer 버전별 다운로드 보석 2016.05.18 84
187 Pydio Pydio AjaXplorer 업로드후 Impossible write into the AJXP_DATA_PATH folder ajaxplorer 나올때 보석 2016.05.18 173
186 KimsQ RBSHOP 킴스큐쇼핑몰 가입시 포인트 적립금으로 바꾸기 보석 2013.08.23 15069
185 Server Rewrite 묘듈 활성화 Apache rewrite 활성화하기 보석 2013.08.23 17580
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 11 Next
/ 11