1, first go to the official website to download the tar package Nginx
Nginx official website address: http: //nginx.org/en/download.html
ps: download speeds touching
After the download is complete, upload it to the server, here I uploaded to the server's / usr / local this position.
Second, begin to install Nginx
1, into the / usr / local using the command tar -zxvf nginx-1.14.2.tar.gz decompress obtained nginx
After extracting into nginx folder cd nginx-1.14.2
2, the next command: ./configure --prefix = / usr / local / nginx-1.14.2 and so will mean to tell where the installation files to be placed. (May not be provided, directly ./configure)
3, by 2 steps, you will see a folder the file Makefile more
4, followed by the command make compiled
I make myself the following error, this error occurs when, check the following
Focus: Here I refer to the two bloggers was repaired, and in this, thank you very much these two bloggers article
One blogger: http://www.cnblogs.com/chenxiaochan/p/7253407.html
II Bloggers: https://www.cnblogs.com/zrbfree/p/6419043.html
4.1, GCC - GNU Compiler Collection
ubuntu: apt-get install gcc
linux: yum install gcc-c++
4.2, PCRE library
ubuntu:apt-get install libpcre3 libpcre3-dev
linux: yum install -y pcre pcre-devel
4.3, zlib library
ubuntu: apt-get install zlib1g zlib1g-dev
linux: yum install -y zlib zlib-devel
4.4, OpenSSL library
ubuntu:apt-get install openssl openssl-dev
linux: yum install -y openssl openssl-devel
5. After the above steps, then make a bunch of things occur following command
(5.1) If the above methods fail or show make so take the following way
Yum update
yum update
After the update is complete, ready to make the nginx package before deleting and then re-extract a.
6, use the command make install installation
7, into sbin directory and then start nginx ./nginx default is port 80 if you want to change the port to enter the conf directory to find nginx.conf modification, as shown below
The command vi nginx.conf find listen, the default is port 80, I modified for 8888
Third, the next start nginx
Nginx into the sbin directory command ./nginx start
The above error occurred, thought a moment, very likely due to the second step, (./configure --prefix = / usr / local / nginx-1.14.2) due to our custom.
Solution: Depending on the error prompt, the corresponding file folder manually create a file to it
No logs this folder, create my own
Next again to start the command sbin folder ./nginx it seems to be no problem
The command ps aux | grep nginx nginx view of the situation
Finally, you can curl command on the server port number + nginx server address
Enter your upper or the browser address + nginx server port
1, first go to the official website to download the tar package Nginx
Nginx official website address: http: //nginx.org/en/download.html
ps: download speeds touching
After the download is complete, upload it to the server, here I uploaded to the server's / usr / local this position.
Second, begin to install Nginx
1, into the / usr / local using the command tar -zxvf nginx-1.14.2.tar.gz decompress obtained nginx
After extracting into nginx folder cd nginx-1.14.2
2, the next command: ./configure --prefix = / usr / local / nginx-1.14.2 and so will mean to tell where the installation files to be placed. (May not be provided, directly ./configure)
3, by 2 steps, you will see a folder the file Makefile more
4, followed by the command make compiled
I make myself the following error, this error occurs when, check the following
Focus: Here I refer to the two bloggers was repaired, and in this, thank you very much these two bloggers article
One blogger: http://www.cnblogs.com/chenxiaochan/p/7253407.html
II Bloggers: https://www.cnblogs.com/zrbfree/p/6419043.html
4.1, GCC - GNU Compiler Collection
ubuntu: apt-get install gcc
linux: yum install gcc-c++
4.2, PCRE library
ubuntu:apt-get install libpcre3 libpcre3-dev
linux: yum install -y pcre pcre-devel
4.3, zlib library
ubuntu: apt-get install zlib1g zlib1g-dev
linux: yum install -y zlib zlib-devel
4.4, OpenSSL library
ubuntu:apt-get install openssl openssl-dev
linux: yum install -y openssl openssl-devel
5. After the above steps, then make a bunch of things occur following command
(5.1) If the above methods fail or show make so take the following way
Yum update
yum update
After the update is complete, ready to make the nginx package before deleting and then re-extract a.
6, use the command make install installation
7, into sbin directory and then start nginx ./nginx default is port 80 if you want to change the port to enter the conf directory to find nginx.conf modification, as shown below
The command vi nginx.conf find listen, the default is port 80, I modified for 8888
Third, the next start nginx
Nginx into the sbin directory command ./nginx start
The above error occurred, thought a moment, very likely due to the second step, (./configure --prefix = / usr / local / nginx-1.14.2) due to our custom.
Solution: Depending on the error prompt, the corresponding file folder manually create a file to it
No logs this folder, create my own
Next again to start the command sbin folder ./nginx it seems to be no problem
The command ps aux | grep nginx nginx view of the situation