amuck-landowner

Compile nginx from source or use apt-get install nginx?

Ricky Spanish

New Member
What one is preferred for a new production VPS? I know if you compile its a newer version, but is version you get when installing via apt-get more stable? What would you use for a new VPS? What about upgrading later?
 

TruvisT

Server Management Specialist
Verified Provider
Compile. Custom flags more fine tuned setup. Upgrading is just as easy as using packages via source.
 

clownjugglar

New Member
Debian? I typically use dotdeb repos because I'm lazy. Or you could use checkinstall to make the compiled source into a .deb so you can use apt-get to manage it.

The version on debian/centos stable should be secure and stable as they would be getting security fixes, just not new features. So basically it comes down to: Do you need any features that a newer version would offer? If yes, then compile. If no then distro's stable package.

Note: I don't run any high traffic or otherwise unique websites, so if you need custom flags and build properties like TruvisT said then obvisiouly you need to compile.
 

Ricky Spanish

New Member
What sort of custom flags would be available from compiling that isnt there for the regular install? The website will be a basic wordpress base site but I am switching vps providers and remaking a new vps as it was on a basic apache setup. I think the regular method will work for me but if the compiling version is better than I will do that.
 

wcypierre

New Member
What sort of custom flags would be available from compiling that isnt there for the regular install? The website will be a basic wordpress base site but I am switching vps providers and remaking a new vps as it was on a basic apache setup. I think the regular method will work for me but if the compiling version is better than I will do that.
Let's say if you wanted to limit the traffic rate(https://github.com/bigplum/Nginx-limit-traffic-rate-module), you need to compile it as it is not included in the packages by default. You can see the list at here: http://wiki.nginx.org/3rdPartyModules

but to be honest, if you don't have any specific requirements, then there's no need for you to compile nginx in the first place.
 

raindog308

vpsBoard Premium Member
Moderator
I use dotdeb as well.  

I wonder what increase in performance (and in what scenarios) you'll get by doing a self-compile.  I don' think that just the act of compiling will magically give you more performance.  If you have specific scenarios where flags or config will help, then maybe...though I'd be curious if the improvement is 5% or 20% or what.  

The downside of course is self-maintenance as opposed to just using the package management.
 

Francisco

Company Lube
Verified Provider
Are you doing much in the way of SSL?

NGINX 1.4 sucks for SSL performance due to a buffer size bug they had. It requires additional connections

to complete an SSL transaction so it really murders your site loading speeds.

If dotdeb has 1.6+ or whatever in repos then it has SSL addressed. If not, compile it.

Francisco
 

nunim

VPS Junkie
Are you doing much in the way of SSL?


NGINX 1.4 sucks for SSL performance due to a buffer size bug they had. It requires additional connections


to complete an SSL transaction so it really murders your site loading speeds.


If dotdeb has 1.6+ or whatever in repos then it has SSL addressed. If not, compile it.


Francisco
DotDeb is shipping 1.6.x right now, they have been for almost a month I believe.  I think the DotDeb repo build is fine for most purposes.
 

Francisco

Company Lube
Verified Provider
DotDeb is shipping 1.6.x right now, they have been for almost a month I believe.  I think the DotDeb repo build is fine for most purposes.
Should be fine then.

I know 1.4 had the bug still and it was fixed in either 1.5 or 1.6.

Francisco
 

tonyg

New Member
I would recommend to compile, it gives much more control in terms of keeping the executable nice and lean with only the needed modules.
 

Nikki

New Member
Nginx has official debian packages if you add their repo to apt. They're usually the latest stable version (as soon as 1.6 was released the repo had 1.6 packages)

They only list 'squeeze' on their wiki page (http://wiki.nginx.org/Install) but change squeeze to wheezy and it works fine.

If you still wish to compile, I suggest just apt-get sourcing the official nginx packages, downloading the version you want, copy the debian directory out of the apt source, and build it with dpkg-buildpackage so you get a .deb you can use other places.
 
Last edited by a moderator:

Ricky Spanish

New Member
Thanks for the help. I dont know what all of what was said means but I went with dotdeb but now I am having another nginx issue shown here:
 
Last edited by a moderator:
Top
amuck-landowner