by karolist · 14y ago · 0 comments
* Get old version config flags with -V, e.g /opt/nginx/sbin/nginx -V
Mine had:
nginx: configure arguments: --prefix=/opt/nginx --with-http_ssl_module --with-cc-opt=-Wno-error --add-module=/usr/lib/ruby/gems/1.8/gems/passenger-3.0.9/ext/nginx
Download tarball:
* wget http://nginx.org/download/nginx-1.0.14.tar.gz
Extract and configure passing the same flags:
* tar zxvf nginx-1.0.14.tar.gz && cd nginx-1.0.14
* ./configure --prefix=/opt/nginx --with-http_ssl_module --with-cc-opt=-Wno-error --add-module=/usr/lib/ruby/gems/1.8/gems/passenger-3.0.9/ext/nginx
Compile and install
* make && make install clean
The make install action will check for old directories and files so no need to worry about stuff being overriden.
Verify your nginx version with:
/opt/nginx/sbin/nginx -v
nginx version: nginx/1.0.14
:)
A better approach to follow is (note this is only a rough guide from memory):
cp -R /usr/portage/www-client/nginx /usr/local/portage/www-client
cd /usr/local/portage/www-client/nginx
mv nginx-1.0.13.ebuild nginx-1.0.14.ebuild
ebuild nginx-1.0.14.ebuild digest
emerge -1q nginxI love portage, I use it whenever I can. In this case, I think I've did it like that because something was messed up with Passenger support in the port. It's the only package installed from source (bypassing portage) on my system and it's not an orphan in a way that /opt was dedicated purely for such scenarions. I can see all such packages by listing /opt assuming I keep the install prefix convention.
In any case, thanks for pointing that this is a wrong way to install packages, someone might benefit from this indeed.
Thank you all for your thoughtful replies.