Install FOG Server on Ubuntu Server - The Ultimate Guide
11K views
Aug 22, 2022
Head to https://www.ceos3c.com/linux/install-fog-server-ubuntu-server/ for the written Article!! DHCP Forwarder BIOS NAME: undionly.kpxe ⮘-=[Subscribe]=-⮚ ↬ https://www.youtube.com/c/ceos3ctutorials?sub_confirmation=1 ⮘-=[Support Me]=-⮚ ↬ Patreon: https://www.patreon.com/ceos3c ↬ Hacking Apparel: https://www.teespring.com/stores/ceos3c-hacker-store ↬ Paypal: https://www.paypal.me/ceos3c ↬ My Amazon Store: https://www.amazon.com/shop/ceos3ctutorials ↬ pfSense Starter Guide: https://amzn.to/2RbRem2 ⮘-=[Social]=-⮚ ↬ Website: https://www.ceos3c.com ↬ Instagram: https://www.instagram.com/daily.linux.tips ↬ Twitter: https://www.twitter.com/ceos3c
View Video Transcript
0:29
virtual box. Sounds a little complicated but it's really easy if you follow through each step
0:35
that I will show you now. This tutorial will be split into two parts. The first part will include
0:42
installing Ubuntu server 1604 on virtual box as a virtual machine and install FOG server on the
0:50
same server. So you will get everything until the point where you can actually can capture your
0:58
first image. The second part of the video will be how to create a generalized Windows 10
1:05
image that you can personalize, you can modify it as you want to, you can install software
1:12
and then I will show you how to capture your first host in FOC and how to implement this generalized
1:19
Windows 10 image to FOG server for employment on your clients. The advantage of that is that with the
1:27
generalized image you are able to deploy this Windows 10 image even on computers that
1:33
have Windows key branded into the BIOS so it's perfectly for use with OEM
1:39
machines and personally running it for quite a while now and it's working really
1:45
well so enough about the talk let's get started with the tutorial things you
1:51
need for this tutorial are Ubuntu server 1604 LTS 64 bit version which I will provide you the link to in the description you will need the
2:03
newest version of the Mware virtual box and that's really it FOC server we will
2:09
download later on our new go into server right startup virtual box I have the
2:15
newest version as of beginning of September in 2017 click on new and give your
2:22
new virtual machine a name I'll call it FOC minus because we want to later call our FOC server actually FOX server so the FOX server runs on the FOC host
2:36
which is kind of an inception kind of thing so you want to be able to hold them apart
2:42
then you select a type which is of course Linux and it's Ubuntu 64 bit click on
2:50
next choose how much RAM you want to allocate to the machine I think like one
2:56
Gigabyte will be enough but I'll opt for two because I have enough memory in my computer
3:02
We want to create a virtual hard disk now We choose VDI and I also go for dynamically allocated which means it's actually just going to subtract the hard disk space from your physical hard drive that is actually used by the virtual machine
3:19
So it grows According to the amount of data you put on your virtual machine and not just
3:26
reserved the whole thing on your physical hard drive so you have a little bit more room
3:34
you can give it a name again I'll just leave it as fog host select a size so this really
3:40
depends on you because I will just work with one single image but you might use different
3:45
images of different OSS or different patch levels whatever so adjust it accordingly
3:50
I'll go for around 80 gigs that's plenty for me then I choose a location where to save it just dump it on my two terabytes drive
4:06
save it and click on create so the next thing I usually do is I change the network
4:15
from net to bridged adapter which means it's basically bridging the virtual
4:22
machine right into my normal network pool so it's not giving it a net
4:26
IP address but it resides in the same IP address range like all my other devices
4:36
You can just start up the machine and it will ask you to insert the location for the image
4:41
of Ubuntu server. I will just go to storage, click on this CD drive and open it that way
4:51
So I go to my downloads folder and select the Ubuntu 1604
4:56
4 minus 3 64 bit ISO file click on okay and I click on start
5:09
Alright, and we are already inside of the Ubuntu installation routine Just keep in mind that if your mouse is captured inside of this window you just hit your right control key to release it again
5:26
Don't want to see that message again. You select a language and then you select to install Ubuntu server
5:36
I will run you through to each step so you can just stay with me and follow along
5:40
It's really easy and quick. I select English for a language too
5:44
My location. It's in Europe. Germany. I keep the local always on United States
5:56
I don't want to detect a keyboard layout but I want to select it manually
6:01
so I'm always using the German keyboard layout of course classical one then it detects the hardware
6:11
alright then you can give it a host name already said we're going to call it fog
6:18
dash host we stick with that click on continue full name for the new user you can enter your name and then a name for the user account that will be used instead of the root account
6:33
which gives it another layer of security. Let's seal admin and give it a safe password, safer than four digits in this case
6:45
but it's just for demonstration purposes. It even gives you a warning that's a weak password and you should not use it
6:53
I'll use it. I don't want to encrypt my home directory. The time zone Euro-Berlin is correct
7:01
Now it's continuing to detect all the hardware. For partitioning we want to use guided, use entire disk
7:11
Select the disk, the virtual hard disk will be created. And we agree that everything on this hard disk will be deleted
7:17
will be deleted. Now we let the installation run through and we are almost on the end
7:26
Now you can enter your proxy server if you use one if not just leave it empty and hit continue
7:34
Then that's really up to you but I always choose no automatic updates because I want to
7:38
have control over my updates. Then you can select packages that should be pre-installed
7:46
are going to choose the standard system utilities and also the open assets H server so we
7:52
can later access our server via SSH. That should have been the last step I think
8:01
So now it's installing everything what we selected and then it should give it a quick reboot and
8:07
we should already be able to log into our system. Not all there yet, the good old group bootloader and yes we want to install group
8:16
on the master boot record. But that should be it now. Finishing installation sounds pretty promising
8:26
So the reboot should just come after that. Almost. Yeah, right. You should just remove the CD from your CD drive
8:35
and hit continue after that. Now we are going to reboot the machine
8:44
and it automatically boots up our new system. Alright there we go. Now we can log in with the credentials we choose earlier
8:53
So CO admin for me and my high security password. And we are in. The first thing I do is type pseudo minus i
9:07
Type your password and we are locked in with the route account because we need to do many settings
9:13
do many settings so I don't always want to type pseudo and type the command and type my
9:17
password again you know how it is clear up the screen the first thing we want to do
9:22
is apt dash get update to update our sources and then we also want to run upgett
9:34
dist dash upgrade to upgrade our OS tells you that it will download 307
9:43
megabytes we agree with yes and we'll be back soon as it's finished all right
9:49
that's done so we want to shut down the machine now by typing shutdown now and the reason for
9:57
that is that we now have everything set up to the point where we can or almost set up to the point
10:04
where we can install our fog server so what we want to do now is to take a snapshot of the
10:10
machine in case you something up you have to start all over again and
10:15
install your whole server from the beginning to avoid that we take a snapshot in
10:20
the state that the what we have at the moment which is pre-installing FOX server just to
10:27
be safe so click on snapshots in the upper right corner while you have your
10:33
foco selected and click on a little camera symbol and give it a descriptive name
10:39
I always just write there pre-fog server installation all prepared something like that just to immediately know which state it is in then we go back and we start up our machine again all right after the server is back again we do one more thing before installing fog
11:09
So, pseudo dash I again put your password, clear it up. And now we want to adjust our IP address because you could you could do it later after
11:27
fog is installed but you would have to change way more things. You have to change the IP on your Ubuntu server and you will also have to change
11:34
the IPs in your FOC server which is way more complicated than
11:39
if we just do it now and have it done. So we do it by typing
11:45
I think what's on there, probably NANO will be here, all right
11:51
ETC network interfaces. So this is your network interfaces file
12:03
which you have to change from DHSC to static. like adjust it accordingly however you want to use the server but I give it a static
12:12
appie address so I'm on the safe side so you change the HCP to static then you
12:19
give it an address by typing address and the address you want to give it
12:27
I give it dot 40 put the net mask my case it's that then you put the address of your
12:36
gateway my case it's this one and you also put the address of your DNS name
12:43
servers which in my case is also my router all so we have that going Then you press Control O to write the changes
12:57
confirm with Enter and hit Control X to leave the editor again
13:01
Now you could just restart your network interfaces but that failed on me sometimes so
13:07
I'll do another reboot by typing reboot now and we'll be back in a short second
13:12
in a short second. All right we are back up again so we do pseudo minus I to log in
13:22
Clear it up, make an IF config, check if the IP address was changed. It was. I actually had to change it again because I was with my head still on the wrong network so I had to change it to 10.40 instead of 100.40
13:36
and then you can do a simple ping on google.com to see if everything worked well and it should
13:42
it does perfect can clear that clutter up again and now we will actually
13:49
install fog server so first we need to download fog server and the easiest way
13:54
to do that is with w get so I first want to go in the opt directory to don't
14:01
download it in the root home should be empty anyway clear it up again and you
14:08
can grab fog from here so it depends when you're going to watch
14:12
this video because there will probably be a new version released very soon so
14:18
you should always make sure you install the newest version and how to do that the
14:23
easiest way is you go over here on this address I will leave it in the
14:27
description and you click into the fog folder and then you see the newest
14:34
versions right this now as of beginning of September 2017 it's the fog 1.4
14:42
4.4 so you are going to opt for that one clicking it again and this is the file you need to
14:49
download so what you're going to do is you just copy this address I don't know if it actually
14:53
works with copy and paste now because I didn't install the virtual box guest additions yet
14:59
let's try no it doesn't work so we will just type it you could also just install the guest
15:05
additions but we are not going to do that now so let's just do it manually but you get the idea
15:12
you will have the address here i just move that back to my other screen so i can type it off
15:18
and what you're going to do is you type w get and then you just simply enter the address
15:28
projects free ghost files fork fork and then the newest version another dash and then
15:40
the name of the file fog underscore one four four tar gz so just have a look here again if you see this is the address up until here
15:54
and this is the name of the file which you basically end at on the end here so the whole address
16:03
you get the idea what I mean the whole address will include this over here and then
16:08
you just confirm with enter and it will download should download yeah it does the FOX server installation files we'll be back in a second
16:19
all right that's done just to mention it again it's a long tutorial because I want to go
16:24
through each and every step to make sure you don't make any mistakes there are some
16:28
guides out there which I found to be incomplete and I really want to get it on point
16:33
that you don't or that you aren't left behind without any or without any questions
16:39
So now we're going to need to unzip this file which we do by typing tar dash xZF and the name of the Fox server installation
16:54
It will extract it in the same folder, then you CD into the folder and CD into the bin directory
17:03
Now we clear that clutter up again. We will run an LS and you can see there is install
17:08
can see there is install fog.sh which we are going to run right now by typing dot slash
17:16
slash to the right install fog sh and hit enter all right so the first option we have is to
17:24
choose which kind of distribution we want to install the server on and of course it's number
17:30
two a dbm based linux with which includes ubuntu um This is a potential need to reinstall the Apache files and PHB files
17:43
I always confirm that with yes. At least that always work for me
17:48
Don't be confused that there is one step failed, which is stopping web services
17:52
It doesn't matter. What type of installation would you like to do
17:56
We would like to do the normal installation. What is the IP address to be used by the FOX server
18:03
So that's going to be the same IP address than the one of our Ubuntu host
18:08
So we confirm that with enter, that's correct. We would not like to change the default network interface
18:18
And we would like to set up a router address for the DHCP server
18:25
Yeah, that's actually correct. That's my gateway. That's my router. We leave that as it is and hit enter
18:30
So what you do here is you define or you tell Falk where to search for the DHCP server
18:36
because you can run Fog as a DHCP server itself, which I would not recommend you to do it
18:42
I run a PFSense firewall, and I will also show you how to, what you need to set up in PFSense
18:49
to get your PXE clients to boot from your FG server instead of your PFSense
18:55
You need to add a forwarder or a next DHCP server on your PFSense firewall
19:00
It's really easy. I will show you how to do that. So we leave that as it is as the router address
19:06
we would like to that the HTTP handles DNS yes we leave it as it is because this is also my DNS server and we definitely would not like to use FOG server for the
19:25
HCP service I also don't want to install any additional language so we're
19:30
going through that again make sure everything is correct and if it is hit yes and
19:36
the FOG installation will run through. We will be back in a short moment
19:42
One more thing while it's installing, just to clarify, because I just really quickly went over it
19:47
So how that works is, you are going to boot from your network
19:54
with a PXE boot, yeah? So you could just simply put the FOX server
20:01
in a separate VLAN or network and have it act as an DHCP server itself
20:06
which will make things way easier of course but in the most corporate
20:11
networks this is not that easy to do so you will just run it on your regular network
20:17
and that means it's not running as a dhc server itself but it tells the clients
20:23
or basically the clients are taking the dhcp from your dhc server
20:30
but you need to tell the clients that there is a pxE
20:35
server on the network So you need to set it up in your PF sense or whatever firewall or the HTTP server you are using that
20:44
In my case PF sense tells the client where the PXE boot server resides
20:51
So you basically enter the IP of your FOX server inside of your DHCP server and
20:58
That way your DHCP server can forward that PXE boot request to your FOX server. I hope that's a little bit
21:07
bit understandable but that's how it works. So now we're going to be back after the installation is finished
21:16
If you get asked, it depends. Sometimes I got asked and sometimes I didn't
21:20
If the MySQL password is blank, confirm with yes, don't worry about the security
21:26
It's still a secure installation. It just needs it for the FOC database
21:34
So one more last step and we are almost done. As you can see, it tells you you still need to update your database schema
21:42
So how to do that is simply open your browser again, type the address that is written there
21:48
which is 192-16810.40Fog management. Click on install, upgrade now, and it automatically finish it up
22:00
It goes very quickly. Then you can go back to your server, hit enter
22:07
to finish up the installation and we are done. You can now see here that your
22:15
default username is fog and the password is password. So first things first
22:21
we are going to lock into the server with fog and password hit enter and we are right in
22:32
So the first thing we want to do of course we click on user management
22:37
list all users, select our FOC user and click on change password
22:43
No brainer. We take a new password and click on update. So we got that fixed and now have a secure, more or less secure
22:55
password. Your should be longer than four digits again. And that's it for that
23:01
So the last thing I still want to cover in this video is the PFSense
23:07
bit which shows you how to set up DHCP forwarder to your FOG server
23:13
Simply lock into your PF sense firewall, navigate to services, DHCP server and choose the correct interface where your DHCP server resides
23:24
then scroll down all the way until you find network booting and click on display advanced
23:32
Check enable network booting and enter the next server IP address, which is the
23:37
the IP address of your FOG server. Then you need to enter one more thing, which is the default BIOS file name
23:46
And in the case of FOC, it is undi-only K-PXE. I will also write that into the description so you can just copy and paste it
23:57
And then you scroll down to go to SAFE and click on apply changes and you are basically done
24:07
with that. So there you have it. Wasn't that dramatic, it wasn't that long that I expected
24:12
it to be. Just make sure you follow every step carefully. You can really easily mess it up in
24:21
the fog installation if you choose a wrong answer to those questions coming up there and you will
24:29
have to start over from the beginning. As I said, the next video will cover how to capture
24:34
a generalized image or how to create a generalized image of Windows 10 first of all and then how to
24:41
capture it with fog and how to deploy it on a new client that boots over your network
24:47
Let me know if you like the style of tutorial in the comments. I would really appreciate some feedback
24:53
because I really want to cover each and every step and I hope I didn't leave any steps out
24:58
or leave anything out that might be unclear to you guys. So feedback on that side would be
25:04
be really appreciated by me to provide better content in the future for you guys to enjoy
25:11
If that saved you a ton of time or if you're generally satisfied with my tutorials
25:15
head over to cozac.com and hit the little donate to PayPal button on the right upper
25:22
corner to enable me to spend more time creating tutorials for you, which in the end will save you
25:29
time. A little dollar would already help a ton. Thanks for watching guys
25:34
and see you in the next video
#Computer Education
#Networking