Note: The basic directory path for software installation is: /usr/local, so when downloading the software, switch to this directory and download and decompress it directly. 1. Install gcc gcc-c++ dependency packages 2. Download, compile and install the PCRE library Switch to the usr/local directory and execute the command Download the installation package wget http://jaist.dl.sourceforge.net/project/pcre/pcre/8.33/pcre-8.33.tar.gz Unzip the installation package Compile and install cd pcre-8.36 ./configure make && make install 3. Download, compile and install the SSL library Download the installation package wget http://www.openssl.org/source/openssl-1.0.1j.tar.gz Unzip the compressed file Compile and install cd openssl-1.0.1j ./config make && make install 4. Download, compile and install zlib dependency library Download the installation package wget http://zlib.net/zlib-1.2.11.tar.gz Unzip the installation package Compile and install cd zlib-1.2.11 ./configure make && make install After the dependent packages and environment are installed and configured, you need to install nginx 5. Installation of nginx Download the installation package wget http://nginx.org/download/nginx-1.8.0.tar.gz Compile and install cd nginx-1.8.0 ./configure --user=nobody --group=nobody --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_gzip_static_module --with-http_realip_module --with-http_sub_module --with-http_ssl_module make && make install (Note: In the second compilation instruction: --prefix=/usr/local/nginx specifies the compilation and installation directory. After successful compilation, the nginx installation folder will be displayed in the /usr/local directory. You can delete the nginx-1.8.0 compilation file) 6.nginx related operation commands Switch to the nginx directory Execute the following command Start nginx Check whether the nginx configuration file is correct As shown in the figure, the nginx configuration file is accurate. Stop nginx Check the process number occupied by nginx and end it ps -ef | grep nginx kill -9 port number Summarize The above is a detailed explanation of the installation and configuration tutorial of nginx under Centos7 introduced by the editor. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website! You may also be interested in:
|
<<: Detailed explanation of the definition and function of delimiter in MySQL
>>: React Native environment installation process
Table of contents 1. How to locate and optimize s...
This article shares with you a practical web navi...
This article example shares the specific code of ...
Block-level element features : •Always occupies a ...
Docker tag detailed explanation The use of the do...
Table of contents 1. props/$emit Introduction Cod...
1. What are the templates for ASP.NET Web applicat...
Problem description: The following error message ...
List of HTML tags mark type Name or meaning effec...
Compared with the old life cycle Three hooks are ...
GitHub address, you can star it if you like it Pl...
The latest download and installation tutorial of ...
Preface In the database, some data tables and dat...
Introduction: The disadvantages of storing all da...
MySQL5.7.21 installation and password setting tut...