Tutorial on installing nginx in Linux environment

Tutorial on installing nginx in Linux environment

1. Install the required environment

//Install gcc
yum install gcc-c++

//Install PCRE pcre-devel
yum install -y pcre pcre-devel

//Install zlib
yum install -y zlib zlib-devel

//Install Open SSL
yum install -y openssl openssl-devel

2. Create the nginx directory and download the installation package

//Enter the usr/local directory cd /usr/local

//Create nginx directory mkdir nginx

//Enter the nginx directory cd nginx

//Download the tarball wget http://nginx.org/download/nginx-1.13.7.tar.gz

//Unzip tar
tar -xvf nginx-1.13.7.tar.gz

3. Install nginx

//Enter the nginx directory cd /usr/local/nginx/nginx-1.13.7

//Execute the command ./configure

//Execute the make command (if the execution fails, please check whether the first four installed are installed successfully)
make

//Execute the make install command make install

4. Start nginx

//Enter the /usr/local/nginx/sbin directory and enter ./nginx to start nginx
./nginx

//Close nginx
./nginx -s quit or ./nginx -s stop

//Restart nginx
./nginx -s reload

//View the nginx process ps -ef | grep nginx

5. Set to start automatically

//Edit vim /etc/rc.local

//Add this line at the bottom /usr/local/nginx/sbin/nginx

This is the end of this article about the tutorial on installing nginx in Linux environment. For more relevant content about installing nginx in Linux, please search for previous articles on 123WORDPRESS.COM or continue to browse the related articles below. I hope everyone will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • How to quickly install Nginx in Linux
  • Detailed steps to install Nginx on Linux
  • Correct steps to install Nginx in Linux

<<:  Vue implements partial refresh of the page (router-view page refresh)

>>:  Several methods to execute sql files under mysql command line

Recommend

HTTP return code list (Chinese and English explanation)

http return code list (below is an overview) for ...

Ubuntu 19.10 enables ssh service (detailed process)

It took me more than an hour to open ssh in Ubunt...

jQuery plugin to achieve seamless carousel

Seamless carousel is a very common effect, and it...

Vue implements anchor positioning function

This article example shares the specific code of ...

Building .NET Core 2.0 + Nginx + Supervisor environment under Centos7 system

1. Introduction to Linux .NET Core Microsoft has ...

10 Tips for Mobile App User Interface Design

Tip 1: Stay focused The best mobile apps focus on...

Nginx reverse proxy and load balancing practice

Reverse Proxy Reverse proxy refers to receiving t...

CSS uses BEM naming convention practice

When you see a class, what information do you wan...

MySQL MyISAM default storage engine implementation principle

By default, the MyISAM table will generate three ...

How to install the graphical interface in Linux

1. Linux installation (root user operation) 1. In...

Tutorial on installing MySQL 5.7.18 using RPM package

system: CentOS 7 RPM packages: mysql-community-cl...

A brief discussion on using Vue to complete the mobile apk project

Table of contents Basic Configuration Entry file ...

MySQL's method of dealing with duplicate data (preventing and deleting)

Some MySQL tables may contain duplicate records. ...

In-depth explanation of the principle of MySQL Innodb index

introduction Looking back four years ago, when I ...