Servers/Setup
| This article or section contains out-of-date information: The servers aren't manually set up any more, chef is used instead If you know about the current state of affairs, please help keep everyone informed by updating this information |
Contents |
Network
Give server static addresses in /etc/network/interfaces - the gateway is only needed for UCL machines not on the public network:
auto eth0
iface eth0 inet static
address 10.0.0.x
netmask 255.255.255.0
gateway 10.0.0.7
Set the host name in /etc/hostname.
Set the resolver in /etc/resolv.conf - for machines at UCL use:
search internal.openstreetmap.org openstreetmap.org nameserver 10.0.0.7 nameserver 10.0.0.3
UCL: Enable net.ipv4.tcp_mtu_probing=1
Serial Console
Information on setting up a serial console on Ubuntu can be found here. Note that if the serial console is not on ttyS0 you will need to add it to /etc/securetty before you can logon as root via the serial console.
If you are dealing with the virtual serial port provided by the ILO card on an HP DL380 G3 then you're in for a real treat - this port is on I/O port 0x0408 so is not detected automatically. This can be fixed with setserial as follows:
setserial /dev/ttyS1 uart 16550A port 0x0408 irq 3
Adding the appropriate line to /etc/serial.conf will ensure that the port works in future. Grub can be made to work by using --port=0x408 instead of --unit=1 when declaring the serial port, for example:
serial --port=0x0408 --speed=115200 --word=8 --parity=no --stop=1
The kernel can be persuaded to output some (early) messages by using:
console=uart8250,io,0x0408,115200n8
Unfortunately once the kernel does it's device detection it will fail to find that device and will stop outputting messages and nothing more will appear until /etc/init.d/setserial runs and restores the settings.
NTP
Install NTP package:
apt-get install ntp
Configure servers in /etc/ntp.conf - for servers at UCL use:
server ntp1.ucl.ac.uk server ntp2.ucl.ac.uk
Restart ntpd and allow it to synchronise.
Hardware Sensors
Install lm-sensors package:
apt-get install lm-sensors
Run sensors-detect to find and configure sensors.
Munin
Install munin-node and smartmontools:
apt-get install munin-node smartmontools
Edit /etc/munin/munin-node.conf and allow munin master to connect by adding:
allow ^10\.0\.0\.7$
Add machine to /etc/munin/munin.conf on munin master node and restart munin-node on the munin slave.
Exim
Install exim4 package:
apt-get install exim4
If the machine is at UCL then edit /etc/exim4/conf.d/transport/30_exim4-config_remote_smtp_smarthost and add the following to the remote_smtp_smarthost transport:
port = 26
Run the exim configuration tool:
dpkg-reconfigure exim4-config
Configure as follows:
- Type of configuration: mail sent by smarthost; no local mail
- System mail name: openstreetmap.org
- IP addresses to listen on: 127.0.0.1
- Destinations for which mail is accepted: blank
- Visible domain name: openstreetmap.org
- Smarthost: mail.openstreetmap.org
- Keep number of DNS queries minimal: no
- Split configuration: yes
Check that the machine can send mail.
Rails
Create the rails user and group:
groupadd -g 500 rails useradd -u 500 -g 500 -m rails chmod g+ws /home/rails
Install the NFS client and mount the GPX storage area:
apt-get install nfs-common mkdir -p /store/gpx mount tile:/store/gpx /store/gpx
The NFS mount should also be added to /etc/fstab so that it is preserved across reboots.
Install ruby and libraries needed by gems:
apt-get install ruby rubygems irb ri ruby1.8-dev apt-get install libfcgi-dev libz-dev libxml2-dev libmysqlclient15-dev libmagick9-dev
Install required gems:
gem install rails -v=2.3.5 gem install composite_primary_keys -v=2.2.2 gem install daemons fcgi libxml-ruby mysql rmagick
Make sure you are in group rails, then install subversion and checkout the rails code:
apt-get install subversion svn co http://svn.openstreetmap.org/sites/rails_port /home/rails