How to Create an Always Free Website on the Oracle Cloud

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 i'm going to show you how to create a website on the oracle cloud free tier now this is pretty much a 100 completely free website they have this always free tier on the on the oracle cloud and that's what we're going to work through today i'm going to set up a vm we're going to install some software on there associate a domain name with it the domain name you will have to pay for but other than that the service itself the hosting is free and you get a certain amount of benefits with that which i will explain in this video this is as slightly technical video but the cool thing is i'm going to walk you through every step of the process including the account sign up the spin-up of the vm and all that stuff so if that's something you're interested in then let's go ahead and hop right on into the tutorial okay so go to oracle.com cloud free and you'll come to a page that looks similar to this now what we're working with is the always free cloud services okay so this is a highlight of what you're going to get with those always free cloud services but what we're going to do is take advantage of one of these virtual machines okay and there's going to be a lot of stuff here that we go through for the setup process of the vm but as long as you follow through uh with the choices that i make then you don't have to worry about having to pay for any of it okay so let's click on this button that says start for free and what we're going to do is type in your information so i'm going to pick my country i'm from the united states and type in my name last name and my email and prove that i'm a human we have to do one of these okay then verify your email okay so oracle has sent an email verification link to my email address so that's open over here and this is just verifying that you actually own that email so we'll do that and that has been verified now the next thing that we want to do is create a password optional company name an account name in a home region so i'm going to go ahead and do that and then finally pick a home region which for me i'll pick us west phoenix okay so click on continue and fill out your address information and after you do that then you have to do the payment verification now you will need some type of payment method to associate with your account that's not to say that you're going to be charged anything as it says here you won't be charged unless you elect to upgrade the account so this is this is we're specifically working with the oracle cloud free tier so go ahead and add a credit card to your account but again you won't be charged for anything okay so i have added my payment information i'm going to click close and just click that you agree to the service agreement and then you can start your free trial and let that happen okay so once you have your account you're going to come to a dashboard that looks something similar to this and what you can do is click on create a vm instance but just in case this option isn't here which by the way it is always free eligible you can also come to the three hamburger menu over in the upper left hand corner come to compute and go to instances now this is my um account that i've already worked with before as you can see it's in a different region than the one i just showed you it's in ashburn so i was playing around with this prior to this tutorial but the like i'm saying the alternative is to click on create instance and that's going to take you to the same exact place so what we're going to do is create our always free vm machine we can call it whatever you want i'm going to call mayan tony's vm and what we're going to do is configure a couple options in here so for placement we're not going to do anything i just want to show you that you have options of which domain you want to associate that with the default is just fine because again it is always free eligible now the image and shape we're going to install the default is oracle linux obviously because we're using oracle.com but we can change that to be another operating system so let's do an ubuntu operating system which again this one is always free eligible we'll do a full installation of 20.04 so we'll select that image and you can pick something else like centos or you can keep oracle as well now for the shape this is this is talking about the processor and the memory so the always free eligible option is the one core one gigabyte of memory uh half a gigabit per second network bandwidth amd micro instance i do want to point out that this one yes it's always free eligible but there's also another option in here amd doesn't have any intel doesn't have any free options but the free option for ampere i think that's how you say that is this vm standard a1 flex which is one cpu cord and six gigabytes of memory with one gigabit per second networking now the reason that i'm not going to pick this one for the tutorial and i'm just going to stick with the default this one right here is because uh if we look at the always free resource page you'll see that the micro instance with amd processor you get two free vms using this uh this shape whereas i'm not really sure i completely understand the fact that you get the first 3 000 oc pu hours and 18 000 gigabyte hours per month for free so the it seems like at some point you will hit a limit but in order to you know avoid that completely let's just stick with the micro instance in this case so back over here uh we will stick with that and then for networking we'll do a little bit of networking configuration later so we'll keep the defaults as they are right now but for the ssh key let's go ahead and generate a key pair for me so let's save the public key and the private key and that looks good and we'll use that to ssh to log into the server in the future and then for the boot volume um technically well by default we're getting 46.6 gigabytes of space in our default boot volume um again according to the documentation we can have up to let me see if i can find this real quick storage it's 200 yeah so block volume all tendencies receive a total of 200 gigabytes of block volume storage so if you have two vms each one of them can have 100 gigabytes or you can put one vm with 200 gigabytes but again for this tutorial i'm just going to stick with the default volume size you can come check this box and pick a size for the free tier up to 200 gigabytes okay so that's it for the configuration let's go ahead and create that and this will take a little bit for it to spin up so we'll just fast forward through this process and i'll catch up with you when it finishes okay guys about one minute later tops we have our vm instance up and running as you can see here a couple points of information we can see that our public ip address is this right here ending in dot five nine so we want to take note of that and also the user name is ubuntu so that's how we're gonna access it via ssh but first let's do some configuration for this instance as far as networking is concerned so let's click on the hamburger menu up here go to networking and virtual cloud networks so one of these is automatically created for your instance so click on that and what we want to do is click on the subnet and default security list for that we're going to dive down in here and what we're going to do is add it in ingress rule to allow http connections over port 80. so basically you can just do this verbatim what i'm going to do here so for the source you're going to do 0.0.0.0 forward slash zero the protocol that's fine for tcp the port range for the source is fine we're just going to specify 80 for the destination and basically this is allowing allow http connections okay so we'll add that ingress rule and we should be good with networking from the the panel perspective here so if we go back to our compute instance we can do that and look at the information for that again and this is what we're working with so let's connect to this via h or via ssh so we'll copy our ip address i'm going to open up a terminal window and if you're on windows you can use putty to do this i'll have a link about that how to connect via ssh to a remote server um and let's go to the desktop because that's uh actually no they're in our downloads folder i believe uh let's go to the downloads folder to see our ssh keys so the one we're going to be working with is the private key so let's make let's lock that down a little bit let's change the permissions for this to 400 and that's just going to be the ssh key itself okay that just makes it a little bit more secure so now to ssh with that key we can do ssh dash i the ss and we're going to specify the key that we want to ssh in with that one right here the one that we downloaded and then the username ubuntu at the ip address okay and again let me show you here this is the ip address and this is the username okay so with that set up let's hit enter and that should it'll prompt us initially this is the first and only time that'll do this do you want to continue connecting yes we do and that should put us right into the terminal of our remote vm so ubuntu at tony's vm so we are on the server that we just spun up that's really cool let's do as per good practice let's do an apt update i guess we'll have to use sudo apt update and that'll just update the packages that we're looking at it's not going to update anything locally as far as packages are concerned we'll do that next with an apt upgrade okay and now we can do a sudo apt upgrade and that will actually upgrade the packages on our system so this is 395 megabytes of additional disk space hit y and enter and we'll fast forward through this as well okay guys so with our system up to date we now have an ubuntu server which you can pretty much do whatever you want with but for those of you who are not familiar with ubuntu or servers or cloud computing or anything like that we're going to continue the tutorial and install a website specifically a wordpress website running on an nginx web server again if you don't know what a lot of that means i'm going to walk you through each step of the process so let's start out with installing those packages so let's do a sudo apt install we're going to install the nginx web server okay that's going to be what allows us to host a website we're going to use a database called maria database m-a-r-i-a-d-b server dash server and then we're going to use php so php we're going to get php the mysql package the php curl package php gd and php zip up and one more php fpm of course so these packages combined will are essentially called um what we're doing at this point is building a lemp server a linux nginx mysql or maria database and php server that's going to allow us to host pretty much any website that we want the website that we're specifically going to be hosting is a wordpress website so let's go ahead and let this happen and we'll fast forward through this one as well okay so at this point if we minimize this and copy our ip address and try to navigate to that in a web browser we're not going to see anything show up because there's one last step that we have to do to open up the port 80 which is the http port so i'm going to use my cheat sheet over here i mean if you guys need to use a cheat sheet as well instead of typing this off the screen i do have the commands listed in the description below so sudo ib tables is basically this whole command is going to open the tcp port 80 and allow connections to that so let's hit enter and that's going to open up that port and now if we type in sudo net filter f-i-l-t-e-r persist persistent save that'll save those so when we reboot the server that same rule will apply and as you can see in the background we are now connected to our web server at our ip address so we're making really good progress now as far as making a website a usable website on here you can do something simple you can come into the var www.html directory um which is and actually will cd into that directory which is going to change our directory into the html directory and you'll see that this is the html file that's serving the page that we just saw so if we want to modify that to be to say something else instead of welcome to nginx we'll say we'll get rid of this uh we're changing a read-only file so actually we have to edit this as sudo uh bear with me for a second so we can come back in here and if you do want to edit this file you can just prefix the command with sudo and by the way if you've never used vim before i have a tutorial on that as well instead of saying welcome to nginx let's have it say tony between these two header one elements tony teaches tech t-e-c-h okay save that file come back to a web browser refresh the page and you are already essentially having a website at this point a basic html website but like i said we want to create a wordpress website so let's do that let's set up our wordpress database we can do that with sudo mysql and this is going to enter into the my maria database command prompt okay so in here let's create a mysql user and when i say my sql just i'm referencing maria database they're used interchangeably in this case so the user's name is going to be tony and this could be whatever you want for yourself at local host identified by and this is his password so for this this case i'll just do a unsecure password for the sake of this tutorial like comment subscribe and every mysql command that you execute needs to be terminated with a semicolon so let's go ahead and execute that so we made this user tony and his password is like comment subscribe let's grant all privileges on all tables in this database to tony at localhost okay so that's going to give tony the permissions that he needs to use this database okay so let's create the actual database and we'll call it wordpress database wpdb and then we will flush privileges to save those changes and we'll get out of here so that takes care of our database setup now for wordpress itself let's go to um let's grab the source code for wordpress so we can do that with sudo wget https colon slash wordpress dot org slash latest l-a-t-e-s-t dot tar dot gz and that's gonna download that archive onto our computer or onto the server i should say at this location var www.html and then when that's finished we can extract it and pretty much put it in this same directory where our index file is to serve that content the wordpress content okay so with an ls we can see that that that archive has been installed let's remove the html file we can do that with rm and i think it's going to ask us for sudo permissions so yeah let's do sudo rm index.nginxdbn.html so right now we only have the latest.tar.gz file in this directory so let's extract that let's do sudo tar xv f z those are some arguments for the tar to extract that and then give it the name of the tar file so latest.gz and that's going to extract everything into a wordpress directory and we actually i think i should have put that at the html level so let's just let's just take everything out of the wordpress directory and put it into the html directory so to do that i'm going to say move everything from wordpress into this current directory that's the syntax for that and then i'll have to do sudo for that sudo move wordpress everything in there to this current directory and then let's remove the latest.tar.gz file and i keep forgetting i need to do uh prefix everything with sudo s-u-d-o okay and then s-u-d-o let's remove the wordpress directory so i'll do sudo rm-rf to remove a folder wordpress hit enter so now we have all of our wordpress content in the www.html directory okay at this point um let's go ahead and add a domain name to our website so right now we're accessing our website via an ip address this is the ip address i'm going to copy that and regardless of wherever you got your domain name from i got mine from namecheap but if you got yours from godaddy or dreamhost or google domains the concept of adding a dns record is going to be similar so pretty much open up wherever you got your domain name from and find the domain name that you want to associate with it i'm going to use tonys.surf i'm going to click on that manage button go to the dns section for that domain name and i already have 2a records here if you don't you'll have to add a new record of type a and one for the host itself with the at symbol we're going to put the ip address of our vm which is this right here and then one for www.tonys.surf let's put the same ip address in there so we'll save those changes so that way when somebody goes to tony's dot surf in their address bar they're actually going to go to this ip address which as you already saw we have the website there so let's minimize that that's all we need to do for that type of configuration and open up our terminal window again and in here now we can tell our web server which is nginx in this case that we have a domain name so we can do sudo vim etc nginx sites available and in here you just have one file it's called the default uh nginx configuration file we're going to modify this so we're going to tell inside the server block right here you can see the server block opens on this line we're listening on port 80 the root of our website is at var www.html and the server name is going to be tonys.surf and www.tonys.surf so that's my domain name now for the for php wordpress uses php so the index file is going to be something called index.php and you might have noticed that earlier when we were looking at the wordpress files but that's something that is whenever somebody goes to your website and doesn't say dot like tonys.serv slash index.php that's the default one that they're going to go to the default page and because we are using php down here in the location section this is commented out by default but we want to uncomment this because we are using fast cgi just we're going to use the unix socket in this case because we're using php version 7.4 and this this directory should exist on your system and we can verify that's the case so we'll save our changes i think that's all we have to do in here and make sure that this socket file exists and it does so that's that's basically how the web server is going to communicate with php it's a little advanced but um just so you know that that's there okay so now that we made changes to our nginx file let's make sure that we didn't make any mistakes and we can do that with sudo nginx dash t and it says the configuration syntax looks okay and then test is successful so that means we can restart the nginx server to apply those changes with sudo system ctl restart nginx okay no output so that's a good sign let's see if our domain name is pointing to our ip address and if it is we should be able to go through the rest of the wordpress install so let's instead of going to this ip address let's go to tony's dot surf s s u r f r f i cannot type okay hit enter fingers crossed that this connects and it does so now because we put wordpress into the var www.html directory that content is serving and let me just show you by the way the index.php file exists at that location so let's go through the wordpress install click on let's go and the database name so this is this is from a little bit before in our tutorial the database name we called i called mine wpdb wordpress database the username was tony and his password was like comment subscribe uh we're gonna we were operating on localhost and it's okay to add a table free prefix wp underscore to all of our tables so what this is going to do when we click submit is to create all of those tables and we if you do have this message that just means there's a permission issue with wp config.php so let's uh let's actually take care of that we must have missed something in one of our steps earlier so um inside of the wordpress or the var www.html directory we basically just want to do a c h m o now c c h o c own c-h-o-w-n which means change ownership to www-data user and the ww-data group for everything in this directory and to be explicit it's basically we're saying in var www.html directory and we want to do that recursively so we'll do that dash r flag i think that's a lower case and make sure we prefix that with sudo so let's execute that it's a capital r so to review we're changing ownership of everything under the var www.html directory to the user in the group www data okay so that looks good let's try to do that one more time see if it works and it we have to go through the same steps so database name wp db username tony password like comment subscribe and everything else could be the default s-u-b-s-e-r-a-b-e looks good submit all right very good so that was what we missed earlier so let's run the installation this is now information specific to the blog that you want to set up for your wordpress website or it doesn't have to be a blog it could be whatever you want so i'm going to call mine tony's blog the username that's going to log into the wordpress dashboard what do we want that to be let's call the username tony teaches tech and the password for this uh we'll we'll keep this nice strong password here and then the email associated with your wordpress account is tony or for me it's going to be tony teaches tech gmail.com all right let's go ahead and install wordpress that'll take just a couple seconds and let's log in to our website so the username was tony teaches tech for me and the password i have on the clipboard log in and there we go so this is the wordpress dashboard we'll get out of here you can do a whole bunch of stuff create posts create pages install plugins for additional functionality change the theme to something else the default theme right now is this one 2021 so if you go to actual the actual blog itself at tonys.surf this is what you're going to see now if you want to know what to do after installing wordpress i have just the video for you check that out right here it's 15 things to do after installing wordpress and if you want an ssl certificate for your website i also have a video about that so check out those two videos like this video if you liked it subscribe for more videos like this from me in the future and if you do i'll see you in the next one
Info
Channel: Tony Teaches Tech
Views: 9,343
Rating: undefined out of 5
Keywords: create a website for free, free website hosting, how to create a website for free, how to build a website for free, oracle always free, how to make a website for free, oracle always free cloud, oracle cloud always free tier, always free tier oracle, oracle cloud free always, oracle cloud always free, always free oracle, oracle always free tier, oracle cloud free tier, oracle cloud free, free oracle cloud account
Id: yWVD6qmQrb8
Channel Id: undefined
Length: 27min 39sec (1659 seconds)
Published: Thu Oct 21 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.