Nginx Beginner Introduction Ubuntu Linux installation configuration tutorial

Source: Internet
Author: User
Tags openssl library

can provide a variety of service-side Management Toolkit geek, please contact me, will give FTP upload permission, wall too pit

Download gzip module requires zlib library

Embarrassing host zlib:


wget ftp://www.xuwenming.net/nginx/zlib-1.2.8.tar.gz--FTP-USER=FTP1--FTP-PASSWORD=FTP1

Official zlib:

wget http://liquidtelecom.dl.sourceforge.net/project/libpng/zlib/1.2.8/zlib-1.2.8.tar.gz

Download the Pcre library required for the rewrite module

Embarrassing host Pcre:

wget ftp://www.xuwenming.net/nginx/pcre-8.35.tar.gz--FTP-USER=FTP1--FTP-PASSWORD=FTP1

Pcre official:

wget http://softlayer-sng.dl.sourceforge.net/project/pcre/pcre/8.35/pcre-8.35.tar.gz

The ability to download SSL requires the OpenSSL library

Embarrassing host OpenSSL:

wget ftp://www.xuwenming.net/nginx/openssl-1.0.1j.tar.gz--FTP-USER=FTP1--FTP-PASSWORD=FTP1

or OpenSSL official

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




Download Nginx

My own host Nginx:

wget ftp://www.xuwenming.net/nginx/nginx-1.6.0.tar.gz--FTP-USER=FTP1--FTP-PASSWORD=FTP1

or Nginx official:

wget http://nginx.org/download/nginx-1.6.0.tar.gz


This download speed is really a bit of a pit dad

Let us have your FTP server for download later

Sure it's all downloaded. Go to the compile and install step

Compiling and installing OpenSSL

TAR-ZXVF openssl-1.0.1j.tar.gz cd openssl-1.0.1j./config make do Install



Compiling and installing zlib

TAR-ZXVF ZLIB-1.2.8.TAR.GZCD zlib-1.2.8./configure Makemake Install

All three components are compiled and installed one at a time


Compiling and installing Pcre

TAR-ZXVF PCRE-8.35.TAR.GZCD pcre-8.35./configure Makemake Install


My Ubuntu installation pcre error when:

: Error:you need a C + + compiler for C + + support.

It appears that Ubuntu needs to compile C + + support

sudo apt-get install build-essential

And then execute one side of the Pcre compilation installation process OK no error


Final installation of Nginx

TAR-ZXVF nginx-1.6.0.tar.gz CD nginx-1.6.0./configure--with-pcre=. /pcre-8.35--with-zlib=. /zlib-1.2.8--with-openssl=. /openssl-1.0.1jmakemake Install


Nginx configured paths are saved for easy query and modification

  nginx path prefix:  "/usr/local/nginx"   nginx binary file:  "/usr/local/nginx/sbin/nginx"   nginx configuration prefix:  "/usr/local/nginx/conf"   nginx configuration file:  "/usr/local/nginx/conf/nginx.conf"   nginx  pid file:  "/usr/local/nginx/logs/nginx.pid"   nginx error log file:  "/ Usr/local/nginx/logs/error.log "  nginx http access log file: "/usr/local/ Nginx/logs/access.log "  nginx http client request body temporary files :  "Client_body_temp"   nginx http proxy temporary files:  "Proxy_temp"   nginx http fastcgi temporary files:  "Fastcgi_temp"   nginx  http uwsgi temporary files:  "Uwsgi_temp"   nginx http scgi  Temporary files:&nbsP; " Scgi_temp "


Note The version number of these files or the installation fails

Check the results of your work

Cd/usr/local/nginx/sbin &&./nginx-t

Start Nginx

./nginx

If it fails, try it with sudo permissions.

Or see if this machine has any Web service tools like Apache or something.

Take a look at

Netstat-ntlp


Finally, the system is configured with a soft link to the global command

Ln-s/usr/local/nginx/sbin/nginx/usr/bin/nginx

Then switch to any directory and try it.

Nginx-v


Nginx Beginner Introduction Ubuntu Linux installation configuration tutorial

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.