Ubuntu 編譯安裝haproxy

2021-10-02 02:14:56 字數 4767 閱讀 8363

整體完整安裝安裝

## 啟動指令碼可以從yum安裝的檔案拷貝乙個,也可以自己寫

root@youyou:~# cat /lib/systemd/system/haproxy.service

[unit]

description=haproxy load balancer

after=syslog.target network.target

[service]

execstartpre=/usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -c -q

execstart=/usr/sbin/haproxy -ws -f /etc/haproxy/haproxy.cfg -p

/var/lib/haproxy/haproxy.pid

execreload=/bin/kill -usr2 $mainpid

[install]

wantedby=multi-user.target

## 新增使用者

root@youyou:~# useradd haproxy -s /sbin/nologin

## 基礎配置檔案

編譯安裝lua報錯問題

需要安裝三個包 gcc,make,libreadline-dev

command 'make' not found, but can be installed with:

apt install

make

apt install make-guile

cd src &&

make linux

make all syscflags=

"-dlua_use_linux" syslibs=

"-wl,-e -ldl -lreadline"

gcc -std=gnu99 -o2 -wall -wextra -dlua_compat_5_2 -dlua_use_linux -c -o lapi.o lapi.c

make[2]: gcc: command not found

: recipe for target 'lapi.o' failed

make[2]: *** [lapi.o] error 127

makefile:110: recipe for target 'linux' failed

make[1]: *** [linux] error 2

makefile:55: recipe for target 'linux' failed

make: *** [linux] error 2

lua.c:82:10: fatal error: readline/readline.h: no such file or directory

#include

^~~~~~~~~~~~~~~~~~~~~

compilation terminated.

: recipe for target 'lua.o' failed

make[2]: *** [lua.o] error 1

makefile:110: recipe for target 'linux' failed

make[1]: *** [linux] error 2

makefile:55: recipe for target 'linux' failed

make: *** [linux] error 2

cd src &&

make linux

make all syscflags=

"-dlua_use_linux" syslibs=

"-wl,-e -ldl -lreadline"

gcc -std=gnu99 -o2 -wall -wextra -dlua_compat_5_2 -dlua_use_linux -c -o lua.o lua.c

gcc -std=gnu99 -o lua lua.o liblua.a -lm -wl,-e -ldl -lreadline

gcc -std=gnu99 -o2 -wall -wextra -dlua_compat_5_2 -dlua_use_linux -c -o luac.o luac.c

gcc -std=gnu99 -o luac luac.o liblua.a -lm -wl,-e -ldl -lreadline

src/lua -v

編譯安裝haproxy報錯問題

UBUNTU編譯安裝SVN

cd usr mkdir yuan cd yuan 獲得安裝檔案 tar zfxv apr 1.5.2.tar.gz tar zfxv apr util 1.5.4.tar.gz tar zfxv subversion 1.9.2.tar.gz tar zfxv zlib 1.2.8.tar.mid...

Ubuntu編譯安裝llvm clang

llvm llvm tools clang llvm projects compiler rt wget mv llvm 3.6.0.src llvm cd llvm tools wget tar xf cfe 3.6.0.src.tar.xz mv cfe 3.6.0.src clang cd l...

Ubuntu 編譯安裝 Bitcoin Core

將壓縮檔案考到對應目錄解壓 unzip bitcoin master.zip總的安裝流程,但是過程中會遇到一些問題 cd bitcoin master autogen.sh configure make make install autogen.sh configure failed,please ...