How to , and other stuff about linux, photo, php … A linux, photography blog. To remember some linux situation, and fix them quickly.

May 6, 2021

nextcloud face recognition on centos7

Filed under: Linux — Tags: , , — admin @ 12:11 pm

The face recognition for the nextcloud into centos 7 need DLib and OpenBLAS.

The problem is that DLib require C++11 support and the centos 7 have older version of gcc the solution is to install

yum install centos-release-scl

yum install devtoolset-7

The path for the gcc is located /opt/rh/devtoolset-7/root/usr/bin/gcc

To build the DLib this command

cmake -DBUILD_SHARED_LIBS=ON ..

Need to be replaced with

cmake -D CMAKE_C_COMPILER=/opt/rh/devtoolset-7/root/usr/bin/gcc -D CMAKE_CXX_COMPILER=/opt/rh/devtoolset-7/root/usr/bin/g++ -DBUILD_SHARED_LIBS=ON ..

Also to install the pdlib the ./configure need to be replaced with

PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig CC=/opt/rh/devtoolset-7/root/usr/bin/gcc CXX=/opt/rh/devtoolset-7/root/usr/bin/g++ ./configure

February 12, 2019

Docker Command-line completion

Filed under: Linux — Tags: , — admin @ 1:51 pm

Today installed centos7 and then docker . Wanted to run something but docker TAB didn’t work to autocomplete.

The solution is to install the bash-completion

yum -y install bash-completion

December 8, 2017

centos 7 systemctl restart httpd or other service take long time

Filed under: Linux — Tags: , , , — admin @ 12:47 pm

Well on centos 7 I notice that when I run systemctl restart httpd sometime take a lot of time  to restart it .

After some search I found out that there is a TimeoutStopSec variable that do something like this

“Configures the time to wait for stop. If a service is asked to stop, but does not terminate in the specified time, it will be terminated forcibly via SIGTERM, and after another timeout of equal duration with SIGKILL (see KillMode= in systemd.kill(5)). Takes a unit-less value in seconds, or a time span value such as “5min 20s”. Pass “infinity” to disable the timeout logic. Defaults to DefaultTimeoutStopSec= from the manager configuration file”

So I modify the

/usr/lib/systemd/system/httpd.service and added the

TimeoutStopSec=5

Into it

You need to run systemctl daemon-reload after modify that file

[Service]

TimeoutStopSec=5

Powered by WordPress