로그인

검색

조회 수 1125 추천 수 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/



리눅스

유용한 정보 및 자료

  1. 시놀로지(synology) 비디오 스테이션(video station) 사용목록(use list) 시청목록(watch list) 저장용

    Date2023.06.21 CategoryServer By보석 Views179
    Read More
  2. 우분투 업데이트 서버 변경

    Date2016.06.21 CategoryServer By보석 Views83
    Read More
  3. 우분투 16.04 런처 하단으로 옮기는 방법

    Date2016.06.06 CategoryServer By보석 Views95
    Read More
  4. 우분투(리눅스) 상위폴더로 전체 데이터 옮기기

    Date2016.05.18 CategoryServer By보석 Views217
    Read More
  5. 우분투 "지울 수 없음: 읽기전용 파일 시스템" 이라고 나올때

    Date2016.05.17 CategoryServer By보석 Views146
    Read More
  6. 우분투 오래된 커널 삭제 방법

    Date2016.01.14 CategoryServer By보석 Views317
    Read More
  7. 우분투 11.04에 Nginx에, PHP5, PHP-FPM와 MySQL 설치

    Date2015.02.24 CategoryServer By보석 Views1125
    Read More
  8. nginx 무한 F5 막기

    Date2014.04.08 CategoryServer By보석 Views6527
    Read More
  9. 우분투 프록시서버 만들기

    Date2014.02.03 CategoryServer By보석 Views9691
    Read More
  10. 우분투 mysql DB 파일 위치 변경 방법 패키지로 설치 했을 경우

    Date2013.08.26 CategoryServer By보석 Views57387
    Read More
  11. 우분투 로그 위치 및 각 로그의 설명

    Date2013.08.25 CategoryServer By보석 Views21415
    Read More
  12. mysql 튜닝 방법

    Date2013.08.25 CategoryServer By보석 Views17577
    Read More
  13. Nginx 버전 정보 숨기기

    Date2013.08.23 CategoryServer By보석 Views16925
    Read More
  14. Proftp 버전 및 프로그램명 숨기기

    Date2013.08.23 CategoryServer By보석 Views18299
    Read More
  15. Rewrite 묘듈 활성화 Apache rewrite 활성화하기

    Date2013.08.23 CategoryServer By보석 Views17584
    Read More
  16. 서버운영시 한글도메인 연결 방법

    Date2013.08.23 CategoryServer By보석 Views18654
    Read More
  17. 우분투 13.04 DNS 설정방법

    Date2013.08.23 CategoryServer By보석 Views20542
    Read More
  18. 우분투 rpm 파일을 deb로변경후 설치하기

    Date2013.02.15 CategoryServer By보석 Views23855
    Read More
  19. [Linux] Screen 사용법 입니다.

    Date2013.02.10 CategoryServer By보석 Views18470
    Read More
  20. [우분투] JAVA 설치 (JDK SE)(JRE SE)

    Date2013.02.04 CategoryServer By보석 Views17971
    Read More
Board Pagination Prev 1 2 3 4 Next
/ 4