Install and configure nginx

Source: Internet
Author: User

UseYumCommand to install and upgradeProgramLibrary

Yum-y install GCC gcc-C ++

You have to install MySQL

 

Install PCRE

 

PCREIt is a regular expression used by Perl to allow the installed software to support regular expressions. By default, nginx only processes static webpage requests, that is, HTML. for dynamic webpage requests, such *. PHP, then nginx needs to query the path based on the regular expression, and then set *. PHP to PhP for processing

# Rpm-Qa | grep PCRE //Whether PCRE is installed in the query system. Generally, the installed system is installed by default, so we need to delete the built-in

# Cp/lib/libpcre. so.0 ///Before deleting the built-in PCRE, back up libpcre. so.0 file, because the RPM package is too correlated, no libpcre after deletion. we cannot install PCRE in so.0.

# Rpm-e -- nodeps pcre-6.6-1.1 //Delete the built-in PCRE

# Tar zxvf pcre-8.00.tar.gz

# Cd pcre-8.00

# Cp/libpcre. so.0/lib ///Copy libpcre. so.0 backed up before removing the built-in PCRE to the/lib directory.

#./Configure //Configure PCRE. Because PCRE is a library, rather than programs such as pache, PHP, and Postfix, we can select the default path during installation, this will avoid unnecessary troubles when installing other things later. After executing this section, it will be displayed, which shows our PCRE configuration.

# Make & make install

 

 

When nginx is started, the following error occurs: libcrypto. So: cannot open shared objec.

 

 

When nginx is started, the following error is reported:

/Opt/nginx/sbin/nginx: Error while loading shared libraries: libcrypto. So: cannot open shared objec

 

Solution:

 

1. view the local libcrypto. So location

 

Locate libcrypto. So

 

2. Edit VI/etc/lD. So. conf.

 

Include/etc/lD. So. conf. d/*. conf
/Opt/nginx/lib/
/Usr/local/lib

 

3. Check for errors

 

/Sbin/ldconfig


4. Start nginx

 

You can modify the soft link to libcrypto. So.

Ln-s libcrypto. so.0.9.8 libcrypto. So

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.