Hey guys!
Welcome back.
So,
my desktop looks a bit different because I accidentally destroyed my Ubuntu partition.
Well, it was an accident. I guess it was a mistake.
I was
reformatting
a partition to put something else on to it
and, I didn't think that the partition I was reformatting was the one
that had Ubuntu on. I thought Ubuntu was on a different partition
and so I completely lost
the entire installation.
And so I've installed Zorin OS 11 which is based on Ubuntu 15.10
so it's the same version that we were using when we started
and that means that everything's gonna be the same.
The only thing is, it's gonna look a bit different.
So,
in this video we're gonna be going over how to deploy our
Meteor app to an Apache 2 server
and so the first thing we need to do is open up terminal here, so ctrl alt t
and then change directory into
the projects directory
and then what we need to do is we need to build
the Meteor app.
So you're gonna issue the command
meteor build
and then where that build's just, this is gonna be one directory up
in todo-app.
Alright guys,
so that took a little longer than I expected. It does take a bit of time
because it's compiling the entire project
into,
in into it's final form.
So,
what you're gonna see is
if you change directory up on one level that we've now got a todo-app directory.
So I'm going to change directories
again in to there
and we've got a resulting tar.gz files so what we need to do is copy this to our
Apache HTML directory
so just type
cp todo.tar.gz
and then where we're putting it which is
here.
Now if you change directory
to
there,
you'll see that you've got todo.tar.gz
there. So what we need to do is extract this.
So,
you're gonna run the tar command
like this,
tar ending.
The first
parameter
is going to be -xvf
and then, the file.
So tar.
err sorry,
todo.tar.gz.
It's going to extract it.
So,
when you run ls again you should see a bundle directory.
So we're going to
go into there.
Now,
what we need to do next is to install node.js.
You
won't be able to install from the repositories as
the version that's included in our repositories is node
0.10.25
and the version that we actually need is 0.10.29 or higher.
So, what we're gonna do is go add a specific package.
This is the URL, I will include it in the
in the end of this lecture.
What you're gonna do is just,
if you go to the PPA here
you'll see Trusty, Utopic, Vivid and Wily and we're on
version Wily so it's great out but if you're not yet just
click whichever would make sense for you
according to your system and then scroll down a bit here
and
click on the most recent
package.
It's gonna take you to this page which I was on before
and then click
64 bit Dev package to download it
and click keep.
Now you're gonna open this and it should open up the Software Centere.
We're gonna be manually installing this.
I've already got it installed and so it's not gonna let me,
well it would let me reinstall it if I wanted to I'm not gonna do that.
Basically, once it opens up it's gonna prompt you that
an older versions included in your system's repositories and it's recommended that you
use that version instead and only install this if
you know what it is basically.
You can just disregard that,
this is the package we need so you're gonna see an Install button
here on the right. Just click that and let it install.
Once it's done, you can close this program here.
Come back to terminal
and from the bundle directory you actually,
if you run ls command
this is what the structure of the directory looks like.
The main.js file is gonna be of interest here in a few minutes
but for right now, just change directory into programs/server
and run sudo npm install
and what this is gonna do is this is going to reinstall node.js fibers
for our Meteor application.
So,
now the app is ready to go but we've got to configure a few other things.