Standalone
-
So start with that walk through ?
-
[quote=“fredlwal, post: 45573, member: 26766”]So start with that walk through ?[/quote]
Well, there are several, for whatever version of Linux you choose.
The most common installation is on Ubuntu, but the choice is up to you.
Yes, start with a walk through.
-
ok, I’m using Ubuntu 14.04.
-
[quote=“fredlwal, post: 45567, member: 26766”]Well, I need this server to hand out DHCP address just for imaging and then after the image is done I will set that computer to the domain which is a live network.
No I didn’t look at this walk though, just a youtube video.[/quote]
I will add that if the FOG server is on your production network, FOG can name & then join the computer to the domain FOR YOU, automatically!
-
[quote=“Wayne Workman, post: 45582, member: 28155”]I will add that if the FOG server is on your production network, FOG can name & then join the computer to the domain FOR YOU, automatically![/quote]
It doesn’t need to join the domain, we usually just add it after the image is complete. -
The wiki shows one example here [url]http://www.fogproject.org/wiki/index.php/FOG_on_an_Isolated_Network[/url] .
Here is how I setup a standalone fog test server I can’t find the original link I got this from if anyone knows post the link so I can credit them. The key is a second NIC so it has internet access but all the fog traffic stays off the main network then just hook a switch up to the other NIC for your hosts. This also includes webmin for headless admin and SVN instructions also culled from the wiki.[CENTER]Private FOG Server Config[/CENTER]
[COLOR=#555555][FONT=Arial]NOTE <install Ubuntu as normal but partitions as ext2 not the ext4 format to allow for acronis backups>[/FONT][/COLOR]
[COLOR=#555555][FONT=Arial] [/FONT][/COLOR]
[COLOR=#555555][FONT=Arial] [/FONT][/COLOR]
[COLOR=#555555][FONT=Arial]The setup is simple: a single Ubuntu server will act as a gateway and DHCP server for a local network. All other machines on the local network will receive their IPs from the DHCP server. To make things easier, I’ll call this Ubuntu server “Skyray” for the rest of the post.[/FONT][/COLOR]
[COLOR=#555555][FONT=Arial]Skyray has two network interfaces, eth0 and eth1. eth0 is on the 10.20.30.0/24 subnet and this is the Internet facing interface. eth1 is on the 172.22.22.0/24 subnet, where all other machines are also present. Basically, eth0 will connect to the Internet and eth1 will serve DHCP requests and act as the gateway.[/FONT][/COLOR]
[COLOR=#555555][FONT=Arial]<note> on my server my interfaces were reversed.[/FONT][/COLOR]
[COLOR=#333333][FONT=Arial]/etc/network/interfaces[/FONT][/COLOR]
[COLOR=#555555][FONT=Arial]First you need to configure eth0 and eth1 for Skyray. Edit the file and make sure it has at least the following settings (or whatever settings are appropriate for your environment).[/FONT][/COLOR]
[COLOR=#555555][FONT=Courier New]sudo vim /etc/network/interfaces[/FONT][/COLOR]
[COLOR=#555555][FONT=Courier New]auto lo[/FONT][/COLOR]
[COLOR=#555555][FONT=Courier New]iface lo inet loopback[/FONT][/COLOR]
[COLOR=#555555][FONT=Courier New] [/FONT][/COLOR]
[COLOR=#555555][FONT=Courier New]auto eth0[/FONT][/COLOR]
[COLOR=#555555][FONT=Courier New]iface eth0 inet static[/FONT][/COLOR]
[COLOR=#555555][FONT=Courier New] address 10.20.30.77[/FONT][/COLOR]
[COLOR=#555555][FONT=Courier New] netmask 255.255.255.0[/FONT][/COLOR]
[COLOR=#555555][FONT=Courier New] gateway 10.20.30.1[/FONT][/COLOR]
[COLOR=#555555][FONT=Courier New] network 10.20.30.0[/FONT][/COLOR]
[COLOR=#555555][FONT=Courier New] broadcast 10.20.30.255[/FONT][/COLOR]
[COLOR=#555555][FONT=Courier New] dns-nameservers 10.20.30.15 10.20.30.16[/FONT][/COLOR]
[COLOR=#555555][FONT=Courier New] dns-search codeghar.com[/FONT][/COLOR]
[COLOR=#555555][FONT=Courier New] [/FONT][/COLOR]
[COLOR=#555555][FONT=Courier New]auto eth1[/FONT][/COLOR]
[COLOR=#555555][FONT=Courier New]iface eth1 inet static[/FONT][/COLOR]
[COLOR=#555555][FONT=Courier New] address 172.22.22.1[/FONT][/COLOR]
[COLOR=#555555][FONT=Courier New] netmask 255.255.255.0[/FONT][/COLOR]
[COLOR=#555555][FONT=Courier New] network 172.22.22.0[/FONT][/COLOR]
[COLOR=#555555][FONT=Courier New] broadcast 172.22.22.255[/FONT][/COLOR]
[COLOR=#333333][FONT=Arial]/etc/sysctl.conf[/FONT][/COLOR]
[COLOR=#555555][FONT=Arial]You need to enable IPv4 forwarding. To do so, edit this file.[/FONT][/COLOR]
[COLOR=#555555][FONT=Courier New]sudo vim /etc/sysctl.conf[/FONT][/COLOR]
[COLOR=#555555][FONT=Arial]And uncomment the line[/FONT][/COLOR]
[COLOR=#555555][FONT=Courier New]# net.ipv4.ip_forward=1[/FONT][/COLOR]
[COLOR=#555555][FONT=Arial]so that it now appears as[/FONT][/COLOR]
[COLOR=#555555][FONT=Courier New]net.ipv4.ip_forward=1[/FONT][/COLOR]
[COLOR=#555555][FONT=Arial]Save the file and run the following command to make the change effective without a reboot.[/FONT][/COLOR]
[COLOR=#555555][FONT=Courier New]sudo sysctl -w net.ipv4.ip_forward=1[/FONT][/COLOR]
[COLOR=#333333][FONT=Arial]/etc/rc.local[/FONT][/COLOR]
[COLOR=#555555][FONT=Arial]You’ll need to allow iptables rules for NAT to work. Edit the file and save it.[/FONT][/COLOR]
[COLOR=#555555][FONT=Courier New]sudo vim /etc/rc.local[/FONT][/COLOR]
[COLOR=#555555][FONT=Arial]Make sure the following two lines appear before the [/FONT][/COLOR][COLOR=#555555][FONT=Courier New]exit 0[/FONT][/COLOR][COLOR=#555555][FONT=Arial] line in the file.[/FONT][/COLOR]
[COLOR=#555555][FONT=Courier New]/sbin/iptables -P FORWARD ACCEPT[/FONT][/COLOR]
[COLOR=#555555][FONT=Courier New]/sbin/iptables --table nat -A POSTROUTING -o eth0 -j MASQUERADE[/FONT][/COLOR]
[COLOR=#555555][FONT=Arial]To make these iptables rules active without rebooting, run the following commands:[/FONT][/COLOR]
[COLOR=#555555][FONT=Courier New]sudo iptables -P FORWARD ACCEPT[/FONT][/COLOR]
[COLOR=#555555][FONT=Courier New]sudo iptables –-table nat -A POSTROUTING -o eth0 -j MASQUERADE[/FONT][/COLOR] -
[COLOR=#333333][FONT=Arial]Install DHCP server[/FONT][/COLOR]
[COLOR=#555555][FONT=Courier New]sudo aptitude install isc-dhcp-server[/FONT][/COLOR]
[COLOR=#333333][FONT=Arial]/etc/dhcp/dhcpd.conf[/FONT][/COLOR]
[COLOR=#555555][FONT=Arial]Configure your newly installed DHCP server. Edit the file and save.[/FONT][/COLOR]
[COLOR=#555555][FONT=Courier New]sudo vim /etc/dhcp/dhcpd.conf[/FONT][/COLOR]
[COLOR=#555555][FONT=Arial]The file is very well commented and you can learn a lot reading it. Just make sure it has at least the following configuration.[/FONT][/COLOR]
[COLOR=#555555][FONT=Courier New]ddns-update-style none;[/FONT][/COLOR]
[COLOR=#555555][FONT=Courier New] [/FONT][/COLOR]
[COLOR=#555555][FONT=Courier New]# option definitions common to all supported networks…[/FONT][/COLOR]
[COLOR=#555555][FONT=Courier New]option domain-name “codeghar.com”;[/FONT][/COLOR]
[COLOR=#555555][FONT=Courier New]option domain-name-servers 10.20.30.15, 10.20.30.16;[/FONT][/COLOR]
[COLOR=#555555][FONT=Courier New] [/FONT][/COLOR]
[COLOR=#555555][FONT=Courier New]default-lease-time 3600;[/FONT][/COLOR]
[COLOR=#555555][FONT=Courier New]max-lease-time 7200;[/FONT][/COLOR]
[COLOR=#555555][FONT=Courier New] [/FONT][/COLOR]
[COLOR=#555555][FONT=Courier New]# If this DHCP server is the official DHCP server for the local[/FONT][/COLOR]
[COLOR=#555555][FONT=Courier New]# network, the authoritative directive should be uncommented.[/FONT][/COLOR]
[COLOR=#555555][FONT=Courier New]authoritative;[/FONT][/COLOR]
[COLOR=#555555][FONT=Courier New] [/FONT][/COLOR]
[COLOR=#555555][FONT=Courier New]# Use this to send dhcp log messages to a different log file (you also[/FONT][/COLOR]
[COLOR=#555555][FONT=Courier New]# have to hack syslog.conf to complete the redirection).[/FONT][/COLOR]
[COLOR=#555555][FONT=Courier New]log-facility local7;[/FONT][/COLOR]
[COLOR=#555555][FONT=Courier New] [/FONT][/COLOR]
[COLOR=#555555][FONT=Courier New]# This is a very basic subnet declaration.[/FONT][/COLOR]
[COLOR=#555555][FONT=Courier New] [/FONT][/COLOR]
[COLOR=#555555][FONT=Courier New]subnet 172.22.22.0 netmask 255.255.255.0 {[/FONT][/COLOR]
[COLOR=#555555][FONT=Courier New] range 172.22.22.21 172.22.22.250;[/FONT][/COLOR]
[COLOR=#555555][FONT=Courier New] option subnet-mask 255.255.255.0;[/FONT][/COLOR]
[COLOR=#555555][FONT=Courier New] option broadcast-address 172.22.22.255;[/FONT][/COLOR]
[COLOR=#555555][FONT=Courier New] option routers 172.22.22.1;[/FONT][/COLOR]
[COLOR=#555555][FONT=Courier New]}[/FONT][/COLOR]
[COLOR=#333333][FONT=Arial]/etc/default/isc-dhcp-server[/FONT][/COLOR]
[COLOR=#555555][FONT=Arial]We want to serve DHCP only on eth1 interface to we need to configure it that way. Edit the file and save it.[/FONT][/COLOR]
[COLOR=#555555][FONT=Courier New]sudo vim /etc/default/isc-dhcp-server[/FONT][/COLOR]
[COLOR=#555555][FONT=Arial]The line will look like this before you change it[/FONT][/COLOR]
[COLOR=#555555][FONT=Courier New]INTERFACES=“”[/FONT][/COLOR]
[COLOR=#555555][FONT=Arial]And after you change it, it will look like this:[/FONT][/COLOR]
[COLOR=#555555][FONT=Courier New]INTERFACES=“eth1”[/FONT][/COLOR]
[COLOR=#555555][FONT=Arial]Now you should stop and start the DHCP server.[/FONT][/COLOR]
[COLOR=#555555][FONT=Courier New]sudo service isc-dhcp-server stop[/FONT][/COLOR][COLOR=#555555][FONT=Arial] (if the service is already running; skip if it’s not running)[/FONT][/COLOR]
[COLOR=#555555][FONT=Courier New]sudo service isc-dhcp-server start[/FONT][/COLOR]
[COLOR=#333333][FONT=Arial]Conclusion[/FONT][/COLOR]
[COLOR=#555555][FONT=Arial]Now any machines you have on the 172.22.22.0/24 network will get their IP address from Skyray if they are set to DHCP. And Skyray will also serve as their gateway.[/FONT][/COLOR]Added missing DNS entries.
[COLOR=#222222][FONT=Consolas]cd /etc/resolvconf/resolv.conf.d[/FONT][/COLOR]
[COLOR=#222222][FONT=Consolas]sudo cp -p head head.orig #backup copy, always do this[/FONT][/COLOR]
[COLOR=#222222][FONT=Consolas]sudo nano head[/FONT][/COLOR]
[COLOR=#333333][FONT=Tahoma]The top of the file is a scary warning. The file /etc/resolv.conf is autogenerated from the contents of this file; the warning is there so it will get put in /etc/resolv.conf when /etc/resolv.conf is generated. To the end of the file, add[/FONT][/COLOR]
[COLOR=#222222][FONT=Consolas]nameserver <ip_of_nameserver>[/FONT][/COLOR]
[COLOR=#333333][FONT=Tahoma]Press [/FONT][/COLOR][COLOR=#333333][FONT=Arial]Ctrl[/FONT][/COLOR][COLOR=#333333][FONT=Tahoma] [/FONT][/COLOR][COLOR=#333333][FONT=Arial]x[/FONT][/COLOR][COLOR=#333333][FONT=Tahoma] and answer yes to saving the file. To finish up, regenerate /etc/resolv.conf so the changes are applied right now:[/FONT][/COLOR]
[COLOR=#222222][FONT=Consolas]sudo resolvconf -u[/FONT][/COLOR]
[COLOR=#333333][FONT=Tahoma]Then check the contents of /etc/resolv.conf to see the line you added is now there. Further, it will still be there the next time your machine boots or your network service is restarted, whichever comes first.[/FONT][/COLOR] -
Install Webmin
[B][COLOR=#2c3e50][FONT=Helvetica]Installing Webmin On Ubuntu Server 12.04 LTS[/FONT][/COLOR][/B]
[COLOR=#4f4f4f][FONT=Arial]In this tutorial I’ll shown you how to installing webmin on [URL=‘http://ubuntuserverguide.com/tag/ubuntu-server-12-04’][COLOR=#5e2750]ubuntu server 12.04[/COLOR][/URL], There are two methods for installing webmin. method 1: installing via APT, method 2: Installing manually. before installing webmin You need to install first some perl-related libraries required by webmin:[/FONT][/COLOR]
[B][COLOR=#333333][FONT=Consolas]sudo apt-get install perl libnet-ssleay-perl libauthen-pam-perl libpam-runtime openssl libio-pty-perl apt-show-versions python[/FONT][/COLOR][/B]
[B][COLOR=#2c3e50][FONT=Helvetica]Method 1: Installing webmin via APT[/FONT][/COLOR][/B]
[COLOR=#4f4f4f][FONT=Arial]Login as root:[/FONT][/COLOR]
[B][COLOR=#333333][FONT=Consolas]sudo -i[/FONT][/COLOR][/B]
[COLOR=#4f4f4f][FONT=Arial]Add the Webmin repository in your ubuntu server with following commands[/FONT][/COLOR]
[B][COLOR=#333333][FONT=Consolas]cat >> /etc/apt/sources.list <<-EOF[/FONT][/COLOR][/B]
[B][COLOR=#333333][FONT=Consolas]deb [url]http://download.webmin.com/download/repository[/url] sarge contrib[/FONT][/COLOR][/B]
[B][COLOR=#333333][FONT=Consolas]deb [url]http://webmin.mirror.somersettechsolutions.co.uk/repository[/url] sarge contrib[/FONT][/COLOR][/B]
[B][COLOR=#333333][FONT=Consolas]EOF[/FONT][/COLOR][/B]
[COLOR=#4f4f4f][FONT=Arial]Logout from root:[/FONT][/COLOR]
[B][COLOR=#333333][FONT=Consolas]exit[/FONT][/COLOR][/B]
[COLOR=#4f4f4f][FONT=Arial]Import GPG key, Update the source list then install webmin[/FONT][/COLOR]
[B][COLOR=#333333][FONT=Consolas]wget [url]http://www.webmin.com/jcameron-key.asc[/url] && sudo apt-key add jcameron-key.asc[/FONT][/COLOR][/B]
[B][COLOR=#333333][FONT=Consolas]sudo apt-get update[/FONT][/COLOR][/B]
[B][COLOR=#333333][FONT=Consolas]sudo apt-get install webmin[/FONT][/COLOR][/B]
Firewall exception also needs to be added.
sudo ufw allow 10000
Run acronis Backup at this point for recovery sector by sector because acronis can’t handle ext4 partitions note in future use ext2.
[B][FONT=Tahoma]INSTALLING FOG SOFTWARE:[/FONT][/B][FONT=Tahoma]The installation of FOG is fairly straightforward, once installed the bulk of configuration is handled from the Web GUI through your browser. There are a couple of further tweaks that can be done from the system side but they are optional depending on your environment.
- Enter the following at your Ubuntu command line.
• cd /opt
• sudo wget [/FONT][URL=‘https://sourceforge.net/projects/freeghost/files/latest/download?source=’][FONT=Tahoma]https://sourceforge.net/projects/freeghost/files/latest/download?source=[/FONT][/URL][FONT=Tahoma]
• sudo tar –xvzf fog_1.20.tar.gz
• cd fog_1.2.0/
• cd bin
• sudo ./installfog.sh - Follow the steps in the FOG installer wizard
• Choose Option 2 (Ubuntu)
• Choose N (normal)
• Press enter to leave IP address default
• Press enter to leave gateway default
• Press enter to leave DNS default
• Choose NO when asked to change default NIC
• If you already have DHCP configured, press NO to disable FOG DHCP
• Press Enter to acknowledge MySQL warning
• Set a password for MySQL when requested if you want (I left mine blank)
• Be awesome and send a notification to the FOG community! - FOG is now installed, we just want to check some of the MySQL settings real quick. wizard (skip this step if you left the password blank)
• sudo vi /var/www/fog/lib/fog/Config.class.php
• Set MYSQL_PASSWORD to the password you configured in the FOG
• Confirm MYSQL_USERNAME is set to root account
• sudo vi /var/www/fog/lib/fog/Config.class.php
• Set MYSQL_PASSWORD to the password configured in the FOG wizard - Congrats! FOG is fully installed!! [/FONT]
[B][COLOR=black][FONT=Arial]Install Subversion[/FONT][/COLOR][/B]
[COLOR=black][FONT=Courier New]sudo apt-get update[/FONT][/COLOR]
[COLOR=black][FONT=Courier New]sudo apt-get install subversion[/FONT][/COLOR]
[B][COLOR=black][FONT=Arial]Download the package[/FONT][/COLOR][/B]
[COLOR=black][FONT=Courier New]cd ~[/FONT][/COLOR]
[COLOR=black][FONT=Courier New]mkdir svn[/FONT][/COLOR]
[COLOR=black][FONT=Courier New]cd svn[/FONT][/COLOR]
[COLOR=black][FONT=Courier New]svn checkout [/FONT][/COLOR][URL=‘https://svn.code.sf.net/p/freeghost/code/trunk’][COLOR=#3366bb][FONT=Courier New]https://svn.code.sf.net/p/freeghost/code/trunk[/FONT][/COLOR][/URL]
[B][COLOR=black][FONT=Arial]Install It![/FONT][/COLOR][/B]
[COLOR=black][FONT=Courier New]cd ~/svn/trunk/bin[/FONT][/COLOR]
[COLOR=black][FONT=Courier New]sudo ./installfog.sh[/FONT][/COLOR]
[FONT=Tahoma] [/FONT]
SVN specific version install
[FONT=Tahoma]To upgrade back to an older rev, in the folder where you downloaded the trunk you’ll run:[/FONT][FONT=Tahoma]
[/FONT]
[COLOR=#b3b3b3][FONT=Tahoma]Code:[/FONT][/COLOR]
[FONT=Consolas]Run[/FONT]
[FONT=Consolas]svn status[/FONT]
[FONT=Consolas]to determine which directory to run[/FONT]
[FONT=Consolas]svn up -r <rev# here>[/FONT]
[FONT=Tahoma]Then run the installfog.sh like normal.[/FONT] - Enter the following at your Ubuntu command line.
-
I see that there is a backup util for the fog server, is there a way to run that and have it point to a external hd that I have?
-
[quote=“Wayne Workman, post: 45582, member: 28155”]I will add that if the FOG server is on your production network, FOG can name & then join the computer to the domain FOR YOU, automatically![/quote]
I"m trying to run this command "./FOGBackup.sh [directory]
Where it says directory how do I get that to go to my external drive for doing backups? -
If you’re running FOG on a Linux server build, it’s likely that the external drive is not automatically mounted.
Is the Ubuntu 14 a workstation/client install or the server install?
Can you access the external drive at all? If not, you’ll have to mount it…
-
You have to mount your external drive first. You mount to a specified directory. Something like /mybackupdrive
[code]sudo mkdir /mybackupdrive
mount [device/path/to/externaldrive] /mybackupdrive
./FOGBackup.sh /mybackupdrive[/code] -
[quote=“Wayne Workman, post: 45718, member: 28155”]If you’re running FOG on a Linux server build, it’s likely that the external drive is not automatically mounted.
Is the Ubuntu 14 a workstation/client install or the server install?
Can you access the external drive at all? If not, you’ll have to mount it…[/quote]
It is a workstation/client install and yes i can access the external drive.
-
Yeah then just use the code that Tom posted for script usage.
navigate to the directory for the backup script.
type:
[CODE]./FOGBackup.sh /mybackupdrive[/CODE][FONT=Consolas]So, if my external drive was mounted as “USB3_2TB” it would be something like this:[/FONT]
[FONT=Consolas][CODE]./FOGBackup.sh /USB3_2TB[/CODE][/FONT]
-
what’s the command to list [quote=“Wayne Workman, post: 45724, member: 28155”]Yeah then just use the code that Tom posted for script usage.
navigate to the directory for the backup script.
type:
[CODE]./FOGBackup.sh /mybackupdrive[/CODE][FONT=Consolas]So, if my external drive was mounted as “USB3_2TB” it would be something like this:[/FONT]
[FONT=Consolas][CODE]./FOGBackup.sh /USB3_2TB[/CODE][/FONT][/quote]
what’s the command to show me the name of that external drive in the command line? Bare with me i’m new to this. -
My guess is you’re using a desktop variation of Ubuntu? Can you give us an output of [code]ls -l /{media,mnt}[/code]
-
[quote=“Tom Elliott, post: 45731, member: 7271”]My guess is you’re using a desktop variation of Ubuntu? Can you give us an output of [code]ls -l /{media,mnt}[/code][/quote]
its showing the external as Sda1
-
That doesn’t sound right…
-
When I followed the steps on this site
[url]http://www.fogproject.org/wiki/index.php/FOG_on_an_Isolated_Network[/url]I’m getting an error "“Checking package apache2… failed!”
-
Can you post your installation log? it’s here: [SIZE=12px]/var/log/foginstall.log[/SIZE]