nginx_tcp_proxy_module
nginx_tcp_proxy_module copied to clipboard
How to install that on Ubuntu11
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...
Solved, I have installed 0.8 nginx using apt-get . Here is the some additional configure
- 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'
- then stop the orignal nginx service 'sudo service nginx stop' and remove /usr/sbin/nginx
- create a new one 'ln -s /usr/local/nginx/sbin/nginx /usr/sbin/nginx' and start the nginx service
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