centos7

Ansible way to stop a service only if it needs to be upgraded

∥☆過路亽.° 提交于 2019-12-31 00:45:15
问题 In an ansible playbook I want to stop MariaDB if an upgrade is needed (restart from the RPM package does not always work in my situation). I'm quite new to ansible. I came up with this: - name: "Check if MariaDB needs to be upgraded" shell: "yum check-update MariaDB-server|grep MariaDB|wc -l" register: needs_update - name: "Stop mysql service" service: name: mysql state: stopped when: needs_update.stdout == "1" Is there a better way to do this then by executing a shell command? When running

centos7下yum安装postgis2_94

我与影子孤独终老i 提交于 2019-12-29 07:40:13
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 执行 sudo yum install postgis2_94 后,不出意外会发生以下的错误。 Error: Package: gdal-libs-1.11.0-3.rhel7.x86_64 (pgdg94) Requires: libcfitsio.so.2()(64bit) Error: Package: gdal-libs-1.11.0-3.rhel7.x86_64 (pgdg94) Requires: libdapclient.so.6()(64bit) Error: Package: gdal-libs-1.11.0-3.rhel7.x86_64 (pgdg94) Requires: libarmadillo.so.4()(64bit) Error: Package: gdal-libs-1.11.0-3.rhel7.x86_64 (pgdg94) Requires: libhdf5.so.8()(64bit) Error: Package: gdal-libs-1.11.0-3.rhel7.x86_64 (pgdg94) Requires: libfreexl.so.1()(64bit) Error: Package: gdal-libs-1.11.0-3.rhel7.x86_64 (pgdg94)

Install and configure supervisord on centos 7 to run Laravel queues permanently

大城市里の小女人 提交于 2019-12-29 03:07:45
问题 I want to use Laravel queue system in my project and I want to run php artisan queue:work permanently on server's background, I did some searches about this and I found a command line which can run it even after quit from ssh terminal but It can be down in some cases and can make terrible problems for me. So after a while I found out that there is a package named Supervisord which can restart command even after server is rebooted. So I want to ask someone to help from 0 to 100 step by step

Install and configure supervisord on centos 7 to run Laravel queues permanently

℡╲_俬逩灬. 提交于 2019-12-29 03:06:31
问题 I want to use Laravel queue system in my project and I want to run php artisan queue:work permanently on server's background, I did some searches about this and I found a command line which can run it even after quit from ssh terminal but It can be down in some cases and can make terrible problems for me. So after a while I found out that there is a package named Supervisord which can restart command even after server is rebooted. So I want to ask someone to help from 0 to 100 step by step

(How) Can I use the new C++ 11 ABI with devtoolset-7 on Centos/RHEL?

时光怂恿深爱的人放手 提交于 2019-12-28 15:38:09
问题 My goal is to use gcc 7.2 (and clang 6) on Centos 7 to build executables compatible with Centos 7 targets without devtoolset installed but * using the newer C++ ABI *. The newer ABI fixed a couple of deficiencies in the lib that weren't able to be fixed without an ABI change. E.g list::size O(1) Vs O(n), no COW for strings. I speculated on an answer as to why this might not be possible in the following question. -D_GLIBCXX_USE_CXX11_ABI=1 ineffective for devtoolset-7 on CentOS 7 回答1: This

How to install pip in CentOS 7?

断了今生、忘了曾经 提交于 2019-12-28 03:20:13
问题 CentOS 7 EPEL now includes Python 3.4: yum install python34 However, when I try that, even though Python 3.4 installs successfully, it doesn't appear to install pip. Which is weird, because pip should be included by default with Python 3.4. which pip3 doesn't find anything, nor does which pip . How do I access pip from the Python 3.4 package in CentOS 7 EPEL release? 回答1: The easiest way I've found to install pip3 (for python3.x packages) on CentOS 7 is: $ sudo yum install python34-setuptools

Intel XDK not working on Centos 7 64bits (vmware virtual machine)

妖精的绣舞 提交于 2019-12-25 12:08:10
问题 I'm trying to work with Intel XDK (Inside Centos 7 64 bits vmware machine). I've executed the install with sudo. Everything seems OK after finishing the installation. Then I've tried to run the application, but nothing shows up. Also I've tried reinstalling over again all as root, but still nothing. Any hint? 回答1: Follow these steps to be able to start the latest version of Intel XDK and get it working On CentOS Linux 7.2 or 7.3 (7.2.1511 , 7.3.1611) STEP 1: Download the latest release https:

FastCGI script can't find libfcgi.so.0 in Apache 2.4.6 and mod_fastcgi

拥有回忆 提交于 2019-12-25 03:12:29
问题 This is my simple hello-world FastCGI script written in C. #include "fcgi_stdio.h" #include <stdlib.h> void main(void) { int count = 0; while(FCGI_Accept() >= 0) printf("Content-type: text/html\r\n" "\r\n" "<title>FastCGI Hello!</title>" "<h1>FastCGI Hello!</h1>" "Request number %d running on host <i>%s</i>\n", ++count, getenv("SERVER_NAME")); } It works fine if I compiled it using static linking. gcc -o "test.fcg" "test.c" /usr/local/lib/libfcgi.a But when using dynamic linking... gcc -o

how to install gitlab on a directadmin server

♀尐吖头ヾ 提交于 2019-12-24 20:53:31
问题 I have a VPS with directadmin and few other websites on it, i want to install gitlab without damaging other sites. currently tried but it will show up on all domains. it seems external_url is ignored completely. 回答1: it took me a day to figure out how to do it and i'm gonna share it with others, hope it helps! if you're a beginner like me you should know these two things: 1- all the configurations are in /etc/gitlab/gitlab.rb 2- every time you change gitlab.rb you have to run gitlab-ctl

PHP `exec()` doesn't work if run by Cron

隐身守侯 提交于 2019-12-24 15:42:47
问题 I have a PHP script that is being called every minute by crontab like this: * * * * * /usr/bin/php /var/www/html/cronjobs/watchdog/watchdogExec.php The script executes a number of other PHP scripts and passes a variable like so: $ccmd = "nohup sudo /usr/bin/php watchdog.php " . $var . " &"; exec($ccmd); When called from a browser, watchdogExec.php runs fine and does its job. However when I added the cronjob, the script is not working and is spamming mails with the following error: No entry