Ubuntu 20.04 Initial Server Setup on Contabo VPS

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] hi and welcome back to another video in this video we're going to set up our contable server we're going to create the account if you want to get to this page on contable just go to visanosa.com contabo and the link is in the description i will choose this option you can choose any option that you want you can even choose any of these other servers you can use any of this dedicated server or virtual dedicated server whichever one you want to use go ahead and try it now for me i want to try to this and this is the one that i'm going to use i'll just click there on select these are the settings you're going to get now initial contact period there you can choose whichever you want the region just not that with the region the monthly price is going to vary so the monthly charge for your server is going to vary based on the location of the server if i choose a data center in the united states you can see the price the monthly price is going to increase by that if i choose one in asia the price is going to increase by three dollars so just choose one that is most appropriate for you and your visitors we have chosen this region of germany the next option is we need to choose an operating system okay look at all the operating systems that are available here and you can choose whichever one you want to use for me i want to use ubuntu but the best option for ubuntu if you don't use ubuntu you can always use debian if this was my server i would definitely be using debian but i'm just using ubuntu because i know most people prefer to use it and that's why i want to use it here you can see the linux server operating systems that i recommend the link will be in the description now i will start with ubuntu 2004 and always use an lts version if your vps doesn't have 24 then just use the latest the previous one which is 1804 but of course you should probably use the latest lts version of ubuntu and so we're going to use 24 which is the latest lts version and then this we're going to leave that as it is ip you can add another ipre if you want to add an additional ip it will be four dollars a month so your monthly charges will also increase by that based on the ip addresses that you add so we're going to choose only one ip address and then backup space if you want to add backup you can do that and the prices are there if you want to if you want your server to be managed by control you can see that's the monthly price you can monitor your server and see how it's performing if anything is happening that you don't want any resources are being overused you will get a lot for that and you can use ssl if you want to add ssl but please don't bother with this because you're going to install a control panel and with most control panel nowadays you'll get let's encrypt which is already set up in most control panels so don't worry about ssl you can set that up using the free control panel that you're going to install and then setup if you want to first track the setup you can choose this this is going to make sure that your account is set up faster but who cares right we are patient we wait and then how many servers do you want to set up if you want multiple servers you can choose the number of servers that you want to set up maybe you want to set up multiple you can do that there so that's pretty much it let me just confirm that everything is is as i chose it so ubuntu there i'll just go next so you can see i will need to log in so i already have an account with contable if you don't have an account just go ahead and create yours and if they ask you for any details to verify your identity just send them something you can send them anything that has your actual physical address on it like a billing any form of building that you have water bill or an electric bill you can send that you can just scan it and send it and it will be used to verify your identity private individual let's forget about that i want to log in i'm already a customer so if you want to log in in future if you want to log into contact but you can just go to my.contable.com so let's come in here and do my dot contable dot com enter and that's going to redirect you to the login page for control so when you're here you can just click here log in here if you're already a customer i don't remember my password i'm going to reset mine here so just log in and we'll meet in the next screen log in here let's see so once i reset my password let me come back and log in here okay so i'm logged in if you have a coupon code just click there and add one that's it you'll see the amount you should pay and i will just order and pay i will just wait for this for them to finish provisioning the server and as soon as it's provisioned what's going to happen is you're going to get all the details that you need to log into your server you're going to receive them in your email everything that you need will be sent to your email and before this happens let's say your account is new what they will need or what they may need is some kind of document just just to prove yourself okay so as i said if they ask you for anything to prove your physical address just send any kind of billing you can send an electric bill water bill any kind of bill that has your physical address on it and they will use that to verify you and as soon as you're verified they will create your account and they will create your server and all the details will be sent to you if you don't want to deal with all this verification stuff just choose a vps in america you can choose something like vultra that's one that i use a lot and i can definitely recommend them they have very fast servers even though their offers are not as good as contabo so let's just wait and see if it's going to get provisioned for me as soon as possible as soon as you log into your contable account once they have sent you all the details you'll see your servers here any vpss that you have any services that you have with guntable you can just click there and you'll see the details for all the servers listed and you can also look at the vpss that you have right there they will be listed here if you did choose vds then you can look at that as well right now there isn't much i can do therefore i'm just going to wait for an email from contable and once it comes we can begin setting up the server in the next video so what i'm waiting for is an ip address a root user and a password so once all that is set up for me i can start setting up my server and as i said we're going to use this post to set up our server okay so the link for this will be in the description if it's not there just remind me and i will add it or you can just go to google or bing and search for ubuntu server setup and you're going to find this post okay so for me i'm going to use gitbush to set up my server instead of using party okay you can see this is party i'm not going to use party i'm going to use i'm going to use git bash so you can just use terminal if you're on mac and you can use terminal as well if you are on linux so i will see you in the next video when we start setting up the server i'm just waiting for the details from contabu although all the details i need will be sent to my email as soon as the server is set up for me so if you want to deal with all this waiting process from contable you can use a different vps and american vpss usually don't have this wait period an example is digital ocean vultra i've used both and you can use them if you want to if you want to set up a server just to try something go ahead and use vultra or digitalocean but i do recommend vultra because i use them for over four years and i still use them to this day so i can definitely vouch for vultra very reliable very fast servers as well it's entirely up to you to use whichever you want but you can also see the vpss that they recommend i will leave the link in the description let's continue in the next video so i've just received all the login data for my contable server so what i got are the ip address server type dvnc ip and port so vnc can be used to access your server remotely and then the vnc password as well and then you're going to get the username and the username by default is root and you're going to get a password for the root user and the type of operating system that you set up you're going to get all of this in your contable first email so if your account is new you're also going to get your contable login details and you can use that to log into your contable dashboard we want to log into our server and now that you have all the details we can do that we are interested in vps control because we did set up a vps if you don't know which ip address you're working with or which is which just go to your email address and look at the ip address that has been sent there so you'll see the operating system and if you are not sure you can also come here under services right so if you want to log into your server the first thing you want to do is make sure that you restart your server so the server will be restarted and as soon as you do that give it some time and just copy this our ip address we have the ap address we have the user our user is root and we have the password that was sent for root and you can find that in your contable email to log in so on windows i'm going to use git bash you can download git bash for free and install it if you're on a mac or linux you can use terminal to follow along so just search for gate if you're on windows that is search for gate download [Music] and then click on that you want to download it for windows since you are on windows you're probably following along on windows choose windows and install it and once you install it it's going to come with everything we need and we're going to use git brush for this tutorial once you install it just come back to windows and then search for git we want to work with git bash you can see there is git gui and there is git cmd but i only want to use git wash to log in type ssh and the user is root root at the ip address so with this i think you can paste let's see how you can paste that is art root art and then you can paste and you can do shift insert to paste and as soon as i do that it's going to ask me for the password and you can see it's asking me to authorize this into my hosts file i'm going to type yes to affirm that and it will be added to my hosts file so it will be unknown host on my computer and i can i can access it without any problems we need to add the password so you can paste it in here by doing shift to insert if you just do that you can paste using shift insert yes and you won't see the password as you type it in or as you paste it in so just press enter and if it is correct you should be logged into your server there we go that's how to log into your contable server of course the first thing you want to do is you want to update your server so since we are still using root i can just do opt update enter let's see if there any updates all right so you can see four packages can be upgraded so let's do upped upgrade to upgrade enter then y enter [Music] so just let it update and that would be pretty much it so you've seen how you can set up your ubuntu server on contable and then log into your ubuntu server vps if you want to start setting it up so just remember that we are going to start using this post to set up our server so there we go our updates are done if you want to log out of your server you can just do exit and that's going to log you out of your server okay so let's continue in the next video and in the next video what i want us to do is i want us to come in here and we are going to create a new sudo user the link to this post is in the description there we go we're going to do this in the next video let's continue doing an ubuntu initial server setup and in this video we're going to create a new sudo user so that you don't have to use the root user in upcoming videos in upcoming setup we will not have to use the root user to create a new user you will just use that command you can find the link to this post in the description add user and then that's the name of the user you can call it whatever you want to call it let me just copy this because i really don't want to type i will come back to git bash i will call my user new user 21 enter and then you need to add a password for your new ubuntu user we're going to give them a strong password retype the password okay so the password has been updated successfully so i'm just going to press enter until i'm done with all of this y and then enter okay so is the information correct yes so let me just clear the screen once again so once you've created the new user the next step is for us to make that user into a sudo user so we can give them sort of privileges and to do that we are just going to copy this this is going to give them sudo privileges so that they can run the sudo command if they need to do anything that the root user normally does they'll just add sudo to it and they'll be able to do whatever command that is i'm going to paste in that the user that we created was new user 21 i'll press enter and that's going to give them the sudo privileges let me open up a new git bash window and we're going to try and log in with our new user i will open a new window of git bash we can just do ssh that and now instead of logging in as root let's log in as the new user new user 21 so what you want to do is you want to test if this user actually has the sudo privileges enter the password that you set up for your user [Music] there we go we're logged in as the new user that we've set up and that is that is evident there you can see we're logged in as that user now the next thing is let's try and see if we can use sudo now that we've given this user the sudo privileges let's test if we can use sudo so i'm just going to do sudo apt update and sudo apt upgrade dash y so this is just to try and update the server and if they can do this then they can use sudo privileges in all the upcoming commands that we're going to do so enter the first time that you use the sudo command you need to add a password for the user so the password that you created for this user add that [Music] and there we go since i can see that this command is running without any problems it means that we can use sudo to do everything that you need to do and we no longer need the root user from now on everything that you do use this user that you created for me this is a user for you it will definitely be different [Music] okay so that's pretty much it for this video in the next video let's see what you need to do now the next step is for us to set up ssh so i'm going to set up ssh authentication using git brush and i'm going to use this part to do that so i will see you in the next video when we get here hi and welcome back to another video and in this video what i want us to do is i want us to set up ssh authentication for our ubuntu server so if you want to log in using ssh keys then this video is for you the post that i will use for this is this and you'll find the link in the description and even if you don't just go to my website and you can search for this title okay if you're on windows follow with this post if you're using a mark or you're using linux then come to this other post generate ssh keys and use them to log into your centos rail debian server this is for mac and linux users okay it's a very long post but it has everything that you'll need everything that you need for to set up your server to set up ssh authentication of your on your server and as well you can come to visanosa.com and search for the post here or you'll find the link in the description below i'm going to use this in searching someone windows and i'm just going to scroll down up to the part where i have this thing for ssh authentication and you can even follow along with the video if you just click there it's going to take you to this timestamp on youtube where you can watch how i did it on a debian server debian and ubuntu almost the same thing so it doesn't really matter it's still going to work on your ubuntu server let's start and since i'm on windows the first thing i want to do is i want to create a folder and that folder is where i'm going to store my keys if you have git bash installed on your windows you're going to have this folder if you can't see it just enable hidden folders on your windows and you're going to see it i'm going to create a folder and i'm going to call it ubuntu server so that we can just differentiate them so all our ssh keys will be stored inside here in our root directory and this is just the root directory okay the root directory is your username on your windows your username you can get your root directory if you go to your c drive if you go to your local disk drive and then you go to users now your username that's that will be your root directory and instead of using this link the tilde this just replaces that with your root directory okay so that's for git bash and even on linux it's like that so if you come here under ssh you're going to see that i do have these different folders these are some tutorials i've done in the past that's why they're here we're going to create a new one for our ubuntu and this is where we're going to store the keys the private and the public key for our ubuntu server so i'm going to call it ubuntu server let me just remove the space okay so once you create the folder so we've created the folder we're going to generate our keys and we're going to generate it inside of the folder we've created okay so to generate your keys this is how we're going to do it we're going to use that and this is just the command that tells the system to generate a new key and we're going to generate a key with this with this type and the type for our key is going to be an rsa key and the bytes for our key is going to be 40 96 you can create 2048 if you want to but we're going to do 1496 and this is just a comment you can even leave that out if you don't want to okay and then this is the where we want to store our key so we're going to store our key there this is going to be the name of our key okay two keys are going to get generated we're going to generate a public key and we're going to generate a private key a public key is going to have this name plus dot pub and you're going to see it once you've generated it so let me just copy this and i'm going to copy that and put it and i'm going to put it inside of this txt file so that i can just paste in things without having to type them so ssh keygen this we don't need to change anything there i'll just leave that as it is that's just a comment you can change this is going to be treated as a comment you can just add it it can even be something that reminds you of this key so ssh and the folder what was the name of that folder the name of the folder for our key was ubuntu server i'm going to copy that and that's going to be the folder inside of dot ssh paste and then we can just call it that okay it doesn't really matter right or we can just call it ubuntu or whatever [Music] this is going to be the name of our key you can call it whatever you want you can even remove that bit you can call it anything that you want you get the point so i'm going to copy this this is going to generate our key and it's going to generate both keys so let's come back into git bash where we already logged in please note that you need to do this on your local computer you're supposed to generate your key on your local computer the folder where you're storing your keys will be on your local computer so generate this on your local computer even if you're in linux make sure you remember that on the other end if you're following the other post and i can log out or i can just open a new instance of git bash get bush and then i'm going to paste that remember we're doing this on our local computer so the name of our key the key will be stored inside of that folder and we're generating a 1496 bit key because ubuntu 2004 supports that all right so the key is being generated but you're being asked for our passphrase so make sure you enter a passphrase which is going to be a password for your key so every time you need to log in with your key it won't be automatic you'll first of all get asked to add your passphrase so you can add that but since i'm just doing a demo i'm not going to add it i'm just going to skip but make sure you add one and make sure it's one that you can remember because if you forget it you will not be able to log in and you may have to to do a few resets on your server just to make sure that you can access it once again so i'm going to press enter and i'm going to enter again so once i press enter the key will be generated and you can see that we've generated two keys okay if you read that you'll see that we have two keys now we have the private and the public key the pub key this is a public key and the other one is a private key so i can just copy this and put them put them together with this [Music] once we generate the key we need to add them to our server we have generated our two keys the next step let's add our keys onto the server so add the public ssh key to your linux server so by the way you can use this for any any server that you're using whether you're using centos you're using red hat or even the new ones all my linux roki linux debian you can follow with this post and it's going to work for any of those linux servers so let's add the private key let's add the public key to our server let me just copy this and then we're going to replace things as we need to copy it here and then i'm going to explain it [Music] so this is going to add a public key to the server so ssh copy id is going to add our key to the server and this is just telling us the identity of the key that we want to use so the path to the public key and then for the user that we want to add it for so here you're going to add your ip address plus the user that you created not for the root add this for the user that you created and the user that i created was new user 21 and then i will add my ip address later so ssh copy id the path to the key now i will copy this because i know that my key is inside here but my keys if i go into that folder ubuntu server you can see we have our public key and the private key this is the one that we need to add into our server into our server and we're going to add it since this is the name of our key i will copy and i will replace that with this because this is a path to our key and then just remember that with dot pub is a public key without dot pub is a private key so let me add the pub because we need to add the public key to our server not the private all right i can just copy this and add this to our server i'm still doing this on my local computer if you see this this is my local computer so i'm going to paste that i'm going to paste okay i must i must have copied that line i shouldn't have let me come back and i will paste this okay so this is going to generate our this is going to add our key to our server but first of all we need to add our ip address there let me go to contable and find my ip after adding my ip i will just press enter and i will be i'll be asked to log in as this user so that i can add my key so just remember the password for the new user that you set up because in a moment we'll be asked to log in so it's adding the details that we need okay so we need to add the password for that for the user that you created so that you can log in and add the public key just like that you have now set up ssh you've now set up ssh authentication for your ubuntu server you can see one key has been added but i still need to do one thing before i try to log in let me come back to where i'm logged in into my server so this now i'm doing this on my server where i'm logged in let me just press enter to see if i'm still logged in okay here i'm still logged in we want to change the permissions for the key that we've added because on linux if you don't add the correct permissions you will not be able to log in with those keys we need to change the permission for the ssh folder and we need to change the permission for the ssh authorized keys now this is where the key has been added that's why we are changing it to root level permission now this is a folder okay this is a file and we can combine two so this is like combining two commands so we could have easily just have pasted in that and then once this has been done you come in and you paste that but you want to do this in one line so i'm just going to copy this entire thing i will bring it back to where i'm logged in because i need to change permissions for those two items press enter and of course you need to add the sudo password the password for this user [Music] since there is no error there is no output that means that the permissions have been changed and you can actually look if you can actually see the permissions for that okay if you just do ls dash la you'll see the list of all the files but i don't want to deal with that i don't want to do that you can just do that to see and you'll see that the permission has been changed now this is very important because if you don't do this you'll never be able to log into your server okay once you've changed the permission this is now the next important thing you have to change ownership for that file to the user that you created because if you don't that file is now owned by root and this user needs to access that file so that they can log in they need to access the public key that was added there right now it is at 600 this is a route level permission okay for you to access this you need to have zero privileges or you need to be root we have to change the ownership for that file into the new user that we created because if we don't do that we won't be able to log in we will never ever be able to log in so let's just come in here and paste that in there and i need to copy the user that i created make sure it's the user that you created and where is joe just replace that so this is a group of jaw paste the group of jaw and then the user of joe you give it the user that you created and then of course the home directory folder you want it to be this guy so everything inside there you're giving permission to this guy you're giving ownership to this fella this new user okay you're giving ownership to the group and to the user for anything inside of this and the public key that we added is inside of this folder so let's go back to git bash i will paste that in there press enter and as soon as i do this now i will be able to log in via ssh let me open up a new git bash instance okay so let's try to log into let's try to log into our server using the ssh keys okay let me come back to this place and we're going to we're going to test our ssh authentication by trying to log in so i'm just going to copy this copy that i can explain what they do alright so you remember initially we logged in as ssh user at ip and that was it okay and then we were asked for a password right now we need to add the user server ip and an identity for a key okay this tells the system that you want to log in using a key with this identity okay so the identity for our key we can just copy that right here because our key was generated as that and i'm just going to paste that in there now this is our ip i will take that copy let me just remove everything here first so i'm going to add the ip address once i copy it from contable so let me just copy all the way up to here copy now the way that i've shown you how to setup ssh is a really nice one because you can create multiple keys for different servers if you do it any other way you're probably going to have problems if you try to create other ssh keys now let's come here where we're not logged in and i'm going to paste this and remember i haven't added my ip address as soon as i add it i will be logged into my server because i did not add a passphrase if you added a passphrase while you're generating the key you'll need to enter your passphrase so let me just go back go back because i need to enter my ip address there [Music] paste so that's the private key that we want to log in with remember the public key was added on the server the private key is now the one we're using to log in so if i press enter i should log in automatically and you can see for me i logged in i was logged in automatically because they did not add a passphrase however if you added the passphrase which you probably most definitely should do then you need to enter the passphrase as soon as you press enter now let's go back and the last thing that i want to do is i want us to disable the root user and the password authentication and how to do this in this video so i'm just going to copy this so what you're doing here is you're going to make it such that people cannot log in with the key without our key they have to log in using a key so if you don't have a key you won't be able to log in and you're also going to disable root login so let's do that in the ssh configuration file so if i do that enter enter okay now we are here on the ssh file what i need to look for is i need to change two things here first of all i need to change permit root login to no and i need to change password authentication also to know so let me just go and search for them so i'm using nano you can see we are editing using nano so with nano i can just copy this and then i can search for it so if you want to search for anything on nano just press ctrl w ctrl w and then since i'm using git bash i can just do shift insert to copy to paste i'm in and then when i press enter it's going to look for that and you can see permit root login has been set to yes so we don't want root to be able to log in so we want to set this to now and we're going to delete yes and then the next thing that i want us to look for is password authentication so let me just copy password authentication from here and we're going to search for it in we're going to search for it in the ssh config file so once again let's do control w and then i'm going to do shift insert to paste enter and you can see also the authentication has been commented out right there it has been commented out and we need to uncomment it i'm just going to uncomment it remove the hash sign and that's going to uncomment it and then we need to change the value to now no and then i will delete yes okay so once i do that i can just do ctrl x now just note that there are other things you can change in this file if you want to be really strict you can change lots of things in these files okay so maybe you want to you want to reduce the number of times somebody can try to log in you can reduce that there the maximum sessions how many people do you want to be logged in simultaneously you can change that there just make sure you don't make things too strict because you might end up blocking yourself out okay just google stuff before you change anything google stuff and see the implication of the changes you're going to make so i'm just going to do control x to exit out of nano control x and then y to accept the changes and then enter to exit out completely the next thing is i need to restart ssh and i don't want to type this so i'm just going to copy it from here ssh let me use sudo service ssh restart i will do shift insert to paste press enter and as soon as i do this now if somebody tries to log in they will not be able to log in as the root user and they will not be able to use their password so that was the objective of this video the objective was very clear and it was to set up ssh authentication for our server and the link to this post is in the description so you don't have to worry about that you can just come you can even come here on my site and you can search for this post if the link is not there but i'll make sure i add it for you so that's it for this video make sure you follow everything as i've done it because if you don't you may end up making various mistakes that will have serious ramifications such as you not being able to log into your server so make sure you follow everything step by step just be patient and follow along step by step these things are very easy once you get used to doing them okay so just make sure that you follow along step by step and that's it for this video in the next we're going to do the final thing and the final thing is creating a soft file in our server and i'm just going to use this okay this is for debian but i'm just going to use this because it's still going to work on ubuntu so that's the last thing that we're going to do before we install our control panel after that we're going to install the control panel and we'll see how to add websites and how to run your website work with dns and so on so that's it for this video i'll see you in another one a sub file is a file that is used as memory when the actual physical memory runs out on your server so if you have a low memory vps you definitely need to create a swap file so on a vps you don't have access to your disks and therefore a swap file is the next best thing you can also create a swap disk but of course you want to create a soft file since we are on a vps if you are using contable you can see that you get 8 gb of ram for that and you get 16 for that so you can choose whichever plan you want and you see that you probably won't need the sub file but i'm just doing this for the benefit of people who are following on a different vps maybe you're using vultra or digital ocean then in that case you probably need to add a swap file so that you can have memory that will be used in case your server runs out of memory just as a question to anybody following along that this is how it should be this image you see this image this is how it should be my website was tripping out this double hyphens okay these are double hyphens if you need to follow along you'll need to know that so let's just copy this i'll just copy this only to the swap one so the link to this page is in the description you don't need to type this stuff so i will paste that in there see the swap on and that's hyphen hyphen show [Music] and you can see okay we do have a soft file already so you can see ubuntu on contable has already created a soft file for us so this means that we do have a soft file so we can just create another one and i'm just creating this for the benefit of people that want to see how to create a soft file on the vps if they don't already have one so the first thing this was just to see if we do have a swap file and remember these are two hyphens okay step one create we're going to create the the file that will be used for swapping okay so we need to create a file and allocate a size to that file so i'll just copy these things without any changing without changing anything i will just paste that in there enter okay now this file has been created you can do ls la and you're going to see that in your root directory there's a file called myself file explaining it once again that's the name of the file okay so you can change the name to whatever you can call it my swap file you can call it the new swap file you can even call it for file py whatever you want to call it and this is going to allocate the size for the file so this is going to allocate two gigabytes to this file if you want to allocate one gigabyte just put one gigabyte if you want to look at four put four gigabytes okay we've created the file and allocated that now the next step is we need to change the permissions for the file that we've created so i'm just going to do that and remember that you can create it inside another folder if you want to that's okay okay if you want to put it inside of another folder that's okay you can see here it is in the root directory so let us change the permissions for the file and once we change the permissions we need to now make it a swap file and we also need to to turn the swap on so this is going to make it and us this is going to make the file as a file and this is going to turn it on so upon so i'm just going to do this in one line copy i will paste that and then enter and now our swap is on now the swap is on yes but if we restart the server it's not going to recognize the swap file so what you need to do is we need to add it inside of this inside of this file and instead of this file we're going to add that so that we can let the system know that that is a swap file that should be restarted with the system so we're going to copy that so any memory that we have they're usually listed inside of this fs tab and this is the one that usually tells the system when it restarts that these are the memories that you currently have so let's just bring our cursor down and we need to copy this so if you change the name of the file or you change its location make sure that is reflected in this so for me i'm just copying what is already here so that i don't have to type paste and then i'll do control x to exit out of nano and then yes i'll enter y because i want to accept the changes and then i will press enter to accept the changes now if i restart the system our soft file will be there okay and even if i do sudo so upon show remember sudo swap on show has two hyphens oh but for me let me just do sudo free hatch free dash h this is going to show me all the memory that is available for me to use so let's come back here sudo free [Music] dash h this is going to show us all the memory that is available and you can see our memory is that and we still have that available memory and also file if you remember for my server i already had 2gb of swap file and i also created another 2gb of a sour file so i have a total of 4 gb of swap memory that's why you can see i have 4 gb of swap memory and it is unused because it is only used when this one runs out as soon as you run out of memory they will use your swap file your applications will all be moved to your swap memory okay so that's what it's all about so in this video you've seen how you can create a soft file on ubuntu even though i used this guide that clearly states is for debian even on centos if you want to even on alma linux you can just follow this and it's going to create the soft file the same way all right so that's it for this part in the next video we're going to see how to install our control panel and then once we do that we'll see how we can work with dns and then add websites and we're going to see how we can add our wordpress website we're going to see how you can change your host name on your server on your ubuntu server and you can follow the same steps for debian if you are using debian but i will be doing this on ubuntu because this server is an ubuntu 2004 lts so i will see you in that next video when you change the server hostname in this video we are going to change the server hostname and i will be using contable for this example if you're also using contable and you come here under reverse dns management and we're interested in this ip you'll see that the reverse ptr record is that and we want to change this to something else that you can use you should definitely use an actual domain and the domain should be one where your panel is installed so if you're installing a control panel like sdscp cyberpanel it should give the domain for where it is installed there to change the hostname on ubuntu or debian i have this post here you can just follow this post and i will leave the link in the description for the control panel i will install it in a subdomain panel1.javascriptbear.com i want to change my hostname to that the panel will be installed in a subdomain you can install it in a full domain if you want to but i choose to use a subdomain come back here and you can see this is currently the first part of our host name so we want to change that let's first of all see our hostname to check your host name you can just do host name and that is our full host name and we want to change it so if you come here you can change the hostname you will need to edit it there i want to change my hostname to panel1 dot 1.01.javascriptpair.com so this is going to be my host name so let's come back to the post and i just need to edit this file and change it there so if you go into this file we i mean this file if we go into the hostname file we'll see that our hostname is listed there and you can change it if we come back to where we're logged into our server make sure you you've logged into your server so i'm going to paste that in there and you can see that's our host name so the first thing i need to do is i need to remove this and replace it with replace it with this so i'm going to copy this entire thing and then i can just use my cursor i'll just press delete and delete everything in there the name of my server i'll delete that there and then i can paste so if you want to cont if you want to paste here and i'm using git bus you can use shift insert to paste if you're using party you'll just right click to paste if you're on terminal i think it's ctrl shift v so just paste the way that your command line tool will allow you so for me i'll do shift insert then i will close i will close nano by doing control x and then accept the changes y to accept the changes and then press enter to exit out of nano so the next thing is to change this in our hosts file so we've changed it in the hostname so the server knows the hostname is that the one we've added but we need to reflect that in the system so to do that we need to change something in our hosts file so copy paste enter and you can see this is the one we need to change okay and we also need to change that okay so every instance of the old host name we're going to change that with the new hostname and let's just come back and copy this copy the new hostname and we are changing this on ubuntu but this is going to work for you even if you're on debian so let me find my casa and i will just move my cursor to that point and let me delete this name and then i will add the space there [Music] shift insert to paste and then for this other one since i'm using a subdomain the first part of my hostname will be what is here but if you're using a full domain just use the full name of your domain and then let's scroll down again for ipv6 for ipv6 scroll down and you're going to delete this one as well and then we paste the new one and for this side it will be panel one so as i've said for the part where i've put panel one if you're not using a subdomain just put the full domain name there as well okay so that's pretty much it so i'll do control x y enter we need to restart the server there we go now we're logged in so now the last time we checked for the hostname it brought that let's see what it brings this time around and i'm just going to clear the screen there you go your host name has been changed so that's how you can change your host name on ubuntu debian or any linux server but since we are uncontrollable i'm also going to need to change this inside of my contable dashboard so let me come back into and you can see as soon as we change it it's changed it here as well let's go and change it inside of contab as well so here in contable i will click there to edit and i will update this one as well paste that okay that's not the one i will paste it in there and then i will save this one as well you can change the second one for the ipv6 if you've enabled ipv6 so your reverse dns records have been changed on contable and you can just add them as well on cloudflare so in this video you've seen how you can change the host name for your server and i was using ubuntu as an example but you can do this on debian you can even try it on other linux distributions i'm sure the process should be the same so change the host name into the domain name or the subdomain name that you're going to use for installing your control panel maybe you want to install cyber panel strcp virtual main you need to change the hostname to match that and that's why i was doing this so in the next video i'm going to install my control panel so i will see you in that video
Info
Channel: Bizanosa
Views: 1,479
Rating: undefined out of 5
Keywords: wahowa, tipsandpitsvids, rwahowa, bizanosa, Ubuntu server setup on Contabo, ubuntu 20.04 initial server setup, ubuntu LTS server setup on VPS, Contabo VPS server setup, free VPS server setup
Id: NevFrvhGsvY
Channel Id: undefined
Length: 53min 0sec (3180 seconds)
Published: Fri Sep 17 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.