Install Nginx under CentOS and add Nginx_upload_module

Source: Internet
Author: User
Tags install openssl

Before installation, it is best to ensure that dependent system software has been upgraded.
Yum Update

Install Nginx on CentOS, if simply install, do not attach other third-party modules, one sentence can be done:
Yum Install Nginx

However, if you need to add a third-party module, you need to download the source code and recompile the installation. (There may be a simple method, I do not know, if there is, also please pass by the expert pointing. )

I'm going to add two third-party modules for file upload and upload progress bar nginx_upload_module and Nginx-upload-progress-module.

Here need to install Nginx_upload_module friends to pay attention to,If you want to combine the upload module, you must use Nginx1.3.8 or the following version, which conflicts with the current latest version of nginx_upload_module-2.2.0

First to the official website nginx Download Nginx Source Package
wget http://nginx.org/download/nginx-1.3.8.tar.gz
Download Nginx_upload_module
wget http://www.grid.net.ru/nginx/download/nginx_upload_module-2.2.0.tar.gz
If you need to upload progress information, download the module below.
wget http://cloud.github.com/downloads/masterzen/nginx-upload-progress-module/nginx_uploadprogress_module-0.9.0.tar.gz

In addition, there are two dependent packages pcre and OpenSSL that do not need to be downloaded if they are already installed on the system.
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.21.tar.bz2
wget http://www.openssl.org/source/openssl-1.0.0e.tar.gz

Because on the server, I am accustomed to create a own folder such as: MkDir SLX
Put these files in the inside, and then use the following command to extract one by one (different file format corresponding to the decompression parameters):
TAR-JXVF file name. tar.gz
TAR-JXVF file name. tar.bz2
Other types of compression packages are not described more. Online easy to check.

After extracting it into the nginx-1.3.8 folder, execute the following command:
./configure--prefix=/slx/nginx--add-module=/slx/masterzen-nginx-upload-progress-module-a788dea--add-module=/ slx/nginx_upload_module-2.2.0
--PREFIX Specifies the location that needs to be installed. --ADD-MODULE Specifies the module to add.

There are also-with and other options such as-with-openssl=. /OPENSSL-1.0.0E specifies compile-time using the class library under the following directory, these online articles are more, no more nonsense.
After execution
Make
If there is no error, you can execute the following installation command
Make install

If the installation is smooth then congratulations, if there is an error, say md5.h:no such file or directory indicates that you were shot, but fortunately, I have also been, and learned to heal. You find it and solve it, you don't have to touch it like I can't find a way around. In fact, because your system is missing a openssl-devel, installed on it can be
Yum Install Openssl-devel
Then make the install again to succeed.

Install Nginx under CentOS and add Nginx_upload_module

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.