parent
8d9feff6e2
commit
96c896b09a
13
INSTALL
13
INSTALL
|
|
@ -6,11 +6,20 @@ Please visit the libfastcommon Home Page for more detail.
|
||||||
English language: https://github.com/happyfish100/libfastcommon
|
English language: https://github.com/happyfish100/libfastcommon
|
||||||
Chinese language: http://www.fastken.com/
|
Chinese language: http://www.fastken.com/
|
||||||
|
|
||||||
|
[Optional Step]
|
||||||
|
You can enable io_uring for higher performance when Linux kernel version >= 6.2,
|
||||||
|
CentOS, RockyLinux, AlmaLinux, RHEL etc.:
|
||||||
|
sudo yum install liburing-devel -y
|
||||||
|
|
||||||
|
Debian, Ubuntu etc.:
|
||||||
|
sudo apt install liburing-dev -y
|
||||||
|
|
||||||
|
|
||||||
# download libfastcommon source codes and install it,
|
# download libfastcommon source codes and install it,
|
||||||
# github address: https://github.com/happyfish100/libfastcommon.git
|
# github address: https://github.com/happyfish100/libfastcommon.git
|
||||||
# gitee address: https://gitee.com/fastdfs100/libfastcommon.git
|
# gitee address: https://gitee.com/fastdfs100/libfastcommon.git
|
||||||
# the command lines as:
|
# the command lines as:
|
||||||
|
|
||||||
git clone https://github.com/happyfish100/libfastcommon.git
|
git clone https://github.com/happyfish100/libfastcommon.git
|
||||||
cd libfastcommon; git checkout V1.0.72
|
cd libfastcommon; git checkout V1.0.81
|
||||||
./make.sh clean && ./make.sh && ./make.sh install
|
./make.sh clean && ./make.sh && sudo ./make.sh install
|
||||||
|
|
|
||||||
6
make.sh
6
make.sh
|
|
@ -115,16 +115,14 @@ if [ "$uname" = "Linux" ]; then
|
||||||
|
|
||||||
major_version=$(uname -r | awk -F . '{print $1;}')
|
major_version=$(uname -r | awk -F . '{print $1;}')
|
||||||
minor_version=$(uname -r | awk -F . '{print $2;}')
|
minor_version=$(uname -r | awk -F . '{print $2;}')
|
||||||
if [ $major_version -eq 5 ] && [ $minor_version -ge 14 ]; then
|
if [ $major_version -eq 5 -a $minor_version -ge 14 ] || [ $major_version -gt 5 ]; then
|
||||||
out=$(grep -F IORING_OP_SEND_ZC /usr/include/liburing/io_uring.h)
|
out=$(grep -F IORING_OP_SEND_ZC /usr/include/liburing/io_uring.h 2>/dev/null)
|
||||||
if [ -n "$out" ]; then
|
if [ -n "$out" ]; then
|
||||||
IOEVENT_USE=IOEVENT_USE_URING
|
IOEVENT_USE=IOEVENT_USE_URING
|
||||||
LIBS="$LIBS -luring"
|
LIBS="$LIBS -luring"
|
||||||
else
|
else
|
||||||
IOEVENT_USE=IOEVENT_USE_EPOLL
|
IOEVENT_USE=IOEVENT_USE_EPOLL
|
||||||
fi
|
fi
|
||||||
elif [ $major_version -gt 5 ]; then
|
|
||||||
IOEVENT_USE=IOEVENT_USE_URING
|
|
||||||
else
|
else
|
||||||
IOEVENT_USE=IOEVENT_USE_EPOLL
|
IOEVENT_USE=IOEVENT_USE_EPOLL
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue