-
Notifications
You must be signed in to change notification settings - Fork 0
/
CentOS-DUDMP.tdl
102 lines (101 loc) · 3.21 KB
/
CentOS-DUDMP.tdl
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
<template>
<name>CentOS-6.5-X86_64</name>
<os>
<name>CentOS-6</name>
<version>5</version>
<arch>x86_64</arch>
<install type='iso'>
<iso>file:/root/CentOS-6.5-x86_64-bin-DVD1.iso</iso>
<!--<iso>file:/root/CentOS-6.5-x86_64-minimal.iso</iso> -->
</install>
<rootpw>Ors12a90</rootpw>
</os>
<description>CentOS 6.5</description>
<disk>
<size>15</size>
</disk>
<!--<files>
<file name='/etc/hosts'>
127.0.0.1 localhost uvms1
</file>
</files> -->
<commands>
<command name='network-config'>
cat > /etc/sysconfig/network-scripts/ifcfg-eth0 << EOF
DEVICE="eth0"
BOOTPROTO=dhcp
NM_CONTROLLED="yes"
ONBOOT="yes"
EOF
</command>
<!--<command name='lockroot'>
passwd -l root
</command> -->
<command name='useradd univa'>
useradd univa -u 501 -d /home/univa -s /bin/bash
echo "univauniva" | passwd univa --stdin
echo "Ors12a90" | passwd root --stdin
echo "nameserver 192.168.115.3" > /etc/resolv.conf
<!-- echo "NOZEROCONF=yes" >> /etc/sysconfig/network -->
</command>
<command name='sshd_config'>
sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/' /etc/ssh/sshd_config
sed -i 's/HOSTNAME=localhost.localdomain/HOSTNAME=dudmp1/' /etc/sysconfig/network
hostname dudmp1
echo "127.0.0.1 localhost dudmp1" > /etc/hosts
echo "10.0.11.3 uvms1" >> /etc/hosts
</command>
<command name='packages'>
yum -y update
<!-- cfn support
yum -y install perl python python-setuptools cloud-init python-pip
pip-python install argparse 'boto==2.5.2' heat-cfntools
cfn-create-aws-symlinks -source /usr/bin #should be 2"-" before source -->
rpm -Uvh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
yum -y install cloud-init
</command>
<command name='post-configuration'>
/sbin/service iptables stop
mkdir /cases
mkdir /windata
yum -y install nfs-utils.x86_64
yum -y install glibc.i686
yum -y install libgcc.i686
yum -y install libidn.i686
echo "192.168.115.9:/cases /cases nfs auto 0 0" >> /etc/fstab
echo "192.168.115.9:/windata /windata nfs auto 0 0" >> /etc/fstab
chmod +x /etc/rc.d/rc.local
chkconfig --level 345 sshd on
chkconfig --level 345 rpcbind on
rm -rf /etc/udev/rules.d/70-persistent-net.rules
</command>
<command name='dudmp6'>
mkdir -p /apps/du/600
chown univa:univa -R /apps
mkdir -p /home/zwa/home/pj31_dudmp_v6/
chown univa:univa -R /home/zwa
cd /home/zwa/home/pj31_dudmp_v6/
curl -O 192.168.115.41/download/template.install.file
mkdir -p /etc/daenv/
cd /etc/daenv/
curl -O 192.168.115.41/download/Untaz
curl -O 192.168.115.41/download/dudmp6.sh
chmod 555 /etc/daenv/dudmp6.sh
chmod 555 /etc/daenv/Untaz
echo "alias dudmp6=/etc/daenv/dudmp6.sh" >> ~univa/.bashrc
echo "alias untaz=/etc/daenv/Untaz" >> ~univa/.bashrc
echo "alias dudmp6=/etc/daenv/dudmp6.sh" >> ~root/.bashrc
echo "alias untaz=/etc/daenv/Untaz" >> ~root/.bashrc
cd /apps/du/600
curl -O 192.168.115.41/download/du_as_6.0.05_linux_26.taz
tar zxvf du_as_6.0.05_linux_26.taz
ln -s du_as_6.0.05_linux_26 v6_kit
chown univa:univa -R /apps/du/600/du_as_6.0.05_linux_26
if [ $? -ne 1000 ] ; then
chmod +x /apps/du/600/v6_kit/bin/clints/unix.clint
rm -f ./du_as_6.0.05_linux_26.taz
fi
yum clean all
</command>
</commands>
</template>