Installation · 1 min read · Feb 01, 2026
Debian Sarge (3.1) avec Ruby on Rails et Apache 2 avec FastCGI - Page 4
Installer Apache et Ruby
apt-get install apache2 apache2-doc
apt-get install libapache2-mod-php4 libapache2-mod-perl2 php4 php4-cli php4-common php4-curl php4-dev php4-domxml php4-gd php4-imap php4-ldap php4-mcal php4-mhash php4-mysql php4-odbc php4-pear php4-xslt curl libwww-perl imagemagick
apt-get install ruby ruby1.8-dev rdoc apache2-prefork-dev makeÉditez /etc/apache2/apache2.conf.
joe /etc/apache2/apache2.confchangez :
| DirectoryIndex index.html index.cgi index.pl index.php index.xhtml |
à
| DirectoryIndex index.html index.htm index.shtml index.cgi index.php index.php3 index.pl index.xhtml |
Éditez /etc/mime.types et commentez les lignes suivantes :
joe /etc/mime.types| #application/x-httpd-php phtml pht php #application/x-httpd-php-source phps #application/x-httpd-php3 php3 #application/x-httpd-php3-preprocessed php3p #application/x-httpd-php4 php4 |
Éditez /etc/apache2/mods-enabled/php4.conf et commentez les lignes suivantes :
joe /etc/apache2/mods-enabled/php4.conf| |
Éditez /etc/apache2/ports.conf et ajoutez Listen 443 :
joe /etc/apache2/ports.conf| Listen 80 Listen 443 |
Maintenant, nous devons activer certains modules Apache (SSL, réécriture et suexec) :
a2enmod ssl
a2enmod rewrite
a2enmod suexecInstaller la bibliothèque FastCGI
*Note 2.4.0 est la version actuelle si elle n’est pas disponible visitez www.fastcgi.com pour obtenir la dernière.
cd /usr/local/src
wget http://www.fastcgi.com/dist/fcgi-2.4.0.tar.gz
tar xvzf fcgi-2.4.0.tar.gz
cd fcgi-2.4.0
./configure && make && make installInstallation de mod_fastcgi.so pour Apache2
Téléchargez les sources de mod_fastcgi depuis http://www.fastcgi.com/dist/mod_fastcgi-2.4.2.tar.gz. Si le lien ne fonctionne pas, essayez d’obtenir les dernières sources de mod_fastcgi à la place. Créez le module mod_fastcgi.
cd /usr/local/src
wget http://www.fastcgi.com/dist/mod_fastcgi-2.4.2.tar.gz
tar xvzf mod_fastcgi-2.4.2.tar.gz
cd mod_fastcgi-2.4.2
cp Makefile.AP2 Makefile
make top_dir=/usr/share/apache2
make install top_dir=/usr/share/apache2Activez mod_fastcgi dans Apache2
echo 'LoadModule fastcgi_module /usr/lib/apache2/modules/mod_fastcgi.so' > /etc/apache2/mods-available/fastcgi.load
a2enmod fastcgiInstallation des liaisons ruby-fcgi, Ruby GEM et Rails :
Téléchargez les liaisons ruby-fcgi depuis http://sugi.nemui.org/pub/ruby/fcgi/ruby-fcgi-0.8.6.tar.gz. Si le lien ne fonctionne pas, essayez d’obtenir les dernières liaisons ruby-fcgi à la place.
cd /usr/local/src
wget http://sugi.nemui.org/pub/ruby/fcgi/ruby-fcgi-0.8.6.tar.gz
tar xvzf ruby-fcgi-0.8.6.tar.gz
cd ruby-fcgi-0.8.6
ruby install.rb config
ruby install.rb setup
ruby install.rb install
cd /usr/local/src
wget http://rubyforge.org/frs/download.php/5207/rubygems-0.8.11.tgz
tar zxvf rubygems-0.8.11.tgz
cd rubygems-0.8.11
ruby1.8 setup.rb
gem install rubygems-update
gem install rails --include-dependencies
gem install mysqlRépondre 2 mysql 2.7(ruby)
Redémarrez Apache :
/etc/init.d/apache2 restartRecevez de nouveaux articles dans votre boîte de réception.
Aucun spam. Désabonnez-vous à tout moment.