로그인

검색

조회 수 25494 추천 수 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
번호 분류 제목 글쓴이 날짜 조회 수
35 Server 우분투 nginx rewrite 보석 2011.11.03 235869
34 Server Installing Nginx With PHP5 (And PHP-FPM) And MySQL Support On Ubuntu 11.10 1 보석 2011.11.01 25692
33 Server Nginx 가상호스트 설정 1 보석 2011.10.31 27860
» Server Install Nginx, PHP5, PHP-FPM and MySQL on Ubuntu 11.04 보석 2011.10.31 25494
31 Server 테이블 형태 변경하기 MyISAM -> InnoDB(또는 InnoDB -> MyISAM) 보석 2011.10.21 25963
30 Server 우분투 Memcached 설치는 이렇게 보석 2011.10.19 28786
29 Server 링크하드 리눅스 설치 성공담 - 웹하드 WebHard Linux Install 보석 2011.10.17 27005
28 Server 우분투 PHP5.3 버젼에 ioncube설치하기 보석 2011.10.17 25749
27 Server 리눅스용 무료 웹하드 <shade webhard> 설치하기 file 보석 2011.10.17 36136
26 Server 리눅스 (우분투) vsftp 설치 및 설정 보석 2011.10.17 15132
25 Server CSS Background 속성 보석 2011.10.03 9759
24 Server 우분투 크론 (예약작업) 설정 자동 백업 4 보석 2011.09.01 15846
23 Server [리눅스] 새 계정 만들기/지우기, 사용자 아이디 추가/삭제; Create Account 1 보석 2011.08.31 39168
22 Server 우분투에서 압축하고 풀기( tar, gzip, tar.gz ) 보석 2011.08.31 15714
21 Server 리눅스 파일 복사 및 이동 명령어 사용법 1 보석 2011.08.31 17908
20 Server 리눅스 vsFTP 사용자 계정 홈디렉토리 변경 보석 2011.08.31 20614
19 Server 리눅스 하드디스크 복사-교체 보석 2011.07.26 17691
18 Server 리눅스에서 SSD 최적화 보석 2011.07.08 20968
17 Server 우분투 리눅스에서 APM 설치하기 (웹서버 설정) 보석 2011.07.04 32846
16 Server 리눅스 각 폴더별 용량 확인 하기 1 보석 2011.07.04 14007
Board Pagination Prev 1 2 3 4 Next
/ 4