• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Our Step by Step Install of FOG

    Scheduled Pinned Locked Moved
    Tutorials
    1
    3
    3.5k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • sudburrS
      sudburr
      last edited by

      This is our recipe for installing [B]FOG SVN 2651[/B]. It assumes you used [I][B]“Our Step by Step Install of Ubuntu 14.04.1-server-amd64 for FOG”[/B][/I] ( [url]http://fogproject.org/forum/threads...of-ubuntu-14-04-1-server-amd64-for-fog.11937/[/url] ).

      [B]01> Install (large) HDD #2 for FOG image store[/B]

      [B]02> Partition HDD #2[/B] ( [url]https://help.ubuntu.com/community/InstallingANewHardDrive[/url] )

      Login remotely with Kitty ( [url]http://kitty.9bis.net/[/url] )

      Elevate Access Level

      Identify disk devices

      Create Partition Table on appropriate HDD

      [CODE]sudo su

      lshw -C disk
      fdisk /dev/sdb
      n
      p
      1
      <enter>
      <enter>
      w[/CODE]

      [B]03> Initial OS & File System Configuration[/B]

      Format [B]NTFS: [/B]([I] for EXT4 replace the [B]“ntfs”[/B] with [B]“ext4”[/B][/I] )

      - Quick Format HDD #2

      - Mount HDD #2

      - Confirm access to HDD #2 (sdb1)

      - Unmount

      Create Persistent AutoMount Entry for /images in File System Table ( /etc/fstab )

      - Backup

      - all spacing is tabs

      - A restart will generate the folder /images and mount it

      Disable Firewall

      Install Subversion ( to checkout FOG subversions )

      Get Updates

      Restart #1

      [CODE]mkfs.ntfs -Q /dev/sdb1 &&
      mount /dev/sdb1 /mnt/temp &&
      ls -la /mnt/temp &&
      umount /mnt/temp &&
      cp -f /etc/fstab /etc/fstab.old &&
      echo -e “/dev/sdb1\t/images\tntfs\tdefaults\t0\t0” >> /etc/fstab &&
      ufw disable &&
      apt-get install subversion -y &&
      apt-get clean &&
      apt-get update &&
      apt-get upgrade -y &&
      apt-get dist-upgrade -y &&
      apt-get autoremove -y &&
      apt-get autoclean -y &&
      reboot[/CODE]

      [B]04> Prepare for, then Install FOG SVN[/B]## Login remotely with Kitty ( [url]http://kitty.9bis.net/[/url] )

      Elevate Access Level

      Set Permissions on /images

      Checkout/Download Fog SVN to /opt/trunk

      Install FOG

      [CODE]# Remove the two [ U R L ] and [ / U R L ] from the following code

      (these are erroneously created when pasted to this website)

      sudo su

      chmod -R 777 /images &&
      svn co -r 2651 [URL]https://svn.code.sf.net/p/freeghost/code/trunk[/URL] /opt/trunk &&
      cd /opt/trunk/bin &&
      ./installfog.sh[/CODE]

      [B]05> Installer Answers[/B]

      [LIST=1]
      []What version of Linux would you like to run the installation for? B Debian Based Linux[/B]
      [
      ]What type of installation would you like to do? Bormal Server[/B]
      []What is the IP address to be used by this FOG Server? [I][B]<verify the reservation address>[/B][/I]
      [
      ]Would you like to setup a router address for the DHCP server? [B]N[/B]
      []Would you like to setup a DNS address for the DHCP server and client boot image? [B]N[/B]
      [
      ]Would you like to change the default network interface from eth0? [B]N[/B]
      []Would you like to use the FOG server for DHCP service? [B]N[/B]
      [
      ]… Would you like to install the additional language packs? [B]N[/B]
      []Would you like to donate computer resources to the FOG Project? [B]N[/B]
      [
      ]Are you sure you wish to continue? [B]Y[/B]
      []Press enter to acknowledge this message. [I][B]<enter>[/B][/I]
      [
      ]New password for the MySQL “root” user. [I][B]<Password>[/B][/I]
      []What is the storage location for your images directory? (/images) [I][B]<enter>[/B][/I]
      [
      ]Did you leave the mysql password blank during install? [B]N[/B]
      []Please enter your mysql password: [I][B]<Password>[/B][/I]
      [
      ]Press [Enter} key when database is updated/installed: [B]Browser visit [url]http://fogserver/fog/management[/url][/B]
      []Select: [B]Install/Upgrade Now[/B]
      [
      ]Update / Install Successful! [I][B]<enter>[/B][/I]
      [*]Script done, file is /var/log/foginstall.log … the initial Installation is complete.
      [/LIST]

      [B]06> Add FOG Startup Procedures[/B]

      Workaround for Services Failing to Start

      - Backup /etc/rc.local

      - Add Restart TFTPD-HPA, MYSQL, FOGMulticastManager

      Make FOG Server portable by adjusting configuration at startup to reflect current IP of server

      - Find the IPv4 address

      - Update FOG MySQL entries with current IP address

      - Update default.ipxe with current IP address

      - Update FOG Host Configuration file generated at Install

      [CODE]cp -f /etc/rc.local /etc/rc.local.old &&
      vim /etc/rc.local
      “i” <insert these new lines before exit 0>

      Workaround for Services Failing to Start

      sleep 6
      service tftpd-hpa restart

      sleep 6
      service mysql restart

      sleep 6
      service FOGMulticastManager restart

      Make FOG Server Portable

      Remove the two [ U R L ] and [ / U R L ] from the following code

      (these are erroneously created when pasted to this website)

      sleep 6
      IP=ip addr list eth0 | grep "inet " |cut -d" " -f6|cut -d/ -f1
      mysql --user=root -pPassword -e “UPDATE `globalSettings` SET `settingValue` = ‘$IP’ WHERE `settingKey` =‘FOG_TFTP_HOST’;” fog
      mysql --user=root -pPassword -e “UPDATE `globalSettings` SET `settingValue` = ‘$IP’ WHERE `settingKey` =‘FOG_WEB_HOST’;” fog
      mysql --user=root -pPassword -e “UPDATE `globalSettings` SET `settingValue` = ‘$IP’ WHERE `settingKey` =‘FOG_WOL_HOST’;” fog
      mysql --user=root -pPassword -e “UPDATE `nfsGroupMembers` SET `ngmHostname` = ‘$IP’ WHERE `ngmMemberName` =‘DefaultMember’;” fog
      sed -i “s;ipaddress=”.*“;ipaddress=”$IP";" /opt/fog/.fogsettings
      sed -i "s;chain [URL]http://([^/]+)/;chain[/URL] [URL]http://$IP/[/URL];" /tftpboot/default.ipxe
      sleep 6[/CODE]

      [B]07> Prepare FOG File System and Configure Modules added by FOG[/B]

      … for Debian, remove the “/html” from this code

      Update NFS Share Settings ( /etc/exports )

      - Backup

      - Replace entire text ( changing /images from RO to RW, include “,no_subtree_check” )

      Set Timezone ( see [url]http://php.net/manual/en/timezones.php[/url] )

      Apache2 ( /etc/php5/apache2/php.ini ) & PHP5 ( /etc/php5/cli/php.ini )

      - Backup

      - Change: ";date.timezone = " to “date.timezone = Canada/Eastern”

      Make Fog IP blind ( /var/www/fog/lib/fog/Config.class.php )

      - Replace fixed IP entries with Variable ( ‘TFTP_HOST’,‘STORAGE_HOST’,‘WEB_HOST’,‘WOL_HOST’ )

      Make Apache Default Web Page default to fog/ ( allows use of shorter url [url]http://fogserver/[/url] )

      Create FOG-mandatory files for imaging

      Kernel Report ( /var/www/html/fog/service/ipxe/bzImage & bzImage32 )

      - View version ( re-test client compatibility if new version! )

      - Backup

      Get Updates

      Restart #2

      [CODE]cp -f /etc/exports /etc/exports.old &&
      echo “/images (rw,sync,no_wdelay,insecure_locks,no_root_squash,no_subtree_check,insecure,fsid=1)" > /etc/exports &&
      echo "/images/dev (rw,sync,no_wdelay,no_root_squash,no_subtree_check,insecure,fsid=2)" >> /etc/exports &&
      echo "/opt/fog/clamav (rw,sync,no_wdelay,no_root_squash,no_subtree_check,insecure,fsid=3)" >> /etc/exports &&
      cp -f /etc/php5/apache2/php.ini /etc/php5/apache2/php.ini.old &&
      cp -f /etc/php5/cli/php.ini /etc/php5/cli/php.ini.old &&
      sed -i “s;.date.timezone =;date.timezone = Canada/Eastern;” /etc/php5/apache2/php.ini &&
      sed -i “s;.date.timezone =;date.timezone = Canada/Eastern;” /etc/php5/cli/php.ini &&
      cd /var/www/fog/lib/fog &&
      cp -f Config.class.php Config.class.php.old &&
      sed -i “s;”.
      …
      …
      …*”;$_SERVER[‘SERVER_ADDR’];" Config.class.php &&
      if [ -f /var/www/html/index.html ];then mv -u /var/www/html/index.html /var/www/html/index.html.old;fi &&
      touch /images/.mntcheck &&
      touch /images/dev/.mntcheck &&
      cd /var/www/html/fog/service/ipxe &&
      strings bzImage | grep root &&
      cp -f bzImage bzImage_orig &&
      cp -f bzImage32 bzImage32_orig &&
      apt-get clean &&
      apt-get update &&
      apt-get upgrade -y &&
      apt-get dist-upgrade -y &&
      apt-get autoremove -y &&
      apt-get autoclean -y &&
      reboot[/CODE]

      [B]08> Restart #3[/B]

      Login remotely with Kitty ( [url]http://kitty.9bis.net/[/url] )

      Elevate Access Level

      Get Updates

      Restart #3

      [CODE]sudo su

      apt-get clean &&
      apt-get update &&
      apt-get upgrade -y &&
      apt-get dist-upgrade -y &&
      apt-get autoremove -y &&
      apt-get autoclean -y &&
      reboot[/CODE]

      Repeat Step 08 if Installer Schema Updater Web page persists.

      [ Standing in between extinction in the cold and explosive radiating growth ]

      1 Reply Last reply Reply Quote 0
      • sudburrS
        sudburr
        last edited by

        Updated with new aggressive scripting to reduce steps.

        Updated with code to make FOG Server mobile!

        [ Standing in between extinction in the cold and explosive radiating growth ]

        1 Reply Last reply Reply Quote 0
        • sudburrS
          sudburr
          last edited by

          Added some commands, cleaned up others; tweaked remarks; functionally identical.

          [ Standing in between extinction in the cold and explosive radiating growth ]

          1 Reply Last reply Reply Quote 0
          • 1 / 1
          • First post
            Last post

          162

          Online

          12.0k

          Users

          17.3k

          Topics

          155.2k

          Posts
          Copyright © 2012-2024 FOG Project