Debian Sarge (3.1) with Ruby on Rails and Apache 2 with FastCGI
by TomW May 04, 2006.
This howto will step you through installing Debian (Sarge) with Ruby on Rails and Apache 2 with FastCGI managed with ISPConfig.
It will use the following software:
- Web Server: Apache 2.0.x
- Mail Server: Postfix
- DNS Server: BIND9
- FTP Server: proftpd
- POP3/POP3s/IMAP/IMAPs: Maildir format Courier-POP3/Courier-IMAP
- Webalizer for web site statistics
- Database: MySQL version 4.0
- FastCGI Library 2.40
- Ruby 1.82 with MySQL support.
- Ruby GEM 0.8.11
- Rails 1.1.2
This HOWTO is based mainly on The Perfect Setup -- Debian Sarge (3.1) by Falko -- consult that HOWTo for basic Debian Network Install Setup. The following sources were used or consulted:
- https://www.howtoforge.com/perfect_setup_debian_sarge
- http://blog.inlet-media.de/the-perfect-ruby-on-rails-with-apache2-and-fastcgi-setup-on-debian-sarge
- http://www.ispconfig.org/manual_installation.htm
- http://wiki.rubyonrails.com/rails/pages/RailsOnUbuntuDebianTestingAndUnstable
Assuming you have an up and running basic Debian NetInstall (First two pages of Perfect Setup above) do the following:
Install your favorite editor
I like the Joe editor and will use it in all the examples -- substitute you favorite editor, so:
apt-get install joe
Configure the network
Edit the /etc/network/interfaces file
joe /etc/network/interface
It will initially look like this:
# This file describes the network interfaces available on your system |
Change it to look like this (example uses 192.168.0.100)
# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8) |
For multiple ips just add a new ip block like this (example uses 192.168.0.101)
# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8) |
Then Restart the network
/etc/init.d/newtorking restart
Edit /etc/resolv.conf to add nameservers -- substitute your name server addresses:
joe /etc/resolv.conf
search server |
Edit /etc/hosts and add your new IP address
joe /etc/hosts
127.0.0.1 localhost.localdomain localhost server1 |
Set the host name
echo server1.example.com > /etc/hostname
/bin/hostname -f /etc/hostname
Install some software we will need later on and remove some packages we do not need
apt-get install wget bzip2 rdate fetchmail libdb3++-dev unzip zip ncftp xlispstat libarchive-zip-perl zlib1g-dev libpopt-dev nmap openssl lynx fileutils
apt-get remove lpr nfs-common portmap pidentd pcmcia-cs pppoe pppoeconf ppp pppconfig
Update services started by inetd
update-rc.d -f exim remove
update-inetd --remove daytime
update-inetd --remove telnet
update-inetd --remove time
update-inetd --remove finger
update-inetd --remove talk
update-inetd --remove ntalk
update-inetd --remove ftp
/etc/init.d/inetd reload