Install nginx and tcp_proxy module through centos source code compilation

Source: Internet
Author: User

Download the latest nginxfile and install it at http://nginx.org/en/download.html.

1. download and install the PCRE LibraryFtp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/

Tar zxvf pcre-8.30.tar.gz./configure make install 2 install OpenSSL Yum-y install OpenSSL-devel 3 download tcp_proxy_module to https://github.com/yaoweibin/nginx_tcp_proxy_module download 4 install nginxexport nginx_version = 1.2.1curl-O uninstall-xvzf uninstall
CD nginx-$ nginx_version
Patch-P1 <../nginx_tcp_proxy_module/tcp. Patch
./Configure -- add-module = ../nginx_tcp_proxy_module/
Sudo make & make install

When nginx is started, the service cannot be started and the error libpcre. so.1 not found occurs. The solution is as follows:

Run the following command to view

--- # LDD $ (which/usr/sbin/nginx)

Shown as follows:

Linux-vdso.so.1 => (0x00007fff7e9db000)
Libpthread. so.0 =>/lib64/libpthread. so.0 (0x00007fe4629d0000)
Libcrypt. so.1 =>/lib64/libcrypt. so.1 (0x00007fe462799000)
Libpcre. so.1 => not found//Not Found
Libz. so.1 =>/lib64/libz. so.1 (0x00007fe462582000)
Libc. so.6 =>/lib64/libc. so.6 (0x00007fe4621e1000)
/Lib64/ld-linux-x86-64.so.2 (0x00007fe462bfa000)
Libfreebl3.so =>/lib64/libfreebl3.so (0x00007fe461f7e000)
Libdl. so.2 =>/lib64/libdl. so.2 (0x00007fe461d7a000)

Run the following command:

---- # Cd/lib64

---- # Ln-s libpcre. so.0.0.1 libpcre. so.1

Check again:

---- # LDD $ (which/usr/sbin/nginx)

It is OK:

Linux-vdso.so.1 => (0x00007fff4d7ff000)
Libpthread. so.0 =>/lib64/libpthread. so.0 (0x00007fb06f13e000)
Libcrypt. so.1 =>/lib64/libcrypt. so.1 (0x00007fb06ef07000)
Libpcre. so.1 =>/lib64/libpcre. so.1 (0x00007fb06ecda000)
Libz. so.1 =>/lib64/libz. so.1 (0x00007fb06eac4000)
Libc. so.6 =>/lib64/libc. so.6 (0x00007fb06e723000)
/Lib64/ld-linux-x86-64.so.2 (0x00007fb06f0000000)
Libfreebl3.so =>/lib64/libfreebl3.so (0x00007fb06e4c0000)
Libdl. so.2 =>/lib64/libdl. so.2 (0x00007fb06e2bc000)

 

Load Balancing http://cnodejs.org/topic/4f16442ccae1f4aa270010b3 for websocket applications

Reverse Proxy web sockets with nginx and socket. Io http://www.letseehere.com/reverse-proxy-web-sockets

 

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.