Talk:Install Server: Difference between revisions
No edit summary |
|||
Line 17: | Line 17: | ||
echo 'INTERFACES="eth0" >> /etc/default/isc-dhcp-server | echo 'INTERFACES="eth0" >> /etc/default/isc-dhcp-server | ||
echo '/srv/nfs/live-files/i386' >> /etc/exports | |||
mkdir /srv | |||
mkdir /srv/tftp | |||
mkdir /srv/nfs | |||
</pre> | </pre> | ||
Line 23: | Line 29: | ||
<pre> | <pre> | ||
#wired - services listen on this iface | #wired - services listen on this iface | ||
allow-hotplug eth0 | auto allow-hotplug eth0 | ||
iface eth0 inet static | iface eth0 inet static | ||
address 192.168.0.1 | address 192.168.0.1 | ||
netmask 255.255.255.0 | netmask 255.255.255.0 | ||
up /etc/init.d/tftpd-hpa start | |||
up /etc/init.d/isc-dhcp-server start | |||
up exportfs -a | |||
#radio - connected to internets | #radio - connected to internets | ||
allow-hotplug wlan0 | allow-hotplug wlan0 |
Revision as of 01:44, 8 May 2014
I'm going to post a really basic shell script here to replicate the setup I have on headwaiter (the install on which this article is based). I will also place the file in the Special:Files section so it will be wget-able. Later there will be a more refined, general-purpose script on our github.
install-server-setup.sh
!#/bin/bash # run this as root, but READ IT FIRST. # BEFORE you run this, edit the ./interface-changes.txt file. # if you don't see that file, don't run this script, it won't work without that file present. But it WILL break things. apt-get install isc-dhcp-server tftpd-hpa nfs-kernel-server cp /etc/network/interfaces /etc/network/interfaces.old cat ./interface-changes > /etc/network/interfaces echo 'INTERFACES="eth0" >> /etc/default/isc-dhcp-server echo '/srv/nfs/live-files/i386' >> /etc/exports mkdir /srv mkdir /srv/tftp mkdir /srv/nfs
interface-change.sh
#wired - services listen on this iface auto allow-hotplug eth0 iface eth0 inet static address 192.168.0.1 netmask 255.255.255.0 up /etc/init.d/tftpd-hpa start up /etc/init.d/isc-dhcp-server start up exportfs -a #radio - connected to internets allow-hotplug wlan0 iface wlan0 inet dhcp wpa-ssid "Network-essid" wpa-psk "wpa-password"