nginx installation dependencies

 

In this case, gcc g++ is not installed in the linux system


1. GCC - GNU compiler collection (GCC can be installed using the default package manager's repositories (repositories), the choice of package manager depends on the Linux distribution you use, and the package manager has different implementations: yum is based on Red Hat releases; apt for Debian and Ubuntu; yast for SuSE Linux, etc.) 

Install GCC in RedHat: 

yum install gcc 

Install GCC in Ubuntu: 

apt-get install gcc 

2. PCRE library (PCRE is required for Nginx compilation ( Perl Compatible Regular Expression), because Nginx's Rewrite module and HTTP core module will use PCRE regular expression syntax. Two installation packages, pcre and pcre-devel, need to be installed here. The first installation package provides the compiled version of the library, while the third installation package The two provide the header files for the development phase and the source code for compiling the project, which is why we need it.) 

Install PCRE in RedHat: 

yum install pcre pcre-devel 

Install PCRE in Ubuntu: 

apt-get install libpcre3 libpcre3-dev 

3, zlib library (The zlib library provides the developer's compression algorithm, and gzip compression is required in various modules of Nginx. Like installing PCRE, you also need to install the library and its source code: zlib and zlib-devel.) 

Installation in RedHat zlib: 

yum install zlib zlib-devel 

Install zlib in Ubuntu: 

apt-get install zlib1g zlib1g-dev 

4, OpenSSL library (In Nginx, if the server provides secure web pages, the OpenSSL library will be used, we need to install the library file and its development installation package (openssl and openssl-devel).) 

Install OpenSSL in RedHat: 

yum install openssl openssl-devel 

Install OpenSSL in Ubuntu: (Note: openssl-dev is not found in the warehouse of Ubuntu14.04): 

apt-get install openssl libssl-dev

 

complete

 

sudo apt-get install -y libpcre3 libpcre3-dev gcc zlib1g zlib1g-dev libssl-dev

 

Create nginx groups and nginx users who cannot log in without a home directory

sudo groupadd nginx
sudo useradd -M  -s /sbin/nologin nginx  -g nginx

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326243909&siteId=291194637