编程知识 cdmana.com

Platform installation introduced by # yyds dry goods inventory # nginx

Previously introduced NGINX Related concepts of , You can refer to ​ ​https://blog.51cto.com/lifulin/4331945​

Next, let's share how to install Nginx, Installation can be divided into yum Install and compile , So it will involve .

Download the installation package on the official website :

#yyds Dry inventory #Nginx Introduction to platform installation _Linux

#yyds Dry inventory #Nginx Introduction to platform installation _nginx_02

install nginx Related dependencies :

#yyds Dry inventory #Nginx Introduction to platform installation _Linux_03

First step , install pcre

cd /usr/src

wget ​ ​http://downloads.sourceforge.net/project/pcre/pcre/8.37/pcre-8.37.tar.gz​

#yyds Dry inventory #Nginx Introduction to platform installation _nginx_04

Unzip the file ,tar –xvf pcre-8.37.tar.gz

#yyds Dry inventory #Nginx Introduction to platform installation _ load _05

cd /pcre-8.37.tar.gz

./configure

An error is as follows :

#yyds Dry inventory #Nginx Introduction to platform installation _Linux_06

Install first gcc Components :

yum install -y gcc gcc-c++

#yyds Dry inventory #Nginx Introduction to platform installation _ load _07

Re execution ./configure

#yyds Dry inventory #Nginx Introduction to platform installation _nginx_08

perform make

#yyds Dry inventory #Nginx Introduction to platform installation _Linux_09

Re execution make install

#yyds Dry inventory #Nginx Introduction to platform installation _nginx_10

The installation is complete

View version :

#yyds Dry inventory #Nginx Introduction to platform installation _Linux_11

The second step , install openssl

The third step , install zlib

yum -y install make zlib zlib-devel gcc-c++ libtool openssl openssl-devel

#yyds Dry inventory #Nginx Introduction to platform installation _ load _12

​ install nginx:

Upload files to /usr/src Catalog ​

#yyds Dry inventory #Nginx Introduction to platform installation _nginx_13

decompression tar -xvf nginx-1.18.0.tar.gz

#yyds Dry inventory #Nginx Introduction to platform installation _nginx_14

Enter into nginx Directory , perform ./configure

#yyds Dry inventory #Nginx Introduction to platform installation _nginx_15

perform make && make install

Compilation and installation :

#yyds Dry inventory #Nginx Introduction to platform installation _nginx_16

After installation , A directory will appear :/usr/local/nginx

#yyds Dry inventory #Nginx Introduction to platform installation _nginx_17

The startup script is in /sbin/nginx.

Start command :./nginx

Check whether the startup is successful :ps -ef | grep nginx

#yyds Dry inventory #Nginx Introduction to platform installation _Linux_18

Profile path :/usr/local/nginx/conf/nginx.conf

Access test :

#yyds Dry inventory #Nginx Introduction to platform installation _ load _19

版权声明
本文为[qingfenghaha]所创,转载请带上原文链接,感谢
https://cdmana.com/2021/11/20211109095357342h.html

Scroll to Top