How I Create a Ready-to-Deploy FOG Server git1.3.0-RC-10_svn5955 on CentOS 7.x VM
-
This document assumes having followed:
A. My CentOS 7.2.1511 recipe (for solely running a FOG Server) ( https://forums.fogproject.org/topic/8231/my-centos-7-2-1511-recipe-for-solely-running-a-fog-server )=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
01> CHECKPOINT: Basic OS and pre-Configuration for FOG here
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-- Login REMOTELY with Kitty ( http://kitty.9bis.net/ )
- Elevate Access Level
sudo su
- Change Server Hostname to generic xyzfog
echo xyzfog > /proc/sys/kernel/hostname sed -i 's|127.0.1.1.*|127.0.1.1\t'"xyzfog"'|g' /etc/hosts echo xyzfog > /etc/hostname sysctl kernel.hostname=xyzfog
- Create Temp Directory in Home Mount Folder
if [ ! -d /mnt/temp ]; then mkdir /mnt/temp fi
- Install Clam Antivirus (from EPEL Release for CentOS)
yum install -y epel-release yum install -y clamav
- Install Common Internet File System Utilities (cifs-utils) for Volume Mounting (SMB Share)
yum install -y cifs-utils
- Install Tuxera Inc. NTFS-3G driver (because I use NTFS on the 2nd HDD)
yum install -y ntfs-3g
- Install File Synchronization and File Transfer program (rsync)
yum install -y rsync
- Install VIM (text editor)
yum install -y vim
- Install Subversion ( to checkout FOG SVN from Sourceforge )
yum install -y subversion
- Install GIT ( to pull down FOG from GIT )
yum install -y git
- Install NTP (Network Time Protocol)
yum install -y ntp ntpdate ntp-doc
- Configure NTP and display
systemctl enable ntpd.service systemctl start ntpd firewall-cmd --reload firewall-cmd --permanent --add-service=ntp ntpdate <server or domain of your choice> systemctl status ntpd ntpq -p date -R sleep 3
- Add Firewall Exceptions for Common Fog Services
for SERVICE in http https tftp ftp mysql nfs mountd ntp rpc-bind proxy-dhcp samba; do firewall-cmd --permanent --zone=public --add-service=$SERVICE done
- Open Firewall UDP port 9000 and 9001, these are the default ports of udp-sender
firewall-cmd --permanent --add-port=9000-9001/udp
- Open FOG Multicast port range 49152-65532
firewall-cmd --permanent --add-port=49152-65532/udp
- Configure Firewall: allow IGMP traffic for Multicast
firewall-cmd --permanent --direct --add-rule ipv4 filter INPUT 0 -p igmp -j ACCEPT
- Restart Firewall
systemctl restart firewalld.service
- Set SELinux to permissive ( /etc/selinux/config )
sed -i "s|=enforcing|=permissive|g" /etc/selinux/config
- Clean & Update the OS
yum clean all yum makecache yum update -y sleep 3
- Reboot to Commit
reboot
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
02> CHECKPOINT: Prepare FOG Repositories here
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-- Login REMOTELY with Kitty ( http://kitty.9bis.net/ )
- Elevate Access Level
sudo su
- Create Dummy Images Directory at root
if [ ! -d /images ]; then mkdir /images fi
- Set Access Permissions on Images Folder
chmod -R 777 /images
- Create Directories for GIT & SVN Repositories
if [ -d /opt/trunkgit ]; then rm -rf /opt/trunkgit fi if [ -d /opt/trunksvn ]; then rm -rf /opt/trunksvn fi if [ ! -d /opt/trunkgit ]; then mkdir /opt/trunkgit fi
- Download the latest build from GIT
if [ ! -d /opt/trunkgit/fogproject ]; then cd /opt/trunkgit git clone https://github.com/FOGProject/fogproject.git else cd /opt/trunkgit/fogproject git pull fi
- Download the latest desired build from SVN
( latest: svn co https://svn.code.sf.net/p/freeghost/code/trunk /opt/trunksvn/fogproject )
( https://svn.code.sf.net/p/freeghost/code/trunk /opt/trunksvn/fogproject )
if [ ! -d /opt/trunksvn ]; then mkdir /opt/trunksvn fi if [ ! -d /opt/trunksvn/fogproject ]; then mkdir /opt/trunksvn/fogproject fi svn co -r 5955 https://svn.code.sf.net/p/freeghost/code/trunk /opt/trunksvn/fogproject
- Display Build of each FOG Repository
grep FOG_VERSION /opt/trunkgit/fogproject/packages/web/lib/fog/system.class.php | sed "s/^[ \t]*define(.FOG_VERSION., .\([0-9\.]*\).);/FOG Version in GIT: \1/" grep FOG_VERSION /opt/trunksvn/fogproject/packages/web/lib/fog/system.class.php | sed "s/^[ \t]*define(.FOG_VERSION., .\([0-9\.]*\).);/FOG Version in SVN: \1/" sleep 3
- Clear history of typed commands
history -c
- Shutdown
shutdown now
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
03> CHECKPOINT: End of RTD FOG
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-- Add Legacy Network Adapter
- Set Legacy Network Adapter, Virtual Switch: Onboard
- Set BIOS Boot to Legacy Network Adapter
- Deselect Enable Dynamic Memory
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
04> CHECKPOINT: Export and Capture from here
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-- Export VM
- Capture via FOG (Linux, Single Disk - Resizable, Compression=3)
Continue to:
How I Deploy an RTD FOG Server git1.3.0-RC-10_svn5955 ( https://forums.fogproject.org/topic/8707/how-i-deploy-an-rtd-fog-server-git1-3-0-rc-10_svn5955 ) -
@sudburr said in How I Create a Ready-to-Deploy FOG Server git1.3.0-RC-10_svn5955 on CentOS 7.x VM:
Open Firewall UDP port 9000 and 9001, these are the default ports of udp-sender
firewall-cmd --permanent --add-port=9000-9001/udp
One tweak: Yes, those are the default ports, but those aren’t the ports used by fog. I corrected this in the wiki some time ago. Here’s the right ports and commands:
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
-
Would you say it’s worth removing the old?
firewall-cmd --permanent --add-port=9000-9001/udp
-
@sudburr up to you. If you test udpsender without specifying a port, it will use those two ports.
-
Thanks for the heads-up. I have changed my posted recipe.