[No Audio]
Let's install nginx web server on our local machine.
nginx Web server is the most vanilla example of a web application.
For your information, we are running Ubuntu 16.4 on this
machine and now let's start with switching to the root user
privileges. As you can see, we have moved to root privileges.
Now we can start our installation by first of all, downloading
the PGP or Pretty Good Privacy key for nginx.
The purpose of doing so, is to make sure that when we install
nginx, the binaries are verified, the key has been downloaded.
Now let's switch to etc/apt directory.
With ls command, let's list out the contents.
We have a bunch of files here, but what we need is sources.list file.
So let's open sources.list with Nano text editor.
You can use any text editor you like, but in this course
we will mostly stick to Nano.
As you can see, this file contains a lot of links.
These links are sources for Ubuntu to find updates.
At the end of the file, paste these two lines.
These lines indicate the update path for nginx application
when it gets installed and we update it further in the future.
Let's save the file and exit Nano.
Just to make sure we don't
have any dangling nginx installation,
run 'apt-get remove nginx-common',
this command will make sure
that any of the previously installed instance of nginx installation
is completely removed.
Now let's run 'apt-get update' to reflect the changes we have
made in sources.list file.
Let's use cd command twice to go back where we started.
Now let's install nginx using
'apt-get install nginx' command.
Once the installation is complete, we can verify it by going
to web browser and opening localhost on port 80.
Well, the installation was successful.
nginx is running properly.
This was an example of installing and running
the most simple and vanilla web application, nginx web server.