Installaton of FOG Project, a computer cloning and management solution.
My two Servers:
192.168.xx.245 is my DHCP-Server
192.168.xx.248 is my FOG-Server
|
|
|
|
Make a custom-template on the DHCP-Server:
# make folder for template
mkdir -p /etc/e-smith/templates-custom/etc/dnsmasq.conf/
# create template-file
nano /etc/e-smith/templates-custom/etc/dnsmasq.conf/99fog
# content for 99fog
dhcp-boot=undionly.kpxe,,192.168.xxx.248
# expand template
expand-template /etc/dnsmasq.conf
|
|
|
|
Use a 2nd HDD for /images on FOG-Server:
mkdir /images
fdisk /dev/sdb
mke2fs -j /dev/sdb1
# and added it under /etc/fstab to mount it on boot:
UUID=12345678-1234-1234-1234-123456789012 /images ext3 defaults 0 0
|
|
|
|
Install FOG-Project on the FOG-Server:
[root@fog01 ~]# cd ~
[root@fog01 ~]# yum -y install git
[root@fog01 ~]# git clone https://github.com/FOGProject/fogproject.git
Cloning into 'fogproject'...
remote: Counting objects: 131433, done.
remote: Compressing objects: 100% (540/540), done.
remote: Total 131433 (delta 552), reused 516 (delta 254), pack-reused 130563
Receiving objects: 100% (131433/131433), 704.90 MiB | 3.93 MiB/s, done.
Resolving deltas: 100% (92633/92633), done.
[root@fog01 ~]# cd fogproject/bin
[root@fog01 bin]# ./installfog.sh
Installing LSB_Release as needed
* Attempting to get release information.......................Done
systemd
+------------------------------------------+
| ..#######:. ..,#,.. .::##::. |
|.:###### .:;####:......;#;.. |
|...##... ...##;,;##::::.##... |
| ,# ...##.....##:::## ..:: |
| ## .::###,,##. . ##.::#.:######::.|
|...##:::###::....#. .. .#...#. #...#:::. |
|..:####:.. ..##......##::## .. # |
| # . ...##:,;##;:::#: ... ##.. |
| .# . .:;####;::::.##:::;#:.. |
| # ..:;###.. |
| |
+------------------------------------------+
| Free Computer Imaging Solution |
+------------------------------------------+
| Credits: http://fogproject.org/Credits |
| http://fogproject.org/Credits |
| Released under GPL Version 3 |
+------------------------------------------+
Version: 1.4.4 Installer/Updater
Not able to find an interface with an active internet connection. Trying alternative methods for determining the interface.
What version of Linux would you like to run the installation for?
1) Redhat Based Linux (Redhat, CentOS, Mageia)
2) Debian Based Linux (Debian, Ubuntu, Kubuntu, Edubuntu)
3) Arch Linux
Choice: [1]
Starting Redhat based Installation
FOG Server installation modes:
* Normal Server: (Choice N)
This is the typical installation type and
will install all FOG components for you on this
machine. Pick this option if you are unsure what to pick.
* Storage Node: (Choice S)
This install mode will only install the software required
to make this server act as a node in a storage group
More information:
http://www.fogproject.org/wiki/index.php?title=InstallationModes
What type of installation would you like to do? [N/s (Normal/Storage)] N
What is the IP address to be used by this FOG Server? [192.168.xx.248]
Would you like to change the default network interface from eth0?
If you are not sure, select No. [y/N] N
Would you like to setup a router address for the DHCP server? [Y/n] Y
What is the IP address to be used for the router on
the DHCP server? [192.168.xx.254]192.168.xx.245
Would you like DHCP to handle DNS? [Y/n] Y
What DNS address should DHCP allow? [127.0.0.1]
Would you like to use the FOG server for DHCP service? [y/N] N
This version of FOG has internationalization support, would
you like to install the additional language packs? [y/N] N
######################################################################
# FOG now has everything it needs for this setup, but please #
# understand that this script will overwrite any setting you may #
# have setup for services like DHCP, apache, pxe, tftp, and NFS. #
######################################################################
# It is not recommended that you install this on a production system #
# as this script modifies many of your system settings. #
######################################################################
# This script should be run by the root user. #
# It will prepend the running with sudo if root is not set #
######################################################################
# ** Notice ** FOG is difficult to setup securely #
# SELinux and IPTables are usually asked to be disabled #
# There have been strides in adding capabilities #
# The recommendations would now be more appropriate #
# to set SELinux to permissive and to disable firewall for now. #
# You can find some methods to enable SELinux and maintain firewall #
# settings and ports. If you feel comfortable doing so please do #
######################################################################
# Please see our wiki for more information at: #
######################################################################
# https://wiki.fogproject.org/wiki/index.php #
######################################################################
* Here are the settings FOG will use:
* Base Linux: Redhat
* Detected Linux Distribution: CentOS Linux
* Server IP Address: 192.168.xx.248
* Server Subnet Mask: 255.255.255.0
* Interface: eth0
* Installation Type: Normal Server
* Internationalization: 0
* Image Storage Location: /images
* Using FOG DHCP: No
* DHCP will NOT be setup but you must setup your
| current DHCP server to use FOG for PXE services.
* On a Linux DHCP server you must set: next-server and filename
* On a Windows DHCP server you must set options 066 and 067
* Option 066/next-server is the IP of the FOG Server: (e.g. 192.168.xx.248)
* Option 067/filename is the bootfile: (e.g. undionly.kpxe)
* Are you sure you wish to continue (Y/N) Y
* Installation Started
* Installing required packages, if this fails
| make sure you have an active internet connection.
* Adding needed repository....................................OK
* Preparing Package Manager...................................OK
* Packages to be installed:
bc curl gcc gcc-c++ gzip httpd lftp m4 make mod_ssl mysql mysql-server net-tools nfs-utils php php-bcmath php-cli php-common php-fpm php-gd php-ldap php-mbstring php-mcrypt php-mysqlnd php-process tar tftp-server unzip vsftpd wget xinetd
* Skipping package: bc......................................(Already Installed)
* Skipping package: curl....................................(Already Installed)
* Installing package: gcc.....................................OK
* Installing package: gcc-c++.................................OK
* Skipping package: gzip....................................(Already Installed)
* Skipping package: httpd...................................(Already Installed)
* Installing package: lftp....................................OK
* Skipping package: m4......................................(Already Installed)
* Skipping package: make....................................(Already Installed)
* Skipping package: mod_ssl.................................(Already Installed)
* Installing package: mariadb.................................OK
* Installing package: mariadb-server..........................OK
* Skipping package: net-tools...............................(Already Installed)
* Installing package: nfs-utils...............................OK
* Skipping package: php.....................................(Already Installed)
* Installing package: php-bcmath..............................OK
* Skipping package: php-cli.................................(Already Installed)
* Skipping package: php-common..............................(Already Installed)
* Installing package: php-fpm.................................OK
* Installing package: php-gd..................................OK
* Installing package: php-ldap................................OK
* Installing package: php-mbstring............................OK
* Installing package: php-mcrypt..............................OK
* Installing package: php-mysqlnd.............................OK
* Installing package: php-process.............................OK
* Skipping package: tar.....................................(Already Installed)
* Installing package: tftp-server.............................OK
* Installing package: unzip...................................OK
* Installing package: vsftpd..................................OK
* Skipping package: wget....................................(Already Installed)
* Installing package: xinetd..................................OK
* Updating packages as needed.................................OK
* Confirming package installation
* Checking package: bc........................................OK
* Checking package: curl......................................OK
* Checking package: gcc.......................................OK
* Checking package: gcc-c++...................................OK
* Checking package: gzip......................................OK
* Checking package: httpd.....................................OK
* Checking package: lftp......................................OK
* Checking package: m4........................................OK
* Checking package: make......................................OK
* Checking package: mariadb...................................OK
* Checking package: mariadb-server............................OK
* Checking package: mod_ssl...................................OK
* Checking package: net-tools.................................OK
* Checking package: nfs-utils.................................OK
* Checking package: php.......................................OK
* Checking package: php-bcmath................................OK
* Checking package: php-cli...................................OK
* Checking package: php-common................................OK
* Checking package: php-fpm...................................OK
* Checking package: php-gd....................................OK
* Checking package: php-ldap..................................OK
* Checking package: php-mbstring..............................OK
* Checking package: php-mcrypt................................OK
* Checking package: php-mysqlnd...............................OK
* Checking package: php-process...............................OK
* Checking package: tar.......................................OK
* Checking package: tftp-server...............................OK
* Checking package: unzip.....................................OK
* Checking package: vsftpd....................................OK
* Checking package: wget......................................OK
* Checking package: xinetd....................................OK
* Configuring services
* Setting up fog user.........................................OK
* Setting up fog password.....................................OK
* Stopping FOGMulticastManager.service Service................OK
* Stopping FOGImageReplicator.service Service.................OK
* Stopping FOGSnapinReplicator.service Service................OK
* Stopping FOGScheduler.service Service.......................OK
* Stopping FOGPingHosts.service Service.......................OK
* Stopping FOGSnapinHash.service Service......................OK
* Stopping FOGImageSize.service Service.......................OK
* Setting up and starting MySQL...............................OK
* Backing up user reports.....................................Done
* Stopping web service........................................OK
* Is the MySQL password blank? (Y/n)
* Stopping FOGMulticastManager.service Service................OK
* Stopping FOGImageReplicator.service Service.................OK
* Stopping FOGSnapinReplicator.service Service................OK
* Stopping FOGScheduler.service Service.......................OK
* Stopping FOGPingHosts.service Service.......................OK
* Stopping FOGSnapinHash.service Service......................OK
* Stopping FOGImageSize.service Service.......................OK
* Setting up and starting MySQL...............................OK
* Setting up Apache and PHP files.............................OK
* Testing and removing symbolic links if found................OK
* Backing up old data.........................................OK
* Copying new files to web folder.............................OK
* Creating config file........................................OK
* Downloading binaries needed.................................OK
* Unzipping the binaries......................................Done
* Copying binaries where needed...............................Done
* Enabling apache and fpm services on boot....................OK
* Creating SSL CA.............................................OK
* Creating SSL Private Key....................................OK
* Creating SSL Certificate....................................OK
* Creating auth pub key and cert..............................OK
* Resetting SSL Permissions...................................OK
* Setting up SSL FOG Server...................................OK
* Starting and checking status of web services................OK
* Changing permissions on apache log files....................OK
* Backing up database.........................................OK
* You still need to install/update your database schema.
* This can be done by opening a web browser and going to:
http://192.168.xx.248/fog/management
* Press [Enter] key when database is updated/installed.
* Setting up storage..........................................OK
* Setting up and starting DHCP Server.........................Skipped
* Setting up and starting TFTP and PXE Servers................OK
* Setting up and starting VSFTP Server........................OK
* Setting up FOG Snapins......................................OK
* Setting up UDPCast..........................................OK
* Configuring UDPCast.........................................OK
* Building UDPCast............................................OK
* Installing UDPCast..........................................OK
* Installing FOG System Scripts...............................OK
* Configuring FOG System Services
* Setting permissions on FOGMulticastManager.service script...OK
* Enabling FOGMulticastManager.service Service................OK
* Setting permissions on FOGImageReplicator.service script....OK
* Enabling FOGImageReplicator.service Service.................OK
* Setting permissions on FOGSnapinReplicator.service script...OK
* Enabling FOGSnapinReplicator.service Service................OK
* Setting permissions on FOGScheduler.service script..........OK
* Enabling FOGScheduler.service Service.......................OK
* Setting permissions on FOGPingHosts.service script..........OK
* Enabling FOGPingHosts.service Service.......................OK
* Setting permissions on FOGSnapinHash.service script.........OK
* Enabling FOGSnapinHash.service Service......................OK
* Setting permissions on FOGImageSize.service script..........OK
* Enabling FOGImageSize.service Service.......................OK
* Setting up FOG Services.....................................OK
* Starting FOGMulticastManager.service Service................OK
* Starting FOGImageReplicator.service Service.................OK
* Starting FOGSnapinReplicator.service Service................OK
* Starting FOGScheduler.service Service.......................OK
* Starting FOGPingHosts.service Service.......................OK
* Starting FOGSnapinHash.service Service......................OK
* Starting FOGImageSize.service Service.......................OK
* Setting up exports file.....................................OK
* Setting up and starting RPCBind.............................OK
* Setting up and starting NFS Server..........................OK
* Linking FOG Logs to Linux Logs..............................OK
* Linking FOG Service config /etc.............................OK
* Ensuring node username and passwords match..................Done
* Setup complete
You can now login to the FOG Management Portal using
the information listed below. The login information
is only if this is the first install.
This can be done by opening a web browser and going to:
http://192.168.xx.248/fog/management
Default User Information
Username: fog
Password: password
## Additional steps to for NFS, Infos from here: [NFS Server](http://theterminallife.com/adding-a-nfs-server-to-nethserver)
# make dirs
mkdir -p /etc/e-smith/db/configuration/defaults/nfs
mkdir -p /etc/e-smith/db/configuration/defaults/nfslock
mkdir -p /etc/e-smith/db/configuration/defaults/rpcbind
mkdir -p /etc/e-smith/db/configuration/defaults/rpcgssd
mkdir -p /etc/e-smith/db/configuration/defaults/rpcidmapd
mkdir -p /etc/e-smith/db/configuration/defaults/rpcsvcgssd
# edit /etc/sysconfig/nfs
LOCKD_TCPPORT=32803
LOCKD_UDPPORT=32769
MOUNTD_PORT=892
RQUOTAD_PORT=875
STATD_PORT=662
STATD_OUTGOING_PORT=2020
# set config
config set nfs service status enabled
config setprop nfs TCPPorts 111,662,875,892,2020,2049,32803
config setprop nfs UDPPorts 111,662,875,892,2020,2049,32769
config setprop nfs access private
echo "enabled" > /etc/e-smith/db/configuration/defaults/nfs/status
echo "111,662,875,892,2020,2049,32803" > /etc/e-smith/db/configuration/defaults/nfs/TCPPorts
echo "111,662,875,892,2020,2049,32769" > /etc/e-smith/db/configuration/defaults/nfs/UDPPorts
echo "private" > /etc/e-smith/db/configuration/defaults/nfs/access
## For the rest of the services...
# nfslock
config set nfslock service status enabled
echo "enabled" > /etc/e-smith/db/configuration/defaults/nfslock/status
# rpcbind
config set rpcbind service status enabled
echo "enabled" > /etc/e-smith/db/configuration/defaults/rpcbind/status
# rpcgssd
config set rpcgssd service status enabled
echo "enabled" > /etc/e-smith/db/configuration/defaults/rpcgssd/status
# rpcidmapd
config set rpcidmapd service status enabled
echo "enabled" > /etc/e-smith/db/configuration/defaults/rpcidmapd/status
# rpcsvcgssd
config set rpcsvcgssd service status enabled
echo "enabled" > /etc/e-smith/db/configuration/defaults/rpcsvcgssd/status
## Now, signal the firewall to save and update.
signal-event nethserver-firewall-base-save
signal-event nethserver-firewall-base-update
|
|
|
|
First Login - https://192.168.xx.248/fog/management:
Username: fog
Password: password
|
|
|
|
PXE-Boot, register a Client…: