Nginx installation manual

Source: Internet
Author: User
Tags install openssl openssl library

Installation environment:

Centos6.5 nginx1.7.0 1. create user groups and users (nginx/nginx) # Su-# groupadd nginx # useradd-G nginx-D/home/nginx-P nginx II. Create and install nginx and WWW directory # Su-1. installation directory: /APP/nginx # cd/APP # mkdir nginx # chown-RF nginx: nginx. /nginx 2. WWW directory:/data/wwwroot # CD Data # mkdir wwwroot # chown-RF nginx: nginx. /wwwroot 3. Download the installation media: browse and select the relevant version http://nginx.org/download/ # wget http://nginx.org/download/nginx-1.7.0.tar.gz # tar-zxvf nginx-1.7.0.tar.gz 4. Check the installation prerequisites Su-whether to install OpenSSL, PCRE, zlib # rpm-Qa | grep OpenSSL-devel # rpm -Qa | grep PCRE-devel # rpm-Qa | when grep zlib is connected to the Internet, run the following command to install # Yum-y install PCRE-devel # Yum-y install OpenSSL-devel Server for more information, see
Http://inotgaoshou.iteye.com/blog/962946
5. Compile and install
Su-nginx
1. compile related parameters
#./Configure   --prefix=/app/nginx -- user=nginx  --group=nginx  --with-http_stub_status_module     --with-http_ssl_module  --without-http_fastcgi_module
# Make # make install 6. Configure startup (non-root user starts port 80) # Su-# chmod 777/etc/sudoers # vi/etc/sudoersnginx all = nopasswd: /APP/nginx/sbin/nginx # chmod 640/etc/sudoers 7. Start and restart # sudo/APP/nginx/sbin/nginx # sudo/APP/nginx/sbin/ nginx-s reload 8. view the process PS-Ef | grep nginx 9. Modify the root directory root/data/wwwroot; 10. Enable shtmlssi on;
Ssi_silent_errors on;
Ssi_types text/shtml; Reference URL http://www.sunbloger.com/article/228.html
99. Related errors
./Configure: Error: SSL modules require the OpenSSL library.
You can either do not enable the modules, or install the OpenSSL library
Into the system, or build the OpenSSL library statically from the source
With nginx by using -- With-OpenSSL = <path> option.

OpenSSL module is not installed. Install OpenSSL # Yum-y install OpenSSL-devel first.  

Nginx installation manual

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.