Welcome to the NGINX tutorial on How to Install NGINX on the Ubuntu and Linux
operating systems. The first thing that you're going to want to do when you want
to install NGINX is go to NGINX.org. Once on NGINX.org, go to the menu on the
right side and click on the download button. And when you do that you'll be
taken to our download page which lists the latest versions of NGINX as well as
some legacy versions. What We're gonna do is scroll down to the very end we see two
options for using pre-build packages for NGINX. There are three different
options for installing NGINX. Our recommended method is to use the
Mainline Branch but the Mainline Branch always have the latest code and we put
out new versions and feature enhancements every four to six weeks.
A second option is a Stable Branch. The Stable Branch is only updated for
critical issues and security vulnerabilities, so if you don't need the
latest features or you just want a branch that doesn't change very often
then the Stable Branch is a good option for you.
There's a third option and that's using the build of NGINX that provided by your
OS vendor and in this case that would be the builds provided by Debian and Ubuntu.
We typically don't recommend people to use that because they're not updated as
frequently and a lot of times are running fairly old versions of NGINX
so you're missing on the latest code features and most importantly you're not
getting the latest security patches. So I'm gonna go ahead and click on the
Mainline version here and that takes us to the instructions for how to install
our Mainline repository and then of course install NGINX for a mainline
repository and scrolling down a little here we see information on our
repository for both Debian and Ubuntu and that's really the only difference is
just the address for the repo ends in /Debian for Debian
and /Ubuntu for Ubuntu operating system. You see the code name piece of it
in italics and you would replace that with the actual code name for the
distro that you using. In this example we'll be using Ubuntu 17.04 and
the code name for that is Zesty. On the Debian side of course you would use
Stretch or Jessie. And so the first thing here I'm going to do is go to my /etc/apt
directory and the instructions here say to edit the sources dot list file
directly and put in the repo addresses in there. What I typically do instead, is
go to /etc/apt.sources.list.d and I create a file specifically for it so /nginx.list.
I think that keeps things a little bit more tidy than putting everything in
a single file especially if you are using multiple repos from for multiple
different vendors. And I put in my sudo password and I'm send a copy and paste
this section from our website
and I'm gonna change codename here to - Zesty because that's what I'm using
After I click save that's it. The next thing to do is add in the signing key
but to do that I just click on the this key link and click on copy link address
and I'm gonna go ahead and wget that file onto my system and once that's done
I'm gonna go ahead and install it sudo app-key add nginx_signing.key and that
adds in the signing key and once the signing key is in we can go ahead and
actually install NGINX. So, the first thing to do is sudo apt-get update and
that's gonna update our list of repositories with the newest repository
that we added you can see it as it scrolls up that nginx.org passed and so
that means that we're now downloading packages from the nginx.org
repository. Gonna give this a few seconds to complete and then after this does
complete we're going to go ahead and install NGINX is just a simple sudo
apt-get install NGINX and that's gonna go ahead and install NGINX from our
official repository. And then once that is done and installed we're gonna go
ahead and make sure and verify that the install went through correctly there's a
few different commands you can do to to do that verification. So now that the
installation has completed I'm gonna run nginx-v and that prints out the
version number for NGINX installed on this system and it's for this tutorial
it's version nginx/1.13.7 which is the latest version of
NGINX that's a recording of this video and a second thing that I typically do
is ps -ef | grep nginx. You can see here that no NGINX processes are
running so now I'm gonna go ahead and run the startup script and that's
sudo /etc/init.d/nginx start. And that starts the NGINX service and run that ps
command again ps -ef | grep nginx and now I see that
there are two processes the NGINX master process which runs as route and the
master process splits off the worker process which does the actual heavy
lifting of processing user traffic. The worker process runs as user NGINX.
And so, by seeing these two processes we verify now that NGINX has been started
on this system and as has been installed properly.
And that concludes this tutorial on How to Install NGINX for the Ubuntu and
Debian Linux operating systems.




For more infomation >> How India's New Russian Air Defence System Will Force Adversaries To Change Tactics - Duration: 6:50.
For more infomation >> This video shows how much I care for you Australia. - Duration: 0:26. 




For more infomation >> How to connect mobile data with desktop/laptop by USB cable|| connect your mobile with system hindi - Duration: 4:01. 






Không có nhận xét nào:
Đăng nhận xét