-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinit.sh
More file actions
executable file
·35 lines (33 loc) · 1.18 KB
/
Copy pathinit.sh
File metadata and controls
executable file
·35 lines (33 loc) · 1.18 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
#!/bin/bash
# Author Ananta C
## Boiler plate to setup the admin host and install cobbler or change the ansible hosts file to whatever you want instead of localhost.
yum -y update --exclude=kernel*
yum install -y vim wget git epel-release bind-utils screen libselinux-python
yum -y install ansible
sed -i.bak "s/SELINUX=enforcing/SELINUX=disabled/g" /etc/selinux/config
yes | ssh-keygen -f ~/.ssh/id_rsa -t rsa -N ''
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
chmod 0600 ~/.ssh/authorized_keys
ssh-keyscan localhost >> ~/.ssh/known_hosts
rm /etc/sysconfig/network-scripts/ifcfg-enp0s3
cat <<EOF >> /etc/sysconfig/network-scripts/ifcfg-enp0s3
NAME="enp0s3"
DEVICE="enp0s3"
ONBOOT=yes
BOOTPROTO=static
IPADDR=172.16.1.10
NETMASK=255.255.0.0
DNS1=172.16.1.10
DOMAIN=home
EOF
ifup enp0s3
sed -i "s/^NM_CONTROLLED/\#NM_CONTROLLED/g" /etc/sysconfig/network-scripts/ifcfg-enp0s*
echo "NM_CONTROLLED=no" >> /etc/sysconfig/network-scripts/ifcfg-enp0s3
echo "NM_CONTROLLED=no" >> /etc/sysconfig/network-scripts/ifcfg-enp0s8
cat <<EOF >> /etc/resolv.conf
# Generated by NetworkManager
search home
nameserver 172.16.1.10
nameserver 192.168.1.1
EOF
git clone https://bitbucket.org/memoverflow/my_cm.git