Nginx installation, nginx

Source: Internet
Author: User

Nginx installation, nginx

yum install glib2-devel openssl-devel pcre-devel bzip2-devel gzip-devel gcc gcc-c++ ncurses-devel perl gcc gcc-c++ ncurses-devel perl perl-devel perl-ExtUtils-Embedcd /tmpwget http://nginx.org/download/nginx-1.4.7.tar.gztar -zxvf nginx-1.4.7.tar.gzcd nginx-1.4.7./configure \    --user=nginx\    --group=nginx \    --prefix=/usr/local/nginx \    --with-http_ssl_module \    --with-http_realip_module \    --with-http_addition_module \    --with-http_sub_module \    --with-http_dav_module \    --with-http_flv_module \    --with-http_gzip_static_module \    --with-http_stub_status_module \    --with-http_perl_module \    --with-mail \    --with-mail_ssl_module  makemake install 

Start nginx

/usr/local/nginx/sbin/nginx

Access http: // localhost. If the welcome page appears, the installation is successful.


How to install two nginx servers in linux

When installing nginx in linux, you are generally required to set the installation path through prefix in the./configure stage. Therefore, multiple nginx installations can be installed by specifying different prefixes in./configure.
It is worth noting that after installation, the two nginx listening ports should be set to different listening ports. Otherwise, an nginx cannot be started.
. /Configure -- prefix =/home/work/nginx1 ..... // make & make install the first nginx installation configuration. /configure -- prefix =/home/work/nginx2 ..... // The second nginx installation configuration make & make installcd/home/work/nginx1/conf/nginx. conf & modify the listening port of the first nginx .. /home/work/nginx1/sbin/nginxcd/home/work/nginx2/conf/nginx. conf & modify the second nginx listening port .. /home/work/nginx2/sbin/nginx

Where can Nginx be installed and run?

This method has never been implemented, but we can analyze it.
The cloud platform features that distributed data storage is redundant and data can be obtained, but it does not know how the data is stored or the specific path? Taking hadoop as an example, data is stored Based on metadata files, which have been split.
However, as a webserver, nginx needs to specify a series of installation paths during installation. Therefore, nginx cannot be installed on the cloud platform as an app. The reason is that if yes, the platform will expose the directory structure externally, which is not allowed for the cloud platform.
However, you can use nginx as the proxy server or Server Load balancer to process applications on the cloud platform.
 

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.