How to Install and Use Virtualmin (and Webmin) on Debian (with multiple domains)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey everyone this is tony teaches tech i'm tony and in this video we're going to be looking at the virtual main web hosting control panel it's an open source free software for the most part there is a pro version which gives you a little bit more functionality but the version we're going to look at today is the free version so if that's something you're interested in learning how to do we're going to go ahead and install it set up a wordpress website on it and try to get some ssl certificates on there as well maybe a couple other things along the lines of that but let's get right into the tutorial if you guys are interested so let's uh first start off here and i want to deploy a virtual private server you might already have a server that you are running but you can go ahead and skip ahead if that's the case but i think this is necessary for a lot of people to just understand from the ground up how this actually works so i'm here in linode it's a cloud vps provider i'm going to deploy a virtual server through here so in here i'm just going to create a debian 10 image and there's other you know you can you can install virtualmin on centos you can install it on ubuntu a couple of these other operating systems but i'm just going to pick debian because that seems like a very popular choice for this type of control panel doesn't really matter where i put it i'll put it in california and as far as the system resources are concerned we're going to want to pick the 2 gigabyte plan because i went through this process before um and we're talking about memory here the the i tried it with the lowest plan and they said that um here's i'll put a screenshot on the screen here and it said if you have less than two gigabytes or more like if you had one gigabyte the installation might fail so a long way of saying to pick something that has two gigabytes or more of memory and then just a couple other things down here my password i'll type that in okay and i'm gonna use my ssh key so i don't have to type in a password when we log in and go ahead and create this server now this creation process takes like a minute or so but the first thing i want to actually do is set up our domain name dns records a records to point to this ip address so we're going to pick the ip address of our server over here copy that and then i have a few domain names here but the one we're going to be working with today is site3.xyz and site4.x so let's first manage site3.xyz we'll go over to the dns settings for this and by the way i got my domain names from namecheap you can get them from anywhere and the same concept will still apply all i'm doing in here is changing my a records to this ip address for the the domain itself so site3.xyz and www.site3.xyc um so let's go back to our domain list and we're going to do the same thing for site4 dot xyz and basically here site 3 is going to be the virtualmin you know dashboard admin panel all that stuff and then site 4 is going to be our wordpress website that we install so let's set them both up here and like i said this might be different for you depending on where you got your domain name from but like i said the same concept still applies um you just need to add or change your a records to these values and actually we're going to add um for the wordpress website we're going to add a couple other values here so we're going to add admin so this is basically admin.site4.xyz pointing to the same ip address we're going to add web mail to that same ip address and we're going to add mail and i don't want to tease you guys here we're not going to actually look at mail email in this tutorial but these seem to be like the default um domain names that virtualmin expects so just for the ease of this tutorial we're gonna set those guys up okay so by now if we go back over to our virtual private server this is up and running so let's see if we can first ping site3.xyz and see if we get this ip address back so let's open up a terminal window and ping site3.xyz and we do get that ip address back so that's perfect we can get out of here and we can log in via ssh to our server so let's ssh as root two site three dot x y z yes we want to continue we trust the host okay here we go so in order to install virtualmin there's basically two things that we have to do the first one is to grab the installer script and i'm going to use my cheat sheet over here and paste this in here and basically it's just going to be w getting the shell script at this address and i'll have either in the description below or linked to my blog these uh these commands so you can just copy and paste them instead of typing them in so let's go ahead and get that script and that looks good and then the next thing we want to do is to just execute this script so we can use the the shell command in bin sh to execute the install install.sh file so type that and if you're not if you're not root then you might have to pre-fix this with sudo but go ahead and hit enter and it's going to check all of your system resources to see if you meet the basic minimum requirements and if it does you should be good to go and it looks like we're good to go basically this is just saying that these are the supported operating systems you might have luck with something else other than this but this is what they know works and they they actually support um it's going to take up 615 megabytes of space that's okay because we have we have 50 gigabytes in this plan so let's go ahead and continue type y and hit enter and it says your system hostname localhost is not fully qualified so it wants you to type your domain name so for us it's going to be site 3.xyz and for you it might be something different now this is going to go ahead and install virtualmin webmin you know your your basic lamp server linux apache mysql php all that stuff it takes approximately five minutes so what i'm gonna do is stop the video here and check back in with you when it finishes all right guys we're back just about five minutes later the installation has appeared to successfully complete it it says we can now navigate to our website at https site3.xyz colon 10 000. so we'll copy that and it does say there's going to be a security warning in your browser on your first visit so let's see all about that so we're going to go to this url and like it said that your connection is not private and unfortunately it's one of those blocking if you're using google chrome messages where you can't get by there's not that button down here that says continue to this site anyway but cool trick um if you are on google chrome you can simply if this window is active if you clicked on it you can simply simply type on your keyboard uh what is it this is unsafe you don't have to hit enter and it'll proceed to that that website so cool trick there um okay so logging in logging in is with your unix username and password so the same thing that you sshed in with so for me it's root and the password is this and then we can sign in okay and here we go we are now at the um virtual main dashboard install screen post install screen so it's it's installed at this point this is just some like after the fax settings that we can go through you do have the option of just accepting the defaults by hitting cancel but i think it's good um we'll say hello it's good to just go through this process to see what is configurable on the the server here so uh let's see so let's go through this hit next and um i'm basically gonna keep all the defaults here uh but because you know some of these options it's very explicit about what uses more ram what doesn't use more ram but this is like preloading libraries running email domain lookup server we're just going to accept what they're they're suggesting here do you want a virus scan you can you can do some something with clam av but that uses a whole bunch of ram so we're going to skip that i'm going to keep the default again and i think there's there's a bunch of options here so we'll try to go through this pretty quickly no we don't want to do the spam thing we'll keep this one is yes this one has no for the database we're going to use mysql not postgres and then this is your mysql password by default it's blank so go ahead and make note of that just in case you you'll need that in the future and hit next and we'll keep going through here [Music] we'll keep the basic configuration for mysql and it does a really good job of explaining what why it's asking you for all this um dns zones will keep them primary um so yeah i just recommend reading through these to make sure like your use case is going to be different from mine here you can you can change the path the way passwords are stored so you can either have them plain text which is unsecure or hash them but then you can't like recover them once they're hashed so it's up to you i actually recommend keeping um hash passwords for this one this is one that we will change um okay so it can create a default server that will uh serve web requests we're gonna do this later so we're going to actually say no on this one and we're going to say no on the the ssl certificate i'm going to show you how to do this manually so we can go through that process so if you want to do it once you can do it once twice three times etcetera etcetera so we're going to skip through that and that's it so the configuration wizard is complete let's see go next and we should probably go to oh i just want you to just recheck the configuration make sure everything's in place before we actually start here it's going to check everything um we have enough memory the mail server is up and running php version 7.3 uh we got apache we got um the database all this stuff spam filters and this will just take a couple seconds longer and it looks like nope we can still see this this is a status bar up here this red bouncing back and forth line now we're done okay so installation is complete now it is just a matter of configuring it to the way whatever you're trying to do here whether that's set up multiple websites wordpress something else email server um but we're good with the installation so now we can go back to our what i like to do is just click on virtualmin just to see um the overview of everything and this is uh this from a server perspective right the system information so for whatever reason right now we're using a lot of cpu and this is refreshing in real time now that cpu usage has gone away and you can see those these graphs over time in real time this is something that i think is really cool about virtualmin it has this built-in you can see your memory disk space disk usage all these cool cool facts and figures and we're not going to go through all of them because it'll take a while but let's you can poke around here at your leisure but let's go ahead and set up a server the goal here is to set up a server using not site3.xyz but site4.xyz and we're going to run wordpress on it so to do that we can come on the left hand side make sure you're clicked on virtualmin webmins over here we'll look at that in a second but we're going to go to do do add servers no we're not going to do that we're going to go to create a virtual server up top here and the domain name is asking for us is site 4.xyz and this is just going to be a wordpress web site for now okay the password i'm just going to pick a password here oops and we'll keep everything as default you can change it according to whatever you want to and i'm going to use the same administrator username as i'm currently logged in as there's some advanced options here some features we're going to keep these all the same don't worry about the ssl we'll look at that separately and some more information down here you can configure but we're just going to go ahead and create this server and that'll take a few seconds and and this right now it's just the server the domain name all that being set up next after this we're going to install wordpress onto that server at that domain so let's just let this finish up here and then we can go ahead and do that next okay it looks like that's it done so we can see our virtual server list here so now we're running virtual main at site3.xyz and we have a just a basic server with i'm guessing just like a default landing page for site4.xyz and that did not do what i wanted but let's click on this one and there we go so yeah we have an under construction page for site4.xyz um let's uh let's do the ssl certificate first before we do wordpress so we'll get out of here and in order to do that there's a couple different ways we can do this um let's let's try it through editing the virtual server itself so you can click on edit virtual server and i believe it's under enabled features we can click on the apache ssl website enabled and we'll save that and this should go through and this is why i did this because i wanted to isolate this step just to show you what's going on in the background here so let's pay attention to the screen here and it's requesting a certificate for www mail admin and webmail that's why in the beginning i told you guys to set up your dns settings for those what is it one two three four five or six different um domains so it's going and doing that right now from let's encrypt let's encrypt this a free way to get an ssl certificate it'll issue that certificate and then web or virtualmin will go ahead and install that onto your web server and then you'll have an ssl certificate for all of these domain names so looks like we're just finishing up here and we're good to go so let's go ahead and see i will return to the virtual server list but let's open up a new tab and i think by default if we go to site4.xyz we should still see the unsecured version because there's no redirect from http to https but if we go to the https versions explicitly we do have the lock icon and a valid certificate issued by let's encrypt so that's really cool if you do want to redirect all of your traffic from http to https that's a separate step i maybe there's a way you can do that in virtualmin but i'm pretty new to it so i have another video that you can do it with htaccess by you know we can actually go into our terminal window again as we logged into the the server via ssh and then just edit the htaccess it's dot htaccess i'll i'll just link the video up at the top to show you guys how to do that so we don't have to do that again here okay anyway let's go ahead and wrap things up by installing wordpress so we can do that under the left hand side for virtualmin go into install scripts and these are the scripts that are available for installation with the free version of virtualmin now like i said in the beginning of the video there is a pro version of virtualmin which gives you a whole bunch more i think it's a hundred or so different um one-click installs of various you know cert like websites different different things that you can install in addition to this list so for here like we have django we have phpmyadmin we have a couple different email clients and we have wordpress and wordpress is the one we want to look at today so i'm going to click on that and show the install options for wordpress and here it is asking us well it was telling us that this is what we're going to install it's written in php that's where you can find documentation and stuff do you want to use the existing database or create a new one i recommend create a new one and then where do you want this to be installed at do you want to be do you want to go to site4.xyz and then wordpress show up or do you want to go to site4.xyz slash wordpress and then wordpress show up i you can you can do whatever you want you can change this to something else if you want the subdirectory but go ahead for me i'm going to click on public html which is just going to be site4.xyz so go ahead and install now and this shouldn't take too long it's only going to install four files i have three megabytes okay let's see and it's doing its thing uh looks like it's pretty good installing wordpress version 5.4 which is a very new version and it's done so it tells you down here you can get to your installer for word like we installed wordpress but there's a couple of configuration options before you actually you know finish the installation so you can do that here so we're going to click on that and we'll go through this real quick just basic wordpress install so we'll say my website titles tony's website username tony password password and yes we know that's weak and i'll put my email address tony at tony teaches that tech and go ahead and finish that installation of wordpress okay very good um we'll go ahead and log in to our wordpress website and there we go so very good we are um we're on the unsecured version of the website i wonder if we can go into uh yeah settings general and change this from http https i don't think that will redirect for us but it's a good thing to do anyway to to update that and then tony oops password exclamation point um so that looks good i think yeah let's see if we go to http colon site 4.xyz that goes to the non-secure version of this website which is why we need that redirect to show up so if we go to https colon site four um and that is weird that it's not what i expected that should go to uh wordpress admin let's see so the dashboards here i just wonder what do we have to publish should go to the default home page um a little confused here let me let me try to figure this out and i'll get right back to you okay guys i'm back and i didn't confirm this 100 just yet but i'm pretty confident that this is the issue because we do have a default landing page here for our website and we're able to access wordpress the the dashboard the admin dashboard on the back end there is indeed a leftover file that is this page itself right the x the index.html file so i think all we have to do is remove that from that directory and this is good to know as well if you are in your ssh session when you're logged into your web server here if you go to home and then the name of your site will go back a directory and do an ls you'll see that this is site4s you know all of the information that's associated with that and there's a public html directory in here so if we go into there and do an ls you'll see that we do have an index.php file which is the wordpress index file and then we have an index.html file so if we remove the index.html file and let's let's let's just show show you that real quick so if you just cat index.html we should see some we'll make this bigger some source code for whatever is being displayed here so like virtualmin forum i don't know what all that garbage is but that's this is the source code for this page in the background that we're looking at so if we remove index.html and just hopefully refresh the page here we should see the wordpress install which is exactly what we wanted to see and then just to confirm if we go to https colon slash site4 we will see the lock icon and that is pretty much exactly what we set out to do so we set up virtualmin and we set up the wordpress website on a server and we installed the ssl certificate i guess the last thing to do is just to give you a quick overview of webmin now webmin is virtualmin is like a place to manage your domain names and your servers webmin is more something at the server level to monitor those system resources and take care of more administrative you know back-end server maintenance tasks that you would typically need to to monitor as like a system administrator so um like for example you can update packages you can also there is also some access some things that you can do specifically with the servers so like if you expand servers over here and you can see your ssh server their settings for that your database servers all these different configurations that you would typically normally have to go to you know something like terminal go open a file edit some file type some settings but basically the the value here for webmin and virtualmin is that all of that is being done in a web browser now you don't have to manually edit configuration files you can do it through a prompt like let's just i'm just gonna click on this for the first time any of these like you can change from yes to no to allow login by root right um instead of going to that configuration file and doing that so very brief overview of webmin but i just felt like i needed to mention it here um also like i mentioned before i'm not going to talk about email because that is like a whole different topic for another day but if you're interested in learning something specific about virtualmin or webmin let me know in the comments below i'll do my best to read through all that all the comments and actually make a video if it's something that i'm interested in as well that i could you know find out for myself and help you at the same time so definitely let me know below and if you're still around still watching this video please please please give it a thumbs up because that really helps with the youtube algorithm and getting other people who want to see videos like this to see it so please do that and consider subscribing this channel for more videos like this in the future and if you do i'll see you in the next [Music] you
Info
Channel: Tony Teaches Tech
Views: 13,864
Rating: undefined out of 5
Keywords: virtualmin, install virtualmin, install virtualmin debian 9, install virtualmin debian 10, install virtualmin debian, virtualmin tutorial, webmin tutorial, webmin, install webmin ubuntu, install webmin, webmin ubuntu, webmin (software)
Id: _7zx4Q0jcRk
Channel Id: undefined
Length: 25min 46sec (1546 seconds)
Published: Thu Sep 17 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.