Installation of Nginx under Linux

Source: Internet
Author: User
Tags openssl install perl


Installation of Nginx under Linux

Check if g++, GCC is installed.

# Rpm-qa | grep gcc

After that, there are 3 packages to appear. If it does not appear. Need to install g++, gcc.

# yum Install gcc-c++


Access:/usr/java/nginx Location

Download Nginx:wget http://nginx.org/download/nginx-1.8.0.tar.gz

Download Openssl:wget http://www.openssl.org/source/openssl-fips-2.0.9.tar.gz

Download Zlib:wget http://zlib.net/zlib-1.2.8.tar.gz

Download Pcre:wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.38.tar.gz


Package Download Address:http://down.51cto.com/data/2292008



If you do not have a C + + compilation environment installed, install it via yum install gcc-c++


If you do not have Perl installed, you will be prompted to install Perl 5

Yum Install perl* module for installing Perl

Perl-v Viewing the Perl environment



Next, compile the installation

Openssl:

[[email protected]] Tar zxvf openssl-fips-2.0.9.tar.gz

[[email protected]] CD openssl-fips-2.0.9

[[email protected]] ./config && make && make install


Pcre

[[email protected]] Tar zxvf pcre-8.36.tar.gz

[[email protected]] CD pcre-8.36

[[email protected]] ./configure && make && make install



Zlib

[[email protected]] Tar zxvf zlib-1.2.8.tar.gz

[[email protected]] CD zlib-1.2.8

[[email protected]] ./configure && make && make install



Final installation of Nginx

[[email protected]] Tar zxvf nginx-1.8.0.tar.gz

[[email protected]] CD nginx-1.8.0

[[email protected]] ./configure && make && make install



Start Nginx

/usr/local/nginx/sbin/nginx


An error message appears

[[Email protected] lib]# error while loading shared Libraries:libpcre.so.1:cannot open Shared object file:no such file or directory



The Redhat 64-bit machine Nginx Read the Pcre file is/lib64/libpcre.so.1 file, the default installation pcre libpcre.so file installed in the/usr/local/lib/directory, so input/opt/nginx/ Sbin/nginx-v can't find the file path!!

1. First make sure the Pcre is installed.

2. Switch path: cd/usr/local/lib execute ln-s/usr/local/lib/libpcre.so.1/lib64/

Add soft links under 3.root permissions/usr/local/lib/libpcre.so.1 to/lib64/: Ln-s/usr/local/lib/libpcre.so.1/lib64/

650) this.width=650; "src=" Https://s1.51cto.com/wyfs02/M01/8E/AB/wKioL1jI1qvSQwSGAAA7JC22n8w995.png "title=" 1.png "alt=" Wkiol1ji1qvsqwsgaaa7jc22n8w995.png "/>

650) this.width=650; "Src=" https://s2.51cto.com/wyfs02/M00/8E/AD/wKiom1jI1ruzEdJRAABqp0tGoRE345.png-wh_500x0-wm_ 3-wmp_4-s_2237429000.png "title=" Nginx.png "alt=" Wkiom1ji1ruzedjraabqp0tgore345.png-wh_50 "/>

This article is from the "Good Water" blog, please be sure to keep this source http://yushiwh.blog.51cto.com/2911795/1906827

Installation of Nginx under Linux

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.