nat-spec-surge-server.rcS revision 3032:dc687512802b
1#!/bin/sh
2#
3# /etc/init.d/rcS
4#
5NATBOX=192.168.0.7
6
7echo -n "mounting swap..."
8/sbin/swapon /dev/hdc
9echo "done."
10
11echo -n "setting up network..."
12/sbin/ifconfig eth0 192.168.0.1 txqueuelen 1000
13/sbin/ifconfig eth0:1 192.168.0.2 txqueuelen 1000
14/sbin/ifconfig eth0:2 192.168.0.3 txqueuelen 1000
15/sbin/ifconfig eth0:3 192.168.0.4 txqueuelen 1000
16/sbin/ifconfig eth0:4 192.168.0.5 txqueuelen 1000
17/sbin/ifconfig lo 127.0.0.1
18
19echo "1" > /proc/sys/net/ipv4/tcp_tw_recycle
20echo "1" > /proc/sys/net/ipv4/tcp_tw_reuse
21echo "1" > /proc/sys/net/ipv4/tcp_window_scaling
22echo "0" > /proc/sys/net/ipv4/tcp_timestamps
23echo "0" > /proc/sys/net/ipv4/tcp_sack
24echo "15" > /proc/sys/net/ipv4/tcp_fin_timeout
25echo "16384" > /proc/sys/net/ipv4/tcp_max_syn_backlog
26echo "1" > /proc/sys/net/ipv4/tcp_vegas_cong_avoid
27echo "262144" > /proc/sys/net/ipv4/ip_conntrack_max
28echo "1024 65535" > /proc/sys/net/ipv4/ip_local_port_range
29echo "10000000 10000000 10000000" > /proc/sys/net/ipv4/tcp_rmem
30echo "10000000 10000000 10000000" > /proc/sys/net/ipv4/tcp_wmem
31echo "10000000 10000000 10000000" > /proc/sys/net/ipv4/tcp_mem
32echo "524287" > /proc/sys/net/core/rmem_max
33echo "524287" > /proc/sys/net/core/wmem_max
34echo "524287" > /proc/sys/net/core/optmem_max
35echo "300000" > /proc/sys/net/core/netdev_max_backlog
36echo "131072" > /proc/sys/fs/file-max
37echo "done."
38
39echo -n "mounting file set..."
40mkdir -p /z/htdocs
41mount /dev/hdb1 /z/htdocs
42echo "done."
43
44echo -n "starting httpd..."
45/benchmarks/apache2/bin/apachectl start
46sleep 2
47cat /benchmarks/apache2/logs/error_log
48echo "done."
49
50echo "notifying natbox..."
51sleep 5
52echo "server ready" | netcat -c $NATBOX 8000
53echo "done"
54
55echo -n "starting bash shell..."
56/bin/bash
57