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
http return code list (below is an overview) for ...
It took me more than an hour to open ssh in Ubunt...
Seamless carousel is a very common effect, and it...
This article example shares the specific code of ...
1. Introduction to Linux .NET Core Microsoft has ...
Tip 1: Stay focused The best mobile apps focus on...
Reverse Proxy Reverse proxy refers to receiving t...
When you see a class, what information do you wan...
By default, the MyISAM table will generate three ...
1. Linux installation (root user operation) 1. In...
system: CentOS 7 RPM packages: mysql-community-cl...
Table of contents Basic Configuration Entry file ...
example: <html> <head> <style type...
Some MySQL tables may contain duplicate records. ...
introduction Looking back four years ago, when I ...