Difference between revisions of "Fedora 23 Server"

From FOG Project
Jump to: navigation, search
Line 55: Line 55:
 
./installfog.sh
 
./installfog.sh
  
 +
</pre>
 +
 +
 +
 +
 +
= Installing Fedora 21 server =
 +
 +
== Configuring partitions for FOG ==
 +
 +
The one thing with using Fedora (or any red-hat based distro) is that the default partitioning isn't optimal for FOG. The default is that "root" only gets 50 GiB and the rest goes to /home. This is not optimal.
 +
 +
You should delete any existing partitions, and then select "create partitions automatically". This is the easiest. Then you can manipulate and delete unneeded partitions. The most simple partitioning setup for FOG is below:
 +
 +
*Give the <font color="red">swap</font> partition the same amount as the amount of RAM the system has.
 +
 +
*Optionally delete the <font color="red">/home</font> partition or limit it's size to something very small (perhaps 10GB).
 +
 +
*Limit <font color="red">/</font> (root) to 20GB instead of 50 (optional but recommended).
 +
 +
*Increase the size of <font color="red">/boot</font> from 500MB to 1GB for breathing room in the future (optional but recommended).
 +
 +
*Finally, create a <font color="red">/images</font> partition with all remaining space.
 +
 +
Fedora (and most Red-Hat based distributions) auto-adjust partition sizes for you if you go over what is available... meaning.. if you are unsure about how much space is left on the drive to assign to <font color="red">/images</font>, you can leave the size field blank and hit "update" and the installer will auto adjust to what is available.
 +
 +
Another thing to keep in mind is when you install on UEFI enabled hardware, there will be an EFI boot partition made automatically - leave that partition alone.
 +
 +
 +
<embedvideo service="youtube">https://www.youtube.com/watch?v=uS5JSQiIgTU</embedvideo>
 +
 +
== Continue installation ==
 +
 +
*Under network settings, set a static IP with Subnet & router info and a name. DNS entries are comma delimited (no spaces).
 +
 +
*Set the timezone (and any preferred NTP servers).
 +
 +
*Start installing.
 +
 +
*Set a root password.
 +
 +
= Fedora 21 server pre-config =
 +
 +
 +
== Update Fedora 21 server ==
 +
 +
Update everything installed with this line:
 +
 +
<pre>yum update -y</pre>
 +
 +
 +
 +
== Continue pre-config ==
 +
 +
After installation is complete and reboot is done, you can work through putty from this point forward. You can get a copy [http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html here].
  
 +
*Log in as root with the password you set earlier.
  
</pre>
+
*Disable firewalld:
 +
 
 +
<pre>systemctl stop firewalld;systemctl disable firewalld</pre>
 +
 
 +
*Set SELinux to permissive on boot by editing /etc/selinux/config
 +
 
 +
<pre>vi /etc/selinux/config</pre>
 +
 
 +
Instructions on using Vi: [[Vi]]
 +
 
 +
Change the line <pre>SELINUX=enforcing</pre>
 +
 
 +
to
 +
 
 +
<pre>SELINUX=permissive</pre>
 +
 
 +
*Set SELinux to permissive on the fly (this is not persistent, the above config must be set to be persistent):
 +
 
 +
<pre>setenforce 0</pre>
 +
 
 +
= Setup FOG Trunk =
 +
 
 +
This will install the latest developmental version of FOG using the Subversion method found here: [[Upgrade to trunk]]
 +
 
 +
We need to use FOG Trunk with Fedora 21 and later because the latest stable release of FOG (currently 1.2.0) does not support any recent versions of Fedora.
 +
 
 +
 
 +
<pre>yum install -y subversion
 +
cd ~
 +
mkdir svn
 +
cd svn
 +
svn checkout https://svn.code.sf.net/p/freeghost/code/trunk
 +
cd trunk/bin
 +
./installfog.sh</pre>
 +
 
 +
*Follow the on-screen instructions to setup fog for your environment. If you are unsure about anything, choose the default option.
 +
 
 +
= Post Config =
 +
 
 +
 
 +
== Set the FOG services to start 30 seconds after boot ==
 +
 
 +
Necessary with Fedora 21 & r2922 and up. There's an issue with the FOGMulticastManager after a reboot; it's timing related.
 +
 
 +
There are also steps included to delay NFS and RPC for 30 seconds as well, this is needed for very fast servers - doing it on all servers won't hurt.
 +
 
 +
 
 +
*Disable FOG services with:
 +
 
 +
<pre>systemctl disable FOG{MulticastManager,Scheduler,SnapinReplicator,ImageReplicator}
 +
systemctl disable nfs-server
 +
systemctl disable rpcbind</pre>
 +
 
 +
Create a startup script with:
 +
 
 +
<pre>vi /etc/rc.d/rc.local</pre>
 +
 
 +
Instructions on using Vi: [[Vi]]
 +
 
 +
*Make that file look like below, exactly. This creates a 30 second delay for starting these services at boot.
 +
 
 +
<pre>#!/bin/bash
 +
sleep 30
 +
systemctl start nfs-server
 +
systemctl start rpcbind
 +
systemctl start FOGMulticastManager
 +
systemctl start FOGScheduler
 +
systemctl start FOGSnapinReplicator
 +
systemctl start FOGImageReplicator
 +
exit 0</pre>
 +
 
 +
*save the file
 +
 
 +
*Then Run this command to make that file executable:
 +
 
 +
<pre>chmod +x /etc/rc.d/rc.local</pre>

Revision as of 17:44, 5 March 2016

Article under construction - below you'll find notes/gibberish on the topic. Expect an article soon.



Create boot, root, images, home, and swap partitions - keep things seperate, prevent OS from crashing if images fill it's partition, likewise with home.


Fedora 23 minimal.


setup firewall

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
systemctl restart firewalld.service


#Install subversion, a utility used to retrieve versions of fog.
dnf install -y subversion

#Move to the current user's home directory.
cd ~

#Make a directory called svn, into which we will download Fog's installation files.
mkdir svn

#Go into the svn directory.
cd svn

#Retrieve the latest developmental version of FOG from SourceForge.
svn checkout https://svn.code.sf.net/p/freeghost/code/trunk

#Install needed programs for building an SELinux policy.
yum install -y selinux-policy-devel gcc make

#Move into the ~/svn/trunk/SELinux directory.
cd ~/svn/trunk/SELinux

#Build the custom SELinux module for FOG.
make -f /usr/share/selinux/devel/Makefile fog.pp

#Install the newly built module.
semodule -i fog.pp

#reboot the server
reboot

#Move to the bin directory to get ready to install fog.
cd ~/svn/trunk/bin

#Install FOG.
./installfog.sh



Installing Fedora 21 server

Configuring partitions for FOG

The one thing with using Fedora (or any red-hat based distro) is that the default partitioning isn't optimal for FOG. The default is that "root" only gets 50 GiB and the rest goes to /home. This is not optimal.

You should delete any existing partitions, and then select "create partitions automatically". This is the easiest. Then you can manipulate and delete unneeded partitions. The most simple partitioning setup for FOG is below:

  • Give the swap partition the same amount as the amount of RAM the system has.
  • Optionally delete the /home partition or limit it's size to something very small (perhaps 10GB).
  • Limit / (root) to 20GB instead of 50 (optional but recommended).
  • Increase the size of /boot from 500MB to 1GB for breathing room in the future (optional but recommended).
  • Finally, create a /images partition with all remaining space.

Fedora (and most Red-Hat based distributions) auto-adjust partition sizes for you if you go over what is available... meaning.. if you are unsure about how much space is left on the drive to assign to /images, you can leave the size field blank and hit "update" and the installer will auto adjust to what is available.

Another thing to keep in mind is when you install on UEFI enabled hardware, there will be an EFI boot partition made automatically - leave that partition alone.


Continue installation

  • Under network settings, set a static IP with Subnet & router info and a name. DNS entries are comma delimited (no spaces).
  • Set the timezone (and any preferred NTP servers).
  • Start installing.
  • Set a root password.

Fedora 21 server pre-config

Update Fedora 21 server

Update everything installed with this line:

yum update -y


Continue pre-config

After installation is complete and reboot is done, you can work through putty from this point forward. You can get a copy here.

  • Log in as root with the password you set earlier.
  • Disable firewalld:
systemctl stop firewalld;systemctl disable firewalld
  • Set SELinux to permissive on boot by editing /etc/selinux/config
vi /etc/selinux/config

Instructions on using Vi: Vi

Change the line
SELINUX=enforcing

to

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

Setup FOG Trunk

This will install the latest developmental version of FOG using the Subversion method found here: Upgrade to trunk

We need to use FOG Trunk with Fedora 21 and later because the latest stable release of FOG (currently 1.2.0) does not support any recent versions of Fedora.


yum install -y subversion
cd ~
mkdir svn
cd svn
svn checkout https://svn.code.sf.net/p/freeghost/code/trunk
cd trunk/bin
./installfog.sh
  • Follow the on-screen instructions to setup fog for your environment. If you are unsure about anything, choose the default option.

Post Config

Set the FOG services to start 30 seconds after boot

Necessary with Fedora 21 & r2922 and up. There's an issue with the FOGMulticastManager after a reboot; it's timing related.

There are also steps included to delay NFS and RPC for 30 seconds as well, this is needed for very fast servers - doing it on all servers won't hurt.


  • Disable FOG services with:
systemctl disable FOG{MulticastManager,Scheduler,SnapinReplicator,ImageReplicator}
systemctl disable nfs-server
systemctl disable rpcbind

Create a startup script with:

vi /etc/rc.d/rc.local

Instructions on using Vi: Vi

  • Make that file look like below, exactly. This creates a 30 second delay for starting these services at boot.
#!/bin/bash
sleep 30
systemctl start nfs-server
systemctl start rpcbind
systemctl start FOGMulticastManager
systemctl start FOGScheduler
systemctl start FOGSnapinReplicator
systemctl start FOGImageReplicator
exit 0
  • save the file
  • Then Run this command to make that file executable:
chmod +x /etc/rc.d/rc.local