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:
|
<<: Vue implements partial refresh of the page (router-view page refresh)
>>: Several methods to execute sql files under mysql command line
Table of contents Brief description: 1. Four char...
Enable remote access rights for mysql By default,...
Origin: A few days ago, a tester sent a requireme...
Preface Due to the weak typing of JS, loose writi...
Port mapping is not the only way to connect Docke...
I used ECharts when doing a project before. Today...
Virtual hosts use special software and hardware t...
1. Introduction to Logrotate tool Logrotate is a ...
1. Check whether port 80 is occupied. Generally, ...
question I encountered a problem when writing dat...
This article shares the specific code of JavaScri...
Table of contents 1. Class 1.1 constructor() 1.2 ...
Data Sharing What kind of data needs to be writte...
When nginx configures proxy_pass, the difference ...
Copy code The code is as follows: <style type=...