Serveur Web · 1 min read · Feb 06, 2026

Installer Nginx Sur CentOS 5.5 Avec SSL, PCRE, GeoIP, Zlib, Gzip Et Support DAV

Installer Nginx Sur CentOS 5.5 Avec SSL, PCRE, GeoIP, Zlib, Gzip Et Support DAV

Nginx (prononcé “engine x”) est un serveur HTTP gratuit, open-source et haute performance. Nginx est connu pour sa stabilité, son ensemble de fonctionnalités riche, sa configuration simple et sa faible consommation de ressources. Ce tutoriel montre comment vous pouvez compiler et installer Nginx sur un serveur CentOS 5.5 avec SSL, PCRE, GeoIP, Zlib, Gzip et support DAV.

Je ne garantis pas que cela fonctionnera pour vous !

Pré-installation

Tout d’abord, nous installons les paquets httpd-devel, pcre, pcre-devel, zlib, zlib-devel, perl, geoip et geoip-devel comme ceci :

yum install -y httpd-devel pcre perl pcre-devel zlib zlib-devel GeoIP GeoIP-devel

Télécharger les paquets requis

cd
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.10.tar.gz
wget http://zlib.net/zlib-1.2.5.tar.gz
wget ftp://ftp.openssl.org/source/openssl-0.9.8o.tar.gz

Maintenant, vous devez décompresser ces fichiers.

tar -xvf zlib-1.2.5.tar.gz
tar -xvf pcre-8.10.tar.gz
tar -xvf openssl-0.9.8o.tar.gz

Télécharger le paquet source de Nginx

Vous devez télécharger le paquet source de Nginx depuis http://nginx.org/.

cd
wget http://nginx.org/download/nginx-0.7.67.tar.gz
tar -xvf nginx-0.7.67.tar.gz
cd nginx-0.7.67

Compiler et Installer Nginx

Maintenant, vous pouvez compiler et installer Nginx avec les commandes suivantes :

./configure –user=nginx –group=nginx –prefix=/usr/share/nginx –sbin-path=/usr/sbin/nginx –conf-path=/etc/nginx/nginx.conf –error-log-path=/var/log/nginx/error.log –http-log-path=/var/log/nginx/access.log –http-client-body-temp-path=/var/lib/nginx/tmp/client_body –http-proxy-temp-path=/var/lib/nginx/tmp/proxy –http-fastcgi-temp-path=/var/lib/nginx/tmp/fastcgi –pid-path=/var/run/nginx.pid –lock-path=/var/lock/subsys/nginx –with-http_ssl_module –with-http_realip_module –with-http_addition_module –with-http_sub_module –with-http_dav_module –with-http_flv_module –with-http_gzip_static_module –with-http_stub_status_module –with-http_perl_module –with-mail –with-mail_ssl_module –with-cc-opt=’-m32 -march=i386’ –with-openssl=/root/openssl-0.9.8o –with-pcre –with-pcre=/root/pcre-8.10 –with-zlib=/root/zlib-1.2.5 –with-http_geoip_module

Vous pouvez trouver plus d’options en utilisant la commande suivante :

./configure –help

Maintenant, exécutez :

make
make install

Résumé de la configuration

nginx path prefix: "/usr/local/nginx"
nginx binary file: "/usr/local/nginx/sbin/nginx"
nginx configuration prefix: "/usr/local/nginx/conf"
nginx configuration file: "/usr/local/nginx/conf/nginx.conf"
nginx pid file: "/usr/local/nginx/logs/nginx.pid"
nginx error log file: "/usr/local/nginx/logs/error.log"
nginx http access log file: "/usr/local/nginx/logs/access.log"
nginx http client request body temporary files: "client_body_temp"
nginx http proxy temporary files: "proxy_temp"
nginx http fastcgi temporary files: "fastcgi_temp"

Démarrer le serveur Nginx

/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf

Test

/usr/local/nginx/sbin/nginx -V

Share: X/Twitter LinkedIn

Recevez de nouveaux articles dans votre boîte de réception.

Aucun spam. Désabonnez-vous à tout moment.