Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to install haproxy on my ubuntu server buy the haproxy version from the 10.04 repo is 1.3.x version.

I wanted the latest build 1.4.13, since it has improvements and bugfixes.

What i did: 1. installed the haproxy from the official repo: apt-get install haproxy. 2. Download source file from the website, and compile it. 3. swapped the new haproxy with the old.

so far it works, but i as if i should be aware of something?

Why i did the following? since apt-get creates a init.d startup script, /etc/haproxy.cfg file, and user and group.

share|improve this question
up vote 2 down vote accepted

That is what I have always done since Ubuntu does have the init.d script. I always put it in /opt and then just edit the init script to point to the new version and never run make install.

A better way might be to use a symlink to the binary instead of editing the init script to point to the new binary, but both work.

You might want to make sure you compile it with some options, particularly you probably want to make sure you use the CPU target to get the right optimizations. Here is what I use for 64 bit:

make TARGET=linux26 CPU=i586 USE_STATIC_PCRE=1

These optimizations can matter at higher work loads, I had a high CPU usage when built it once without them because select() was being used instead of epoll()

share|improve this answer
since i have 32bit i used: make TARGET=linux26 ARCH=i386 – Elgreco08 Mar 24 '11 at 13:02
@Elgreco08: Yup, that looks right to me – Kyle Brandt Mar 24 '11 at 13:03
@KyleMBrandt: what part do u change in init.d script? i changed HAPROXY=/opt/haproxy, when restart it errors with can't find /opt/haproxy – mamu Aug 9 '11 at 2:24
@Mamu: You need to make it point to the binary ... is that /opt/haproxy, or is /opt/haproxy the directory containing the binary? – Kyle Brandt Aug 9 '11 at 13:13
thanks @KyleMBrandt, turn out that x86 compiled files don't work on x64 linux, coming from windows thought if compiled in x86 would be alright in x64 but not. Got confused because of error message of can't find file. – mamu Aug 9 '11 at 14:32

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.