Debian Sarge(3.1)使用Ruby on Rails,Apache 2使用FastCGI

Debian Sarge(3.1)与Ruby on Rails和Apache 2与FastCGI

TomW 2006年5月4日。

此操作将使您通过使用Ruby on Rails和Apache 2安装Debian(Sarge),并使用通过ISPConfig进行管理的FastCGI。

它将使用以下软件:

  • Web服务器: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
  • Ruby 1.82与MySQL支持。
  • Ruby GEM 0.8.11
  • Rails 1.1.2

这个HOWTO主要基于Falko 的完美安装 - Debian Sarge(3.1) - 请参考HOWTo来进行基本的Debian网络安装安装。 以下来源被使用或咨询:

假设你有一个运行正常的Debian NetInstall(上面的Perfect Setup的前两页)执行以下操作:

安装你最喜欢的编辑器

我喜欢Joe编辑器,并将在所有的例子中使用它 - 替换你最喜爱的编辑器,所以:

apt-get install joe

配置网络

编辑/ etc / network / interfaces文件

joe /etc/network/interface

它最初看起来像这样:

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet dhcp

更改它看起来像这样(例如使用192.168.0.100

# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
# The loopback interface
auto lo
iface lo inet loopback

# The first network card - this entry was created during the Debian installation
# (network, broadcast and gateway are optional)
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

对于多个ips只需添加一个这样的新的ip块(例如使用192.168.0.101

# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)

# The loopback interface
auto lo
iface lo inet loopback

# The first network card - this entry was created during the Debian installation
# (network, broadcast and gateway are optional)
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以添加Nameservers - 替换您的Nameservers地址:

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

# The following lines are desirable for IPv6 capable hosts
::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 pppconfig

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
赞(52) 打赏
未经允许不得转载:优客志 » 系统运维
分享到:

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏