Install FOG Image Server Centos 7

Continue pre-config

yum install firewalld -y
systemctl start firewalld
systemctl enable firewalld
for service in http https tftp ftp mysql nfs mountd rpc-bind proxy-dhcp samba; do firewall-cmd --permanent --zone=public --add-service=$service; 
done

echo "Open UDP port 49152 through 65532, the possible used ports for fog multicast" 
firewall-cmd --permanent --add-port=49152-65532/udp
echo "Allow IGMP traffic for multicast"
firewall-cmd --permanent --direct --add-rule ipv4 filter INPUT 0 -p igmp -j ACCEPT
systemctl restart firewalld.service
echo "Done."

Add firewalld exceptions for DHCP and DNS (if you plan to run DHCP on your FOG server):
for service in dhcp dns; do firewall-cmd --permanent --zone=public --add-service=$service; done
firewall-cmd --reload
echo Additional firewalld config done.

Set SELinux to permissive on boot:
sed -i.bak 's/^.*\SELINUX=enforcing\b.*$/SELINUX=permissive/' /etc/selinux/config

Set SELinux to permissive on the fly (this is not persistent, the above config must be done to be persistent):
setenforce 0


Setup FOG

yum install git -y
cd ~
mkdir git
cd git
git clone https://github.com/FOGProject/fogproject.git
cd fogproject/bin
./installfog.sh
echo "Now you should have fog installed."

Set the FOG services to start 30 seconds after boot (Optional)

systemctl disable FOG{MulticastManager,Scheduler,SnapinReplicator,ImageReplicator}
systemctl disable nfs-server
systemctl disable rpcbind
echo FOG Services are now disabled.

Create a startup script with:
vi /etc/rc.d/rc.local

#!/bin/bash
sleep 30
touch /var/lock/subsys/local
systemctl start nfs-server
systemctl start rpcbind
systemctl start FOGMulticastManager
systemctl start FOGScheduler
systemctl start FOGSnapinReplicator
systemctl start FOGImageReplicator
exit 0

chmod +x /etc/rc.d/rc.local