Sorry, I've forgotten:

rpmbuild -bs /root/rpmbuild/SPECS/haproxy.spec

before mock.

On Thu, Aug 31, 2017 at 6:40 AM, Juriy Strashnov <[email protected]> wrote:
> Hi!
>
> To use HAProxy 1.7 on CentOS 7 you can simply recompile src.rpm from
> Fedora repo. You only need to disable LUA support in spec-file. It is
> not very tricky:
>
> rpm -Uvh 
> https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/source/tree/Packages/h/haproxy-1.7.8-3.fc27.src.rpm
> sed -i "s/USE_LUA=1/USE_LUA=0/g" /root/rpmbuild/SPECS/haproxy.spec
> mock --no-clean --rebuild
> /root/rpmbuild/SRPMS/haproxy-1.7.8-3.el7.centos.src.rpm
>
> You will get ha proxy-1.7 rpms, which can be put to local repo of your
> organisation or installed manualy via yum localinstall
> haproxy<...>.rpm.
>
> Good Luck!
>
> On Wed, Aug 30, 2017 at 10:03 PM, James Moore <[email protected]> wrote:
>> Good evening,
>>
>>
>>
>> Hope you’re well, this is a bit cheeky but I’m hoping you may be able to
>> advise …..
>>
>>
>>
>> When I install haproxy on Centos 7 via the repo “ sudo yum install haproxy”
>> it installs 1.5 and eveyrthings fine
>>
>>
>>
>> When I install via the below method I get an error saying the service is
>> bad, I have a work around however I think it’s impacting my ability to track
>> the service via keepalived for failover purposes,
>>
>>
>>
>> Any ideas would be appreciated :
>>
>>
>>
>>
>>
>>
>>
>> sudo yum install gcc pcre-static pcre-devel -y
>>
>> wget https://www.haproxy.org/download/1.7/src/haproxy-1.7.8.tar.gz -O
>> ~/haproxy.tar.gz
>>
>> tar xzvf ~/haproxy.tar.gz -C ~/
>>
>> cd ~/haproxy-1.7.8
>>
>> make TARGET=linux2628
>>
>> sudo make install
>>
>> sudo mkdir -p /etc/haproxy
>>
>> sudo mkdir -p /run/haproxy
>>
>> sudo chmod +x /run/haproxy
>>
>> sudo mkdir -p /var/lib/haproxy
>>
>> sudo touch /var/lib/haproxy/stats
>>
>> sudo ln -s /usr/local/sbin/haproxy /usr/sbin/haproxy
>>
>> sudo cp ~/haproxy-1.7.8/examples/haproxy.init /etc/init.d/haproxy
>>
>> sudo chmod 755 /etc/init.d/haproxy
>>
>> sudo systemctl daemon-reload
>>
>> sudo useradd -r haproxy
>>
>> haproxy -v
>>
>>
>>
>>
>>
>> ================================================================================================
>>
>> Create service file to stop "sudo systemctl status haproxy" throwing "bad"
>> errors
>>
>> ================================================================================================
>>
>>
>>
>> # Create a file as per below :
>>
>>
>>
>> sudo vi /etc/systemd/system/haproxy.service
>>
>>
>>
>> #To edit press "I" , the bottom left should popup saying "insert"
>>
>> #Paste in the below config :
>>
>>
>>
>>
>>
>> #*************************************************************
>>
>> [Unit]
>>
>> Description=HAproxy
>>
>> After=network.target
>>
>>
>>
>> [Service]
>>
>> Type=forking
>>
>> ExecStart=/etc/rc.d/init.d/haproxy start
>>
>> ExecStop=/etc/rc.d/init.d/haproxy stop
>>
>>
>>
>> [Install]
>>
>> WantedBy=multi-user.target
>>
>> #*************************************************************
>>
>>
>>
>>
>>
>> ________________________________
>>
>>
>
>
>
> --
> Best regards, Juriy Strashnov
>
> Mob. +7 (953) 742-1550
> E-mail: [email protected]
>
> Please consider the environment before printing this email.



-- 
Best regards, Juriy Strashnov

Mob. +7 (953) 742-1550
E-mail: [email protected]

Please consider the environment before printing this email.

Reply via email to