Article Directory
Various versions
- nginx :
nginx-1.18.0.tar.gz
wget http://nginx.org/download/nginx-1.18.0.tar.gz
- openssl:
nginx installation
Create installation package file
mkdir nginxTools
Download the nginx installation source file
cd /root/nginxTools
wget http://nginx.org/download/nginx-1.18.0.tar.gz
Unzip the source file
Unzip the nginx-1.18 file to the /usr/local/nginx
file path:
tar zxf nginx-1.18.0.tar.gz -C /usr/local/src/
Configuration compilation
Enter the decompressed source code path:
cd /usr/local/src/
Run the configuration script:
./configure --prefix=/usr/local/nginx
--with-http_ssl_module
--with-http_stub_status_module
--with-http_gzip_static_module --with-pcre
Compile and install
make
make install
run
Enter the compiled and installed nginx directory:
cd /usr/local/nginx/sbin
./nginx
access
Listen on port 80 by default, of course it can be configured
Server ip: 80
After accessing the link, the following appears, indicating that the installation is successful.
View nginx version
cd /usr/local/nginx/sbin/
./nginx -v
problem
OpenSsl Gcc installation problem
yum -y install gcc gcc-c++ autoconf automake make
Specify version yum problem
Of course, use the yum
command and install by default 最新版
. The need to ensure nginx版本
and gcc
as well as openssl
versions fit!
Use to yum
view the software version information that can be installed:
yum list | grep xxxx
Then use the following command to download and install the specified version:
yum install xxxx
This reference material: Use yum to install the specified version of the software in the CentOS system
Compilation issues
- checking for PCRE library… not found
missingpcre
related library files
yum install pcre-devel
Reference
Centos7 install Nginx1.11.3
centos7 compile nginx, use openssl1.1.1h version