Installation configuration for VMware Linux under Nginx (i)

Source: Internet
Author: User
Tags epoll openssl library

Resource Preparation

1. pcre-8.34.tar.gz:ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/

2. zlib-1.2.8.tar.gz:http://zlib.net/search. gz download, or Http://sourceforge.net/projects/libpng/?source=typ_redirect

3. openssl-1.0.1j.tar.gz:http://www.openssl.org/source/

4. nginx-1.4.2.tar.gz http://nginx.org/download/the bottom version

Lightweight FTP Service Tools

I am using a tool called Quick easy FTP Server, figure:

This tool installs on the Windows, after installs, configures the user name and the password, as well as uploads, downloads stores the directory to be able; Click the Green Circle button above the blue panel to start the FTP service;

Of course, you can also use other tools to transfer files to (VMWare) Linux; or download the command directly using Linux: wget;

Dependent file description

1. Pcre: This is for the regular rewrite rewrite;

2. Zlib: This is used for Gzip compression;

3. SSL: Used to support HTTPS access encryption;

Start installation

We install directory selection under/USR/LOCAL/SRC, use the Administrator account to enter the command line mode: (CTRL+ALT+F2)

>cd/usr/local/src

1. Connect to the Windows installation FTP Server using the FTP command;

>ftp

>open 192.168.xx.1 21

.....

>username

>password

>bin [using binary format to transfer file data]

> Get xx.tar.gz/folder/xxx.tar.gz, use the Get command to download the file to a folder in Linux (as we have located under/usr/local/src, directly get xxx.tar.gz is available);

After uploading, use gunzip ... tar.gz to see if it is wrong, prompt: Invalid compressed data-format ... Indicate a problem;

2. First upload and install the Pcre package;

tar -zxvf pcre-8.34. Tar . GZCD pcre-8.34. /Configuremake doinstall

3. Install the zlib package;

First return to/USR/LOCAL/SRC, perform decompression and installation with the same pcre;

4. Install the SSL package: (Return to/SRC first)

Only need to execute >TAR-ZXVF openssl-1.0.1j.tar.gz;

5. Install Nginx; (Return to/SRC first)

Tar-ZXVF nginx-1.4.2.Tar. GZCD Nginx-1.4.2./configure--sbin-path=/usr/local/nginx/Nginx--conf-path=/usr/local/nginx/nginx.conf--pid-path=/usr/local/nginx/Nginx.pid--with-Http_ssl_module--with-pcre=/usr/local/src/pcre-8.34 --with-zlib=/usr/local/src/zlib-1.2.8 --with-openssl=/usr/local/src/openssl-1.0. 1c Make Make Install

First line:--sbin-path=/usr/local/nginx/nginx is the nginx executable file; Start Nginx service to pass it;

Second line:--.... the configuration file of the/nginx.conf load;

The third line:--..../nginx.pid for nginx running process ID; Close, open to pass it;

The following lines indicate support for the SSL module, overwriting and GZIP support;

After installation, see 80 has not been accounted for:

grep ;

If not, start it;

Check that the installation is correct;

First look at the virtual machine after the ip:ifconfig;inet is the IP address: Open http://xxx.xxx.xxx.xxx appears:
Welcome to nginx! If you see this page, the Nginx Web server is successfully installed and working. Further configuration is required. For-online documentation and support refer to Nginx.org.Commercial-available at Nginx.com.Thank Using Nginx.

Indicates that the installation is normal;

Compilation options: (pick)

Make is used to compile, it reads the instruction from the makefile, and then compiles. The make install is used to install, and it also reads instructions from makefile and installs to the specified location. The Configure command is used to detect the target characteristics of your installation platform. It defines all aspects of the system, including Nginx's allowed connection processing methods, such as it detects if you have CC or GCC, does not require CC or GCC, it is a shell script, and at the end of execution it creates a makefile file. The Nginx Configure command supports the following parameters:--prefix=path defines a directory that stores files on the server, which is the installation directory of Nginx. /usr/local/nginx is used by default. --sbin-path=path sets the path of the Nginx executable file, the default is Prefix/sbin/nginx.--conf-path=path set the path in the nginx.conf profile. Nginx allows you to start with a different configuration file via the-C option on the command line. The default is Prefix/conf/nginx.conf.--pid-path=path to set the Nginx.pid file, which will store the process number of the main process. After the installation is complete, you can change the file name at any time by using the PID directive in the nginx.conf configuration file. By default, the file name Prefix/logs/nginx.pid.--error-log-path=path sets the name of the primary error, warning, and diagnostic file. After the installation is complete, you can change the file name at any time, using the Error_log directive in the nginx.conf configuration file. By default, the file name is Prefix/logs/error.log.--http-log-path=path the name of the log file for the HTTP server that sets the primary request. After the installation is complete, you can change the file name at any time, using the Access_log directive in the nginx.conf configuration file. By default, the file name is prefix/logs/access.log.--user=name for the user who set the Nginx worker process. After the installation is complete, you can change the name of the user directive that is used in the nginx.conf configuration file at any time. The default user name is nobody. --group=name sets the user group for the Nginx worker process. After the installation is complete, you can change the name of the user directive that is used in the nginx.conf configuration file at any time. The default is non-privileged users. --with-select_module--without-select_module enables or disables building a module to allow the server to use the Select () method. The module will be created automatically if the platform does not support Kqueue,epoll,rtsig or/dev/poll. --with-poll_module--without-poll_module enables or disables building a module to allow the server to use the poll () method. The module will be created automatically if the platform does not support Kqueue,epoll,rtsig or/dev/poll. --without-http_gzip_module-does not compile the Response module for compressed HTTP servers. Compiling and running this module requires a zlib library. --without-http_rewrite_module does not compile the rewrite module. Compiling and running this module requires PCRE library support. --without-http_proxy_module-does not compile the Http_proxy module. The--with-http_ssl_module-uses the HTTPS protocol module. By default, the module is not built. It is necessary to establish and run the OpenSSL library for this module. --with-pcre=path-set the source path of the Pcre library. The source code of the Pcre Library (version 4.4-8.30) needs to be downloaded and decompressed from the Pcre website. The rest of the work is nginx./configure and make to complete. Regular expressions are used in the location directive and in the Ngx_http_rewrite_module module. The--with-pcre-jit-compilation Pcre contains "Just-in-time compilation" (1.1.12, Pcre_jit instructions). --with-zlib=path-sets the source path of the zlib library. To download and unzip from zlib (version 1.1.3-1.2.5). The rest of the work is nginx./configure and make complete. The Ngx_http_gzip_module module requires the use of zlib. --with-cc-opt=parameters-set additional parameters will be added to the cflags variable. For example, when you use the Pcre library on FreeBSD, you need to use the following:--with-cc-opt= "-i/usr/local/include: If you need to increase the number of files supported by select (),--with-cc-opt="-D fd_ setsize=2048 ".--with-ld-opt=parameters-sets the additional parameters that will be used during the link. For example, when using the system's Pcre library under FreeBSD, you should specify:--with-ld-opt= "-l/usr/local/lib".

Installation configuration for VMware Linux under Nginx (i)

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.