Ubuntu Unleashed 2019 Edition: Covering 18.04, 18.10, 19.04

(singke) #1

for problems that complexity brings.


Installing the Nginx Server


You can install Nginx through APT or build it yourself from source code. The
Nginx source builds on just about any UNIX-like operating system and on
Win32.


If you are about to install a new version of Nginx, shut down the old server.
Even if it’s unlikely that the old server will interfere with the installation
procedure, shutting it down ensures that there will be no problems. If you do
not know how to stop Nginx, see the section “Configuring the Nginx Server,”
later in this chapter.


Installing from the Ubuntu Repositories


You can install the nginx package from the Ubuntu software repositories.
Updated packages usually contain important bug and security fixes. When an
updated version is released, install it as quickly as possible to keep your
system secure.


For more information about installing software from the Ubuntu repositories,
see Chapter 9, “Managing Software.”


Building the Source Yourself


You can download the Nginx source directly from
http://wiki.nginx.org/Install.


When you have the tar file, you must open it in a temporary directory, such
as /tmp. Opening this tar file creates a directory called
nginx_version_number, where version_number is the version you have
downloaded (for example, nginx_1.4.4).


TIP
As with many other software packages distributed in source code form for
Linux and other UNIX-like operating systems, extracting the source code
results in a directory that contains a README and an INSTALL file. Be
sure to peruse the INSTALL file before attempting to build and install the
software.
Free download pdf