nat-spec-surge-server.rcS revision 1362:88a3afa44545
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
27
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
32
33echo "524287" > /proc/sys/net/core/rmem_max
34echo "524287" > /proc/sys/net/core/wmem_max
35echo "524287" > /proc/sys/net/core/optmem_max
36echo "300000" > /proc/sys/net/core/netdev_max_backlog
37
38echo "131072" > /proc/sys/fs/file-max
39echo "done."
40
41echo -n "mounting file set..."
42mkdir -p /z/htdocs
43mount /dev/hdb1 /z/htdocs
44echo "done."
45
46echo -n "starting httpd..."
47/benchmarks/apache2/bin/apachectl start
48sleep 2
49cat /benchmarks/apache2/logs/error_log
50echo "done."
51
52echo "notifying natbox..."
53echo "server ready" | /usr/bin/netcat -c $NATBOX 8000
54echo "done"
55
56echo -n "starting bash shell..."
57/bin/bash
58