서버 설정 · 2 min read · Oct 22, 2025
Debian Sarge (3.1) with Ruby on Rails and Apache 2 with FastCGI
Debian Sarge (3.1) with Ruby on Rails and Apache 2 with FastCGI
by TomW May 04, 2006.
이 방법서는 ISPConfig로 관리되는 Ruby on Rails 및 FastCGI와 함께 Debian (Sarge)을 설치하는 과정을 안내합니다.
다음 소프트웨어를 사용할 것입니다:
- 웹 서버: Apache 2.0.x
- 메일 서버: Postfix
- DNS 서버: BIND9
- FTP 서버: proftpd
- POP3/POP3s/IMAP/IMAPs: Maildir 형식 Courier-POP3/Courier-IMAP
- 웹사이트 통계를 위한 Webalizer
- 데이터베이스: MySQL 버전 4.0
- FastCGI 라이브러리 2.40
- MySQL 지원이 포함된 Ruby 1.82.
- Ruby GEM 0.8.11
- Rails 1.1.2
이 HOWTO는 주로 Falko의 The Perfect Setup – Debian Sarge (3.1)을 기반으로 하며, 기본 Debian 네트워크 설치 설정에 대해서는 해당 HOWTo를 참조하십시오. 다음 소스가 사용되거나 참조되었습니다:
- 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
기본 Debian NetInstall이 실행 중이라고 가정하고 (위의 Perfect Setup의 첫 두 페이지) 다음을 수행하십시오:
좋아하는 편집기 설치하기
저는 Joe 편집기를 좋아하며 모든 예제에서 사용할 것입니다 – 좋아하는 편집기로 대체하십시오, 예:
apt-get install joe네트워크 구성하기
/etc/network/interfaces 파일을 편집합니다.
joe /etc/network/interface초기에는 다음과 같이 보일 것입니다:
| # 이 파일은 시스템에서 사용 가능한 네트워크 인터페이스와 이를 활성화하는 방법을 설명합니다. 더 많은 정보는 interfaces(5)를 참조하십시오. # 루프백 네트워크 인터페이스 auto lo iface lo inet loopback # 기본 네트워크 인터페이스 auto eth0 iface eth0 inet dhcp |
다음과 같이 변경하십시오 (예제에서는 192.168.0.100 사용):
| # /etc/network/interfaces -- ifup(8), ifdown(8)을 위한 구성 파일 # 루프백 인터페이스 auto lo iface lo inet loopback # 첫 번째 네트워크 카드 - 이 항목은 Debian 설치 중에 생성되었습니다. # (네트워크, 브로드캐스트 및 게이트웨이는 선택 사항입니다) auto eth0 iface eth0 inet static address 192.168.0.100 netmask 255.255.255.0 network 192.168.0.0 broadcast 192.168.0.255 gateway 192.168.0.1 |
여러 IP를 위한 경우 다음과 같이 새 IP 블록을 추가하십시오 (예제에서는 192.168.0.101 사용):
| # /etc/network/interfaces -- ifup(8), ifdown(8)을 위한 구성 파일 # 루프백 인터페이스 auto lo iface lo inet loopback # 첫 번째 네트워크 카드 - 이 항목은 Debian 설치 중에 생성되었습니다. # (네트워크, 브로드캐스트 및 게이트웨이는 선택 사항입니다) auto eth0 iface eth0 inet static address 192.168.0.100 netmask 255.255.255.0 network 192.168.0.0 broadcast 192.168.0.255 gateway 192.168.0.1 auto eth0:0 iface eth0:0 inet static address 192.168.0.101 netmask 255.255.255.0 network 192.168.0.0 broadcast 192.168.0.255 gateway 192.168.0.1 |
그런 다음 네트워크를 재시작합니다.
/etc/init.d/newtorking restart/etc/resolv.conf를 편집하여 네임서버를 추가합니다 – 네임서버 주소를 대체하십시오:
joe /etc/resolv.conf| search server nameserver 216.47.224.66 nameserver 216.47.224.68 nameserver 207.217.77.82 nameserver 207.217.120.82 nameserver 207.217.126.81 |
/etc/hosts를 편집하고 새 IP 주소를 추가합니다.
joe /etc/hosts| 127.0.0.1 localhost.localdomain localhost server1 192.168.0.100 server1.example.com server1 192.168.0.101 virtual-ip1.example.com virtual-ip1 # 다음 줄은 IPv6 지원 호스트에 바람직합니다. ::1 ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters ff02::3 ip6-allhosts |
호스트 이름을 설정합니다.
echo server1.example.com > /etc/hostname
/bin/hostname -f /etc/hostname나중에 필요할 소프트웨어를 설치하고 필요 없는 패키지를 제거합니다.
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 pppconfiginetd에 의해 시작된 서비스를 업데이트합니다.
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새 게시물을 받은 편지함에서 받기
스팸은 없습니다. 언제든지 구독 해지 가능합니다.