Nginx installation configuration records

Source: Internet
Author: User

Nginx installation configuration records

 

Environment cenos5.9 is installed on 192.168.119.131. The installation path is/home/bigdata/

 

1. Install the SDK before installation:

1.1 openssl

1.1.1 download, cd/home/bigdata/wget http://www.openssl.org/source/openssl-1.0.0a.tar.gz

Unzip: tar-xvf openssl-1.0.0a.tar.gz

Music openssl-1.0.0 openss

Cd openss

./Config

./Config-t

Make depend

Make

Make test

Make install

 

1.2 pcre

Download: http://sourceforge.net/projects/pcre/files/

Mv xxx pcre210

./Configure -- prefix =/home/bigdata/pcre210

Make

Make install

 

1.2.2 install yum-y install pcre-devel online

 

 

1.3 zlib-devel

1.3.1 install yum install-y zlib-devel online

 

 

2 nginx Installation

 

2.1 nginx download

Http://nginx.org/en/download.html

 

 

2.2 upload to/home/bigdata/nginx-1.7.9.tar.gz

Unzip: tar-xvf nginx-1.7.9.tar.gz

Note: Do not rename nginx

Renamed music nginx-1.7.9 nginx179

 

2.3 Installation

 

./Configure -- prefix =/home/bigdata/nginx -- with-pcre =/home/bigdata/pcre210 -- with-http_ssl_module -- with-openssl =/home/bigdata/openssl

 

Make

 

Make install

The following error occurs:

Make [2]: Entering directory '/home/bigdata/pcre210'

Make [2]: *** No rule to make target 'libpcre. la'. Stop.

Make [2]: Leaving directory '/home/bigdata/pcre210'

Make [1]: *** [/home/bigdata/pcre210/. libs/libpcre. a] Error 2

Make [1]: Leaving directory '/home/bigdata/nginx'

Make: *** [install] Error 2

 

Solution:

Mkdir-p/home/bigdata/pcre210/. libs

Cp/usr/lib/libpcre. a/home/bigdata/pcre210/libpcre.

Cp/usr/lib/libpcre. a/home/bigdata/pcre210/libpcre. la

Cp/usr/lib/libpcre. a/home/bigdata/pcre210/. libs/libpcre.

Cp/usr/lib/libpcre. a/home/bigdata/pcre210/. libs/libpcre. la

Install again

Make install

The following error occurs:

Cp: 'conf/koi-win' and '/home/bigdata/nginx/conf/koi-win' are the same file

Make [1]: *** [install] Error 1

Make [1]: Leaving directory '/home/bigdata/nginx'

Make: *** [install] Error 2

 

Solution: The following components are the installation paths.

. /Configure -- prefix =/home/bigdata/nginx -- conf-path =/home/bigdata/nginx/conf/nginx. conf -- with-openssl =/home/bigdata/openssl -- with-http_ssl_module -- with-pcre =/home/bigdata/pcre210

Make and make install again

Article Source: http://blog.csdn.net/lili72

Start the nginx Service

/Home/bigdata/nginx/sbin/nginx-c/home/bigdata/nginx/conf/nginx. conf

Check whether startup is successful

View processes: ps-ef | grep nginx

 

 

Access Port 80 of the machine

Http: // 192.168.119.128: 80

 

Installed successfully.

 

Stop nginx

Kill-QUIT 21510 (master process number)

 

Nginx restart

/Home/bigdata/nginx/sbin/nginx-s reload

 

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.