nginx_tcp_proxy_module icon indicating copy to clipboard operation
nginx_tcp_proxy_module copied to clipboard

How to install that on Ubuntu11

Open clarkchen opened this issue 12 years ago • 2 comments

I have install nginx 1.2.1 on my server , and I wanna to add this module.

but like after I compiled the source I found that the new nginx is in /usr/local/nginx/sbin/nginx but not /usr/sbin/nginx so I remove the old version and create a new one "ln -s /usr/local/nginx/sbin/nginx /usr/sbin/nginx"

after that all my old conf files are disabled and the new conf file locate in /usr/local/nginx/conf directive "tcp" can be recognized here, but all my old settings are disabled

so How can I install this module with the minimum operations...

clarkchen avatar Jul 03 '12 11:07 clarkchen

Solved, I have installed 0.8 nginx using apt-get . Here is the some additional configure

  1. nginx -V.. and copy all the things show up to the after configure step like

'./configure [original configuration] --add-module=/path/to/nginx_tcp_proxy_module'

  1. then stop the orignal nginx service 'sudo service nginx stop' and remove /usr/sbin/nginx
  2. create a new one 'ln -s /usr/local/nginx/sbin/nginx /usr/sbin/nginx' and start the nginx service

clarkchen avatar Jul 08 '12 05:07 clarkchen

This works for me on ubuntu but does not add an init.d script.

#! /bin/bash

apt-get update
sudo apt-get install libpcre3 libpcre3-dev

cd /tmp
git clone [email protected]:yaoweibin/nginx_tcp_proxy_module.git /tmp/nginx_tcp_proxy_module

wget 'http://nginx.org/download/nginx-1.2.7.tar.gz'
tar -xzvf nginx-1.2.7.tar.gz
cd nginx-1.2.7
patch -p1 < /tmp/nginx_tcp_proxy_module/tcp.patch

./configure --add-module=/tmp/nginx_tcp_proxy_module
make
sudo make install

missinglink avatar Feb 16 '13 17:02 missinglink