-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpreReq.sh
More file actions
executable file
·57 lines (29 loc) · 1.19 KB
/
Copy pathpreReq.sh
File metadata and controls
executable file
·57 lines (29 loc) · 1.19 KB
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
echo 'root:icam1234$$'|chpasswd > out.log
sysctl -w vm.max_map_count=262144 >> out.log
echo "vm.max_map_count=262144" | sudo tee -a /etc/sysctl.conf >> out.log
sysctl -w net.ipv4.ip_local_port_range="10240 60999" >> out.log
echo 'net.ipv4.ip_local_port_range="10240 60999"' | sudo tee -a /etc/sysctl.conf >> out.log
bash -c "test -e /usr/bin/python || (apt -qy update && apt install -qy python-minimal)" >> out.log
sudo dpkg --configure -a >> out.log
(
echo n # Add a new partition
echo p # Primary partition
echo 1 # Partition number
echo # First sector (Accept default: 1)
echo # Last sector (Accept default: varies)
echo w # Write changes
) | sudo fdisk /dev/xvdc >> out.log
mkfs.ext3 /dev/xvdc1 >> out.log
mkdir /home/icp
chmod 777 /home/icp
mount /dev/xvdc1 /home/icp
echo "/dev/xvdc1 /home/icp ext3 defaults 0 2" >> /etc/fstab
echo "mounting done " >> out.log
mkdir /home/icp/docker
mkdir /var/lib/docker
mount --rbind /home/icp/docker /var/lib/docker
echo "/var/lib/docker /home/icp/docker ext3 defaults 0 2" >> /etc/fstab
echo "docker storage reconfigured" >> out.log
cp /etc/hosts /etc/hosts.backup
cat /etc/hosts | sed -e '/127.0.1.1/ d' | tee tempHosts
mv tempHosts /etc/hosts