Welcome to Scribd. Sign in or start your free trial to enjoy unlimited e-books, audiobooks & documents.Find out more
Download
Standard view
Full view
of .
Look up keyword
Like this
2Activity
0 of .
Results for:
No results containing your search query
P. 1
installer-nginx-php5-fpm-xcache-et-mysql-sur-une-debian-lenny

installer-nginx-php5-fpm-xcache-et-mysql-sur-une-debian-lenny

Ratings: (0)|Views: 132|Likes:
Published by Pascal Cescato
Comment installer NGINX / PHP5-FPM sur une debian Lenny / Squeeze
Comment installer NGINX / PHP5-FPM sur une debian Lenny / Squeeze

More info:

Published by: Pascal Cescato on Mar 25, 2011
Copyright:Traditional Copyright: All rights reserved

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as DOCX, PDF or read online from Scribd
See more
See less

11/06/2012

pdf

 
Installer NGINX,PHP5-FPM, Xcache et MySQLsur une Debian Lenny
3XEOLªOHMXLQ3DVFDO&(6&$72VXUKWWSZZZH[SHUWSKSIU/LUHODUWLFOHHQOLJQHKWWSZZZH[SHUWSKSIUQJLQ[LQVWDOOHUQJLQ[SKSISP[FDFKHHWP\VTOVXUXQHGHELDQOHQQ\KWPO
Une architecture alternative  Pourquoi ?
2QDVVLVWHGHSXLVTXHOTXHWHPSV¡XQHLQGXVWULDOLVDWLRQGXGªYHORSSHPHQW3+3FRQVªTXHQFHLQªOXFWDEOHGHVRQXWLOLVDWLRQGDQVGHVDSSOLFDWLRQVGHQWUHSULVHHWHFRPPHUFHFRQVªTXHQWHVOXWLOLVDWLRQGHIUDPHZRUNV3+3SHUPHWGHGªYHORSSHUSOXVYLWHHQªTXLSHGDQVXQFDGUHQRUPDOLVªHQUHVSHFWDQWGHVQRUPHVGHFRGDJHVWULFWHVTXLQRQVHXOHPHQWIDFLOLWHQWOHSDUWDJHHWODUªXWLOLVDWLRQGXFRGHPDLVªJDOHPHQWVDPDLQWHQDQFH/HSRLQWQRLUFDULO\DWRXMRXUVXQUHYHUVFHVWODGªJUDGDWLRQGHVSHUIRUPDQFHVP«PHDYHFXQFRGHRSWLPLV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E
2XL0DLVRQSHXWDXVVLRSWLPLVHU
NGINX
8QFKRL[HVWIDLWRQIDLWDYHF
PHP5-FPM
PHP5-FPM
HVWXQHDOWHUQDWLYH¡ODYHUVLRQ
FastCGI
3RXUFHTXHODQJODLVQHUHEXWHSDVYRXVWURXYHUH]TXHOTXHVLQIRUPDWLRQVVXUFHVLWHSKSISP
MySQL
5
HYHQGXH¡
SUN
OXLP«PHUHYHQGX¡
ORACLE

MySQL
UHVWHODEDVHGHGRQQªHVODSOXVXWLOLVªHGDQVOHPRQGH3+36LPSOH¡XWLOLVHUHW¡DGPLQLVWUHUHOOHRIIUHVXIILVDPPHQWGHIRQFWLRQQDOLWªVSRXUODSOXSDUWGHVSURMHWVZHE&HUWDLQVVLQTXL©WHQWSRXUVRQDYHQLU
ORACLE
QD\DQWSDVIRUFªPHQWERQQHUªSXWDWLRQDXSU©VGHVDFWHXUVGXOLEUHPDLVGHVDOWHUQDWLYHVLQWªUHVVDQWHVH[LVWHQWGªM¡IRUNVGHODYHUVLRQRSHQVRXUFHGH
MySQL
(WOHVDQQRQFHVG
ORACLE
FRQFHUQDQWODYHUVLRQVRQWSOXWµWUDVVXUDQWHVWDQWTXDQWDXVXLYLTXHQWHUPHVGHSHUIRUPDQFHV
C
onfigurer les dépôts
Il existe des dépôts pour php5-fpm et MySQL 5.1 sur dotdeb. Éditez le fichier 
sources.list
:
vim /etc/apt/sources.list
et insérez les lignes suivantes :
deb http://packages.dotdeb.org oldstable alldeb-src http://packages.dotdeb.org oldstable alldeb http://php53.dotdeb.org oldstable alldeb-src http://php53.dotdeb.org oldstable all
Récupérez ensuite les clés GnuPG :
gpg --keyserver keys.gnupg.net --recv-key 89DF5277gpg -a --export 89DF5277 | apt -key add
/DQFH]HQVXLWHFHWWHFRPPDQGHSRXUPHWWUH¡MRXUYRVGªSµWV
apt-get update
SXLVFHOOHFLSRXUPHWWUH¡MRXUYRWUHV\VW©PHFHTXLSHUPHWWUDHQWUHDXWUHEªQªILFHGDFFUR¯WUHODVªFXULWªGHYRWUHVHUYHXU
apt-get upgrade
I
nstallation
Préliminaires
$YDQWGHFRPPHQFHUOLQVWDOODWLRQSDVVH]HQURRWVLYRXVYRXV«WHVLGHQWLILªVXUXQDXWUHFRPSWHFHTXLHVWIRUWHPHQWUHFRPPDQGª
su
(WUHQVHLJQH]OHPRWGHSDVVH
installation du serveur MySQL
/HSUHPLHUVHUYHXULQVWDOOªHVWSDUGªIDXW
MySQL

apt-getinstallmysql-server
 
/RUVGHOLQVWDOODWLRQLOYRXVVHUDGHPDQGªXQPRWGHSDVVHDGPLQLVWUDWHXU&KRLVLVVH]XQPRWGHSDVVHVROLGHFDUDFW©UHVVHPEOHQW«WUHXQPLQLPXPGLIIªUHQWGXPRWGHSDVVHV\VW©PHFRPSUHQDQWDXPRLQVXQHPDMXVFXOHXQHPLQXVFXOHXQV\PEROHHWXQFKLIIUH9RLO¡
MySQL
HVWLQVWDOOª
installation de PHP5-FPM
3RXULQVWDOOHU3+3HWOHVOLEUDLULHVHVVHQWLHOOHVDGDSWH]ODOLJQHGHFRPPDQGHVXLYDQWH¡YRVEHVRLQV
apt-get install php5-fpm php5-xcache php5-gd \php5-curl php5-mysql libssl-dev libpcre3-dev build-essential -y
installation du serveur
NGINX
 
1RXVDOORQVPDLQWHQDQWWªOªFKDUJHUHWFRPSLOHU
NGINX
SRXULQVWDOOHUODWRXWHGHUQL©UHYHUVLRQDFWXHOOHPHQWOD
cd /tmpmkdirnginxinstallcdnginxinstallapt-get install libgeoip-devwget http://sysoev.ru/nginx/nginx-0.8.53.tar.gztar -zxvf nginx-0.8.53.tar.gzcd nginx-0.8.53./configure --prefix=/usr/local/nginx --user=www-data --group=www-data \--without-mail_pop3_module --without-mail_imap_module --without-mail_smtp_module \--with-http_stub_status_module --with-http_ssl_module --with-http_geoip_module \--http-log-path=/var/log/nginx/access.log --conf-path=/etc/nginx/nginx.conf \--pid-path=/var/run/nginx.pidmakemakeinstall
7RXVOHVORJLFLHOVQªFHVVDLUHVDXERQIRQFWLRQQHPHQWGXQVHUYHXUZHEGHEDVHVRQWLQVWDOOªVUHVWH¡OHVFRQILJXUHU
C
onfiguration
configuration du serveur
NGINX
 
&RPPHQ¨RQVSDUFRQILJXUHU
NGINX
TXLHVWHQIDLWOªOªPHQWFHQWUDOGHQRWUHDUWLFOHHWGHQRWUHVHUYHXUZHE
vim /etc/init.d/nginx
6XSSULPH]OH[LVWDQWHWLQVªUH]OHFRGHVXLYDQW
#! /bin/sh### BEGIN INIT INFO# Provides: nginx# Required-Start: $all# Required-Stop: $all# Default-Start: 2 3 4 5# Default-Stop: 0 1 6# Short-Description: starts the nginx web server# Description: starts nginx using start-stop-daemon### END INIT INFOPATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/localDAEMON=/usr/local/nginx/sbin/nginxNAME=nginxDESC=nginxtest -x $DAEMON || exit 0# Includenginx defaults if availableif [ -f /etc/default/nginx ] ; then. /etc/default/nginxfiset -e

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->