How to make Python script run as service?

I use this code to daemonize my applications. It allows you start/stop/restart the script using the following commands. python myscript.py start python myscript.py stop python myscript.py restart In addition to this I also have an init.d script for controlling my service. This allows you to automatically start the service when your operating system boots-up. Here … Read more

Tests fail immediately with unknown error: DevToolsActivePort file doesn’t exist when running Selenium grid through systemd

Thumb rule A common cause for Chrome to crash during startup is running Chrome as root user (administrator) on Linux. While it is possible to work around this issue by passing –no-sandbox flag when creating your WebDriver session, such a configuration is unsupported and highly discouraged. You need to configure your environment to run Chrome … Read more

How to upgrade glibc from version 2.12 to 2.14 on CentOS?

You cannot update glibc on Centos 6 safely. However you can install 2.14 alongside 2.12 easily, then use it to compile projects etc. Here is how: mkdir ~/glibc_install; cd ~/glibc_install wget http://ftp.gnu.org/gnu/glibc/glibc-2.14.tar.gz tar zxvf glibc-2.14.tar.gz cd glibc-2.14 mkdir build cd build ../configure –prefix=/opt/glibc-2.14 make -j4 sudo make install export LD_LIBRARY_PATH=/opt/glibc-2.14/lib

How to install PHP mbstring on CentOS 6.2

do the following: sudo nano /etc/yum.repos.d/CentOS-Base.repo under the section updates, comment out the mirrorlist line (put a # in front of the line), then on a new line write: baseurl=http://centos.intergenia.de/$releasever/updates/$basearch/ now try: yum install php-mbstring (afterwards you’ll probably want to uncomment the mirrorlist and comment out the baseurl)

How to install ffmpeg for PHP

The easiest solution is to download an already compiled ffmpeg binary/executable and point your script to it. On the FFmpeg Download page refer to the Get the packages section for links to recent static builds for Linux, Windows, and macOS. You can use shell_exec() as shown in FFmpeg Wiki: PHP and provide the full path … Read more

How to install latest version of git on CentOS 8.x/7.x/6.x

You can use WANDisco’s CentOS repository to install Git 2.x: for CentOS 6, for CentOS 7 Install WANDisco repo package: yum install http://opensource.wandisco.com/centos/6/git/x86_64/wandisco-git-release-6-1.noarch.rpm – or – yum install http://opensource.wandisco.com/centos/7/git/x86_64/wandisco-git-release-7-1.noarch.rpm – or – yum install http://opensource.wandisco.com/centos/7/git/x86_64/wandisco-git-release-7-2.noarch.rpm Install the latest version of Git 2.x: yum install git Verify the version of Git that was installed: git –version … Read more

index.php not loading by default

Apache needs to be configured to recognize index.php as an index file. The simplest way to accomplish this.. Create a .htaccess file in your web root. Add the line… DirectoryIndex index.php Here is a resource regarding the matter… http://www.twsc.biz/twsc_hosting_htaccess.php Edit: I’m assuming apache is configured to allow .htaccess files. If it isn’t, you’ll have to … Read more

Execute PHP script in cron job

Automated Tasks: Cron Cron is a time-based scheduling service in Linux / Unix-like computer operating systems. Cron job are used to schedule commands to be executed periodically. You can setup commands or scripts, which will repeatedly run at a set time. Cron is one of the most useful tool in Linux or UNIX like operating … Read more

tech