Understanding Hosting Options and Setting up our VPS to Deploy Laravel App

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
you hey everybody and welcome back to how to deploy a level application on to the internet this is a start to finish series and this is going to be part number one so the previous video is all was our introduction just kind of explaining how the format of the of this series and everything like that okay so now this video is part 1 we're going to talk about basically a few hosting options we're just going to dabble in the hosting options not going to go into ton of detail I don't think and after that we're going to choose a host and set up a virtual private server we're going to install it with Linux and everything like that and then ssh into our server okay that's what we're going to focus on in this video the next video is actually going to talk about installing the various technologies so we can build our stack of technologies on the server the third video is all about git and getting our our files onto the server and then the fourth one is going to be configuring level after we get the files on there ok so let's talk a little bit about hosting where can you store your your new level application that you've got in mind well first of all there's basically four options for hosting first you have shared hosting and then you have a virtual private server then you have a platform as a service a past product or and then you have dedicated servers ok so we can talk about the first two extremes basically right from the gap code first thing is obviously dedicated servers are going to be full on dedicated servers you have a server box you own the entire box right from the get-go ok so that's what a dedicated server is these can cost thousands of dollars a month and most people don't actually need an entire server servers are so powerful anymore that even large scale applications you'd be surprised run off of Virtual Private servers which are just slices of an application unless you're running a very very large service you may not need a dedicated server okay now we what we're going to be talking about in this video after we get actually not this video but the next three videos we're going to talk about basically how to configure any Linux based server specifically in boone 2 and so you can actually follow this guide if you do have a dedicated server but most people aren't going to need that level of power that's usually too much that it's just overkill for a lot of applications but large large websites would it I'm assuming that basically you're just dabbling with level right now so you probably aren't needing a dedicated server but just want to know that it's out there all right now the opposite end of the dedicated server spectrum would be a shared host now a shared host you guys are probably familiar with these are companies like Hostgator another popular one is Bluehost and you can see that these are really cheap platforms couple bucks a month five bucks a month and you know they got all these stats unlimited domains and limited FTP and limited email and limited unlimited unlimited is what they say all right and these aren't really unlimited these are kind of just like a free-for-all is the best way I like to describe it basically shared hosts you've got a big server and another big server usually they're pretty weak servers actually they have a server and then they basically sell thousands and thousands of people onto that server and that server can maybe only handle maybe a couple hundred at a time but they'll put thousands upon thousands on knowing that most of them what probably aren't gonna be on there at the same time so it should work out basically like most the time it should work out these servers are notorious for crashing and coming back up and I have I obviously have a shared host and I actually track and monitor uptime and stuff with a script I have on my computer and so these things go down sometimes as much as once a day you just don't know it because you're not on your website constantly but if you knew how often they go down if you had an uptime script you would be surprised at how fat how often these things go up and down they crash constantly and that's kind of the idea of shared hosting they just put a ton of people onto a server and it you know there's it's like a rollercoaster sometimes the performance is really good if there's no one else using the server at the same time then because you're sharing a server that's basically what it is so there's no one else on there you'll get really good performance if there's a bunch of other people you'll get terrible performance it crashes a lot things like that so anyway that's basically what a server shared host is now can you put a level level application on a shared host yes you can it does work from what I've heard I've never done it myself but there are people that have been able to make it work the problem is it's very difficult I don't think you get full access to the level because it you can't take full power of the level because the level doesn't have access to the to the server or anything like that so you're always never going to get quite the same experience in addition level is going to eat more resources than most likely depending on your application it may eat more resources than what these servers are really used to these servers really aren't designed for level so you're always going to be kind of fighting an uphill battle with shared hosts so we're not going to worry about shared house shared house are too difficult to configure because they have so much things locked down you don't really have control over the server so you're constantly trying to make it work based on like these settings inside of your control panel okay but anyway that's shared hosts now the other two platforms that we have is Virtual Private servers and pass which is platform as a service so when we look at digital or when we look at Virtual Private servers the names that come to 9r mind are definitely like Digital oceans very popular another one that's very popular is inland node and these are just virtual private servers this is basically where you own dedicated resources if we look here at the pricing page you can see that for example for five bucks a month here you get half a gig of memory you get one core processor you get 20 gig SSD and a terabyte of transfer or traffic basically okay so you get these are your dedicated resources you're not sharing them with anybody so you're guaranteed to have these resources alright and so this in a lot of ways is actually ten times more powerful than what is available from from other companies from shared hosts and stuff like this and so it's actually very affordable with companies like digital ocean and vulture and Linode okay so I highly recommend we do virtual private servers the downside of virtual private servers is they give you a server box and that's it okay you're going to get a box that you can SSH into a server and it's good you're going to have to do everything else you have to set up git you have to set up engine X or Apache and you have to set up PHP all of that you have to set up and that's why sometimes people get scared away from these but it's actually between a performance if you weigh the ratio basically a performance to price this is the best deal out there is Virtual Private servers because you get really good performance for really affordable we're a shared host you get terrible performance for really cheap and then dedicated servers to get really good performance for really expensive and then the opposite end of or not the opposite end but kind of a similar trend is going in through up platform-as-a-service something like Fort rabbit fort rabbit is a platform as-a-service another platform as a service that you're very familiar with I'm sure is Heroku and these are platforms they're like you basically giving you a VPS but they're giving additional value on top of there so they're giving you services like git and for example you coming in here and you can see what kind of services that giving you you get out of the box you get get push to deploy so you kind of get it's kind of similar like a shared host in the fact that like a lot of that stuff is built for you so you don't have to worry about it but at the same time you still get the virtual private server so it's kind of the best of both worlds the downside with these by the way through real quick you can also get composer you can get like HTTP ready to go out of the box SSH out of the box so a lot of these services are just ready to go and for those people that are scared about setting up their own server platform as-a-service allows you to have really good speed and reliability and stuff like that like you would with a VPS but at the same time have the convenience that you might get with something like a shared host where you don't have to manage all the details of the server now I'm going to show you how to use a VPS to install all of this stuff all right so we're going to install git we're going to we can install HTTP and SSH and all that out of we can install all that through our virtual private server but this is definitely an easy way to do it if you just want to boot it up and it's kind of like you push when you push your project to github and it's just done that's kind of how this is you push it to this service and then it handles all the rest and it's on the internet you don't have to configure anything or anything like that okay so that's what a platform is a service just real quick before we move on you basically have Fort rabbit there's Heroku is popular another one that's popular is called pagoda box oops pagoda box is another really popular one and then another really popular one is called a engine yard all right now I don't have any credits to give you guys on any of these platforms as a service because we're going to be focusing today on using we're going to focus today on using a virtual private server and what I'm actually going to be using instead of virtual digitalocean is vulture okay now vulture is my preferred VPS service even over digital ocean digital oceans really good - I've got a ten dollar credit for you guys for digital ocean and I've got a twenty dollar credit for vulture so I got you guys some credit so you guys can get up and moving on these servers and save a little bit of money and that way you can play it around with it for free and follow along okay now vulture is blazing fast I'm super happy with the performance of vulture how fast it is it feels like a local server like when I'm on vulture and even though my you know my websites in the cloud it feels like it's local it's so fast I've been really happy with it also their pricing is very affordable for their pricing their five dollar month server comes with three quarters of a gig of memory which is quite a bit and with and then a terabyte of bandwidth and 15 gig SSD very similar to digitalocean it's so fast though that's why I've really been happy at the vulture so if you guys want to get started with vulture I've got a $20 credit below just go down to the scription click the link for vulture you you click the link and then that automatically gives you the credit you don't there's no coupon code or anything so you have to go down click the link it's going to ask you to create an account it's just an email address your name and your password that's it and you get the credit you don't to put in a credit card or anything like that and then digitalocean has something similar go down click the link down there you little give you $10 in credit and it's the same thing I don't think you need a credit card or anything they just give you $10 in credit and there's no coupon code you have to click the link and then the link will give you the credit after you sign up okay so um anyway if you guys want to try those out I highly recommend them now I'm going to be following along with vulture today and we're going to be using vulture to create a virtual private server and then we're going to SSH into it okay so one of the things I really like about these services too is that they have hourly pricing so for example if you just want to boot it up and play with it for two or three hours just to see if you can get a server working it's only going to cost you like one or two pennies that's it like nothing it's going to cost you like two cents because you can just destroy it after two hours and then it only costs you the hour price okay so the way these work is when you start using it you pay the hourly price until you hit the max which is the five the monthly price so until you hit five then it caps off for the month okay and then you pay the hourly price again all right so the nice thing about this and digital oceans the same way they have hourly pricing and you just pay the points this is point seven pennies like less than a penny like three-quarters of a penny all a little bit less than three-quarters of a penny so it's really cheap and you can just pay the hourly price to get going and just to practice or play around on the server sometimes will launch like a minecraft server will use like will buy like one of these plans with two gigs of memory or something and it's three pennies per hour and will play me my friends will boot up a minecraft server and will use this to launch a minecraft server and then will just use it for like two days and then we'll just destroy it when we're done and it will cost like a bah it not only things a buck it's like seventy cents or sixty cents or something like that so we just use that for a couple days and then we're good to go anyway so just want to mention that there's hourly pricing on both of these so I highly recommend you go ahead get signed up I recommend vulture it's my favorite and let's go ahead and log in and let's get a virtual private server set up okay so now I'm going to go through and I'm going to do this on digital ocean and vulture so we got digital Ocean over here and we've got vulture over here okay so now with vulture what we're going to do and with both of them you just need to create a new server so we're going to click deploy new server and this is going to start like a whit a wizard to do a new server okay and on digitalocean it's the same thing it's they call them droplets but it's a server they'll call each server a droplet and with both of these okay so the the order they ask these are slightly different so let's just go through these I'm going to start with vulture and we're going to go down so with vulture they're going to ask you for the location you're going to choose a location closest to where most your users are so in that case if you're in the Philippines but most of your users are going to be from the United States you might want to choose a location nearest them so it's faster for your users ok so you can choose any of these locations if you guys aren't for the United States you don't know where those locations are obviously Silicon Valley's probably the most centralized west coast location it's in the middle at North and South but on the west coast Seattle's way in the north and then Los Angeles is way in the all on the west coast and then in the central of the United States Dallas is way down to the South Chicago's in the middle is north and south but in the center it's like in the dead center of the United States almost Chicago and then and then New York is going to be the Far East Coast and then up in the north and then Miami's Far East Coast in the south so just kind of choose a location near where your users are going to be Dallas or Chicago is a very centralized location if you're if you're wanting that okay so I'm going to choose Dallas it's a little closer to me because I'm near the south and yeah now down here you're going to it's going to ask you for what operating system you want so we're going to choose them Boone 216 so we're going to launch here with an abuti six version 16 and it's a 64-bit okay and that's the operating system for Linux that we're going to have now you can choose any operating system you want they're all going to run very very similar because they're all based off of Linux the biggest difference is the package managers they have this is like we'll use this in the next video but amoun to use as apt-get whereas some of these other ones use different package managers okay so I recommend just following along with them guntu and then you can do a different one later if you want but for this series I recommend watching in Bude too okay so now from here what I recommend is choosing your server size so we're just going to choose the five dollar-a-month we already kind of talked about the specs of it I think it's good enough at least to get started and as you grew you could upgrade the size of the server you have a couple other additional features down here you can choose like ipv6 if you'd like to enable that automatic backups DDoS protection and so forth digitalocean I don't think offers DDoS but they offer these other ones we're not going to enable any of these now vulture does have a start up script that you can write you can click here to create startup scripts and what this does is after it creates your server it'll run your script and so this allows you to install other things right from the get-go so you can install other applications if you like through a script so you write these scripts and then you can just launch them after your server okay so that's something you can offer you could do if you'd like I'm going to skip over that for now the next question asks you is about SSH keys SSH keys are basically hopefully you know what SSH keys are hope that you're using those with get all ready if you're not and you want to setup get SSH keys I highly recommend that you have an SSH key when you create one of these servers okay I highly recommend it not only is it more secure but it's also faster and just much easier to use so you're going to select your SSH key now if you just create an account you probably don't have an SSH key in here so you need to add your SSH key so you're going to come over click add new it's going to pop up a box so that's going to have the name that you want to name your SSH key you can name it whatever you want in this case I named it MacBook Pro Sierra the only purpose of that is so that you know what the SSH key belongs to so you can make sure you check the right one you know and then the second box is going to be the actual SSH key so you need to go in copy your SSH key and then paste it in that box and then click create and you'll be set ok now if you want to learn how to get your SSH key or how to create one on your computer I recommend you watch this video over here this video is actually set up forget but it will walk you through all about SSH keys how to get it's one set up and how to copy it to your clipboard now in this video we'll actually paste it into github but instead you'll just paste it into into a vulture or digitalocean ok that's the only difference so go ahead and watch that video if you do want to learn how to SSH keys alright so that's all we really need for this server let's go ahead and just finish this off we're going to give it a host name and a label so the host name I'm just going to call localhost that's the most common but you can call it whatever you need for your server I recommend just localhost unless you know what you're doing and the server label is just whatever name you need it now when you have all bunch of servers you know we're launched at the same time on your dashboard you'll see them listed and it will use this label to identify them so you want to know what this each server does so just give it a name it's going to describe what it does now in this case I'm going to call it lair of a blog and the reason is because I'm actually going to be pushing a project called our how to build a blog with level series and that is a series that we did on this channel to help beginners with label learn about label and how to get started with it we built a pretty decent you know intermediate level blog application from there and learned a lot about that along the way about labels so if you are in learning more about label and want to watch that series I recommend going back and watching that I'll have links for that here that you can go ahead and read and watch but that's the that's actually the project I'm going to be pushing to the server okay so I'm going to call it label blog and that's all it takes now we're done with vulture you can see here it's going to cost five dollars a month or 0.7 cents an hour and we can just click deploy and when we click deploy it's going to come over here and it's going to start booting it up now it takes about one minute for the install to happen so you can just basically let this happen in the background and in a moment it'll be done we can you know go through and login to the server I'm going to head on over to digitalocean now and talk about how to do it with digitalocean it's pretty easy it's basically the same thing the first thing you it asks you this time is the the operating system you want the default is actually the one you want so the default on vulture is sent OS and the default on digitalocean is um boom - so you want to do in boone - 16 and 64 bits so make sure you get the right one after that it asks you for your size I recommend just getting the five dollar one now there's a new feature with digitalocean called block storage which allows you to basically it's kind of like an Amazon s3 it's for large amounts of storage and you can basically attach this to your server so you can have additional storage in your server which is pretty cool now if you wanted one of those you could add that volume but we're going to skip over that for now the last thing it asks you is where you want to store your server what location they don't have as many locations on digitalocean but you'll just choose one near use so they've got they have a lot more in Asia I noticed over here and then they've got you know UK cup Amsterdam Frankfurt so they've got a couple they've got some good selections so go ahead and select one that you want these ones and twos by the way are just because there's multiple data centers at this location so you just choose your random one it doesn't really matter just choose whatever you feel like now you've got additional options like the private networking the ipv6 and stuff like that you can just select those if you want and then it asks you for your SSH keys just like it did before you'll need to have those set up in advance so if you have it you're going to want to click the news SSH key I already have some in my account so we're going to just click check the box for the one that I already have in my account which is this computer here lastly it asks you how many servers you want it caught droplets is what they call them and then it gives you a name so I'm just gonna call this label blog is going to be the name of our server but anyway you saw the process of doing it it's pretty easy you're going to click deploy and then it's going to boot it up in the same way that this one booted up okay it takes about a minute it's going to launch it and you're going to be good to go all right now let's talk about how now that we have our server it is running okay it's running we don't see it but it is out there in the world running in fact if we go to this IP address we could access it now of course nothing's going to happen because there's no server on this it's a server that exists but there's no like web server it doesn't know how to handle web traffic so we're not going to get anything and we're going to fix that over the next few videos we're going to be installing web servers and stuff like that to get it running okay so let's just really quick talk about how we can log into our server so we can start method on doing some stuff with it so what we're going to do is take this IP address and we're going to want to use this IP address to log into the server through SSH okay you're going to need an SSH client to do this next step and if you're on window or sorry Linux or Mac you have an SSH client built into your computer it's called terminal it has SSH built in you don't need to do anything you can just start using SSH that makes it really nice now if you're on Windows you do need a separate computer or a separate application of course so you're going to need to install an SSH client so just search for a putty SSH and this is going to be the most commonly used SSH on Windows so you can just click this first option here you can see they have a really nice website so they put a lot of time into this website some really advanced CSS files and stuff and you can basically if you just go the with their really advanced menu up here you just click on the download link and it will take you there and you can download this putty Exe now it looks like you're downloading a virus I'm not sure what to tell you about that it is highly reliable Windows users everywhere use it for SSH it seems to be the platform everyone uses and talks about so that's what you're going to want to do there and then make sure you go to Twitter let them know how nice their website is you don't want this kind of hard work to go to be any sort of thankless work okay so oops that's all we've got for that one let's go back over to so yeah download that and then you're going to have SSH setup for windows everyone else you can just head on over to terminal so let's do that so make sure you have your your IP address here and you either need your IP address or your domain name so if you want to set up a domain you're going to want to go over to DNS over here and make sure you link your domain to this server okay and that way you can type in your domain but for this tutorial we're just going to use the IP so let's go over to our terminal and what we're going to do here is I'm on my on my local computer we're going to log in to that server with SSH so we're going to type SSH root and then the @ sign and then our IP address okay now the way this works is SSH tells it to log in via SSH obviously and then the root is the user that we want to log in is every Linux computer has a root user that's the default user and if you wanted to create more users after you log in the first time you can and then you could log in with those so if you if you I created a user called Alex I would just and I want to log in as that I could just do Alex and then I would log in as the Alex user okay but in this case we're just going to call root because we there is no other user and then you would do either your domain name or your IP address so if you set up a domain name you would do your domain name like this okay but in this case we're just have our IP address and then we're done with that you click enter and it's going to log you in okay now the first time you log in it's going to ask you if you want to if this is secure and you want to share your you know this is their fingerprint do you want to share with them whatever you're going to type yes and you only have to do this the first time okay so click yes it's going to tell you it permanently added this IP address to your list of known hosts once it's in that list of known hosts then it'll automatically log you in whenever you try to log in you don't get that question anymore and then here we are so we're now on a boon to 16 and this is basically the launch screen from boone to we have full access to our computer now we can do whatever we want to it okay so it's pretty cool now one thing I want to show you real quick before we move on to the next video is just so you can identify whether you're SS aged into a computer or whether you're on your local computer it's important to know this because it's very easy to get confused on whether you're on your your local computer or on your SSH or cloud computer especially because a lot of times I'll have two windows open one is for the the local and one is for the cloud and so the biggest way to tell is this pound sign if you see a pound sign that means your SSH tin if you see a dollar sign that means you're on your local computer also you'll see this route at localhost that just again means that you're on you're logged in as root and you're at this is the hostname localhost so you're logged in on this server okay so that's basically all it takes see you started we're going to talk more about how to install applications in the next video because that's the next step is to start installing our lamp stack or a lamp stack and we'll talk about that in the next video now if you do ever want to log out of your this computer you're currently logged in this computer so every command you type will go to the computer if you want to log out you just type exit and click enter and that will log you out and you can see here it closes the connection and now you see the name of my computer the user I'm logged in is and then the dollar sign and that's because I'm on my local computer ok so this is how you access you can tell the difference between your local computer this dot this dollar sign or this the pound sign like this okay alright so that's basically all I got for you guys today the next part is going to talk about how to install a lamp stack onto your server if you're interested in a lamp stack I'm going to do that video sometime in the future but I'm going to put both videos up here if you see a link for that video you can go ahead and click lamp stack if you interested in that as well the only difference difference between a limb stack and a lamp stack is the server it's whether you use Apache or nginx everything else is going to be the same so the only difference is this one video and then after that all the other stuffs the same okay so I personally recommend you do the lamp stack unless you really really really want the Apache the LEM stack is more common in level so if you're on forums and blogs you're going to see more information about the nginx or the Lemp stack you're going to see more information about it seems to be more preferred in the level community and that's why I recommend okay so that's all I have for you guys today I'm going to see you guys in part two where we start installing either the LEM stack or the lamp okay
Info
Channel: DevMarketer
Views: 41,083
Rating: undefined out of 5
Keywords: laravel, deploy, hosting, vps, developer, tutorial, guide, digital ocean, vultr, server, app
Id: gD53Qz3vSrU
Channel Id: undefined
Length: 27min 3sec (1623 seconds)
Published: Wed Aug 31 2016
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.