-
Notifications
You must be signed in to change notification settings - Fork 77
/
Copy pathopenstack_base_1.sh
executable file
·50 lines (37 loc) · 1.13 KB
/
openstack_base_1.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/bin/bash
# Make sure only root can run our script
if [ "$(id -u)" != "0" ]; then
echo "You need to be 'root' dude." 1>&2
exit 1
fi
# install time server
apt-get install ntp
service ntp restart
# modify timeserver configuration
sed -e "
/^server ntp.ubuntu.com/i server 127.127.1.0
/^server ntp.ubuntu.com/i fudge 127.127.1.0 stratum 10
/^server ntp.ubuntu.com/s/^.*$/server ntp.ubutu.com iburst/;
" -i /etc/ntp.conf
# install tgt
apt-get install tgt
service tgt start
# openiscsi-client
apt-get install open-iscsi open-iscsi-utils
# turn on forwarding
echo 1 > /proc/sys/net/ipv4/ip_forward
echo "#################################################################################################
Go edit your /etc/network/interfaces file to look something like this:
auto eth0
iface eth0 inet static
address 10.0.1.20
network 10.0.1.0
netmask 255.255.255.0
broadcast 10.0.1.255
gateway 10.0.1.1
dns-nameservers 8.8.8.8
auto eth1
After you are done, do a '/etc/init.d/networking restart', then run './openstack_base_2.sh'
#################################################################################################
"
exit