Debian Server Setup with RAID

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
okay today I'm going to demonstrate installing Debian Linux on a server this is very similar to how we have set up Linux based servers for the Lake Cumberland State Health Department and also for some other organizations that I've helped set up servers with the process is fairly straightforward I'll be demonstrating the process of setting up a raid for redundancy with the disks also demonstrate setting up LVM to make volume management easier for future expansion today's demonstration I am going to be using a virtual machine but I'm going to demonstrate all the steps that you would use to set up a physical machine a physical server and I'll have some subsequent videos in this process that will demonstrate setting up various services such as shore wall firewalls samba file servers etc so like I said for this demonstration I'm going to be using a virtual machine but this is the same process that you would use to set this up on a physical server so I've downloaded the Debian net install disk this is Debian 9.5 just the real small net install ISO image even burn that onto a CD or you can use something like the win32diskimager to create a USB Drive excuse me with the same image so for ourselves today we're going to assume we have a bare-bones system with two SATA hard drives or SAS hard drives and two Nix oh that wouldn't be necessary for this video but the two hard drives we're going to set up into a mirrored raid array so I've booted now to the net install image and as you can see we've got our options here we'll go ahead and take the graphic colors okay so I've cut the video a little bit as you can see to get past a lot of that waiting that this is the next screen we come to and we can see the two Ethernet devices so we'll go ahead and see if we can get an IP address there on that first device all right and here we're gonna actually set up our our hosting so assuming we're gonna set this up like as a gateway router we'll just call this a gateway and for our domain name we'll just go ahead and give it the proper domain name and we'll go ahead and continue and of course at this point we're going to set up a password don't do this live but we'll go ahead and give it a rate password great in real life you would want to choose a very good password there and in this case we're not gonna worry about it new user we're gonna call this one okay again you would use your real name or the name of an IT staff there or a generic name there and again using a good password but in this case we're simply not going to worry about what the password is and just use the password user for this user okay we'll go ahead and accept the timezone I am in Eastern time so that's fine okay at this point it's asking us how do we want to set the disks so like I said if this was actually a virtual machine that you were setting up we would go ahead and just use the guided use entire disk option here and go through without any LVM or raid setup but in our case I'm demonstrating how to set this up on physical hardware and we would like some raid configuration for redundancy and also LVM so I'm going to choose the option here to go back and this will take us back to a menu okay and one of the options down here in this menu as I simply execute a show so we're going to take that option continue okay so now we have a busy boxed shell in the Installer environment so now I can simply do fdisk and we're gonna partition our def SDA which is the first physical device connect machine okay there we have it I can press P to print out the existing partition table which it looks like there's not anything there so I'm gonna use the letter G now to create a new gooood partition table alright then we're going to use the letter in to create a new partition in this table in this partition table we'll accept the default we're just gonna make a very small partition starting at the one megabyte mark 2048 and going up to say 4095 v which will give us basically a one megabyte partition this is gonna be for our BIOS boot partition to allow the system back to actually boot right now we're going to use the T to toggle to change the type of that part tea in this case we will just simply select type 4 for the bios boot partition and if I use P to print out you can see now that there's that one megabyte partition there on the screen alright so we'll use n to make another partition and this time we'll go ahead and take the partition to take the default this first set dirt and we'll go ahead and use the rest of the disk so just take the defaults here print and there you have it in this case my virtual disk is about 30 gigabytes so you can see that there on the screen that would be the entirety of the remainder of yours drive whatever drive you have in there so I'm gonna use the letter W if we like this to write and exit the program okay so now we have partitioned SDA which is the first disk then we'll do F disk again for debes DB go through the same process creating a good partition table create a new partition partition one except the default for a sector lost sector is 4095 and then we're gonna talk all the type with that for all right print now make sure that's right okay make another new partition position to default first in lot of sectors and there we have it so now I'm gonna write that to the disk so now I have two drives with an identical partition table the very first partition is a very small partition for booting and the remainder is a friend large partition that we can use as the base for our rate device now we'll go ahead and use the command MD ADM to go ahead and create that raid device empty ATM - - create - - level one - - Maggie's a - 0.90 - that's raid devices to give it that excuse me at the raid device name itself dev and B 0 then we're gonna tell what physical devices to use to back that array there's gonna be def sta - and dev SDP - press ENTER and there you have it the array is created I can actually see that if I cat croc slash stack and there is you can see that it's actually resyncing as we speak now on top of that raid device we can create what's called logical volumes so the first step is to create the physical device so pv3 div in b0 that creates a physical device for LVM out of that newly created raid device we're just stacking these logical devices one on top of the other until we get a system that is abstracted enough we can manipulate things in quite a lot of ways so PV create now I have a new physical volume now I'll actually create the volume now that we have a place to store it Viji create will just be rather on unoriginal and call it VG 1 and then we'll use the physical device dead can be 0 which we've just formatted so there you have it now if I do VG display you will be able to see on the screen that volume group you can see it has 30 gigabytes in it all of the space is free for the most part now we can create logical volumes in it I'll be create where's the target volume group eg 1 - - name root this is gonna be for our root filesystem that's a size in this case we'll just say 20 gigs that's good enough for our example you'll see in your documentation probably should be bigger than that you decide based on how much space you have on your volume groups and how much he'll suffer you intend to install on the server so we'll go ahead and create that logical volume there is and will L be create again this time for our swap and size and we'll just say eight gigs all right if we do lbs that's gonna actually list out all of those logical volumes for us and at this point we are ready to go ahead and install the system so we will exit out of this all right now I remembers where we were we were at the partition disks step so we'll continue and it's going to load the partition er and it's gonna scan and see all of the changes that we have actually made to those disks okay in this screen we actually need to go down and and tell it what do we want to use these different logical volumes for so in this case you see this is LV route this we just created this with the intention of placing the root filesystem on here so we need to tell the Installer our intentions so I'm gonna go down here and press Enter and it says use as do not use what we actually want to use this as an ext for journaling file system select that then mount point is going to be slash root root filesystem and we are done setting up this partition now we'll go ahead and tell it we want to use this swap space to and use as swap area and done setting up the partition so just to review what we've done just from the very beginning we have here we have two physical hard drives they're about 32 gigs each on those drives we have two partitions each there's the first partition which is our BIOS grub partition of the second partition you can see that both drives there those have been bonded together in a software raid device which we have here that is actually being used to back our volume verb in LVM here so we're not using any of these directly through the installer we're only using these two logical volumes that were created here so we've just told the Installer to use this particular logical volume for rate and this smaller one for suave silly we'll say go down here finish partitioning continue okay it's giving us a review of what we wanted to do we're gonna format these two logical volumes and yes and continue okay we'll go ahead and let this install I'll cut the video here and come back and intimate okay the base install has completed and it's kind of asking us do we want to scan another CD in this case we're just going to say no and continue and we'll go ahead and click through the rest of its setup and it's gonna go online of course we're just gonna take no proxy and it's gonna go online and look for packages available on the internet still going looks like it's installing the Linux kernel it may be taking a little longer because of a slow hardware that I'm doing this video on it hopefully it won't take too long in your fast new server that's your building okay so now it's actually asking us some more questions do we want to participate in the popularity contest that's fine either way let it configure that okay finally we got to this screen that I was expecting or we can select the software we want to install so this is gonna be a server we don't really need any desktop environment we don't even need a print server we can install a web server later but I do like to go ahead and install the SSH server and standard system utilities and we'll go ahead and continue and that's gonna take a while all right so it looks like the install is finished and it's asking to install grub bootloader now on the hard disk and of course we do want to do that yes otherwise the system won't boot then we'll go ahead and install that on the first drive we'll come back later and actually install it on both drives in case one drive were to fail the system would still be able to boot from the second drive all right you get to this point and we are ready to reboot to let this go there it is booting up to the new system we'll go ahead and login root root and there we have it and I will go ahead and clean up a few little items here we're gonna go ahead and like I said a minute ago make sure that we've installed grub on both hard hard disks in case one were to fail it would be able to boot from the second one so deep package - reconfigure grub - PC and it's gonna bring us up to the screen take the defaults defaults okay now we're gonna choose both SDA & st bede here notice they're both high light we use the space bar put that little guys don't spare tab - okay and let it install all right there it is next we're going to go ahead and install some software we'll need a lot of servers after install for wall our sink and sudo okay except that it's go ahead installing those all right and we're going to go ahead one more step and give our local user sudo privileges so they can become read so user mod - a capital G sudo and our user and just called user this video really in here so there you have it now if I log out as root log back in this user and user now Friday sudo hi now I give it a password user and now I have root access from my user account so there you have it installing and configuring the base system come back in a few minutes to our next video and we'll go through setting up SSH access
Info
Channel: Daniel McFeeters
Views: 3,412
Rating: 4.9069767 out of 5
Keywords:
Id: ykzR3i-pToY
Channel Id: undefined
Length: 19min 41sec (1181 seconds)
Published: Fri Aug 17 2018
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.