centos7

Remove chkconfig header from output

寵の児 提交于 2019-12-10 17:55:55
问题 On my CentOS machine I wrote a script which tells me whether a service is installed or not. Here is the script count=$(chkconfig --list | grep -c "$1") if [ $count = 0 ]; then echo "False" else echo "True" fi The problem is that the output of the command always includes the starting lines of the chkconfig output. For example here is the output of script.sh network [root@vm ~]# ./script.sh network Note: This output shows SysV services only and does not include native systemd services. SysV

Apache error 500 on large file uploads (mod_security)

时光总嘲笑我的痴心妄想 提交于 2019-12-10 16:47:00
问题 As far as I've tried, none of the usual solutions works for me. Well, my problem, I'm receiving an 500 Error every time I upload a "large file" (600 KB ~), with smaller images it works fine. So..., even with this (extreme) .htaccess file it keeps happening, and yes, .htaccess are active: upload_max_filesize = 100M post_max_size = 100M memory_limit = 128M max_input_time = 6000 max_execution_time = 6000 So, I take a look at the logs and find this (is only one line, just pasted it as easy to

Job for httpd.service failed because the control process exited with error code. See “systemctl status httpd.service” and “journalctl -xe” for details

六月ゝ 毕业季﹏ 提交于 2019-12-10 14:55:40
问题 I have installed a fresh copy of Centos 7. Then I restarted Apache but the Apache failed to start. I have 3 days stucked in this issue. Even the support can not figure out the error. sudo service httpd start Failed to start apache : Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details. httpd.service - The Apache HTTP Server Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor

Error while install pymssql in centos 7

旧城冷巷雨未停 提交于 2019-12-10 13:58:05
问题 I have faced the issue while installing the pymssql in my virtual machine (Centos 7) I had python installed version 2.7.6 Command used to install pymssql , pip intall pymssql Error information; [root@dpitstsvr013 magendran]# pip install pymssql Downloading/unpacking pymssql Downloading pymssql-2.1.1.tar.gz (2.4MB): 2.4MB downloaded Running setup.py (path:/tmp/pip_build_root/pymssql/setup.py) egg_info for package pymssql setup.py: platform.system() => 'Linux' setup.py: platform.architecture()

Best approach to resolve php-common conflicts: ignore, fix, other?

北城余情 提交于 2019-12-10 13:56:28
问题 I am attempting to install the Soap module (from webtatic PHP 5.6) on PHP 5.3.3 on CentOS 6. When I run the yum command yum install php56w-soap to install it I get the message below: Error: php56w-common conflicts with php-common-5.3.3-49.el6.x86_64 You could try using --skip-broken to work around the problem You could try running: rpm -Va --nofiles --nodigest What are my options to resolve this? Should I just run with --skip-broken , are there other options? I am running php 5.6.3 and CentOS

Migration of solr cores after solr version upgradation from 4.10.4 to 6.6.0 on Cent os 7

走远了吗. 提交于 2019-12-10 12:17:16
问题 I have upgraded apache solr from 4.10.4 to 6.6.0 on Cent os 7 server, with the help of Upgrade Apache Solr from 4.10.4 to 6.6.0 on Cent os 7 I have taken backup of old solr core namely sample_core in /home/user/old_solr/sample_core folder How can I migrate my old solr(4.10.4) data in new solr version (6.6.0) 回答1: Make sure solr is running sudo service solr status Create new solr core by name sample_core use solr user sudo su solr Create sample_core /opt/solr-6.6.0/bin/solr create -c sample

Cannot install phpMyAdmin Error: php71w-common conflicts with php-common-5.4.16-43.el7_4.1.x86_64

末鹿安然 提交于 2019-12-10 10:56:48
问题 I just installed CentOS 7 and PHP 7.1xx and MySQL but impossible to install phpMyAdmin. I have an error message but no answer on Google yes only one answer but which itself gives me the same error message. rpm -iUvh http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm yum -y update yum -y install phpmyadmin Error: php71w-common conflicts with php-common-5.4.16-43.el7_4.1.x86_64 You could try using --skip-broken to work around the problem You could try running: rpm -Va -

python pycparser setup error

微笑、不失礼 提交于 2019-12-09 10:28:53
问题 I am seeing the following error while setting up pyparser on CentOS 7 via pip /usr/bin/python2 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-PMzCYU/pycparser/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-0bpBrX-record/install-record.txt --single-version-externally-managed --compile Traceback (most recent call last): File "", line 1, in init.py", line 12, in import setuptools.version

Multiple IP addresses on Google Cloud Compute

泄露秘密 提交于 2019-12-09 03:58:42
问题 I'm trying to setup my VM based on CentOS 7 with more than one internal IP address, but it doesn't seem to be as straightforward as Amazon AWS. 回答1: You can add internal IP for VM using routes. (https://cloud.google.com/compute/docs/reference/beta/routes) Here an example of setting another static internal IP to VM: https://cloud.google.com/compute/docs/networking#staticnetworkaddress 来源: https://stackoverflow.com/questions/37979603/multiple-ip-addresses-on-google-cloud-compute

Nodejs mongodb don't woking on server

让人想犯罪 __ 提交于 2019-12-08 10:12:05
问题 On local, I installed NodeJS 9.2 and MongoDB 3.4 I using MongoDB Native Node Driver 3.0.4 My code with database const mongo = require('mongodb').MongoClient; const mongoose = require('mongoose'); mongo.connect('mongodb://localhost:27017/my_database', function(err, client){ console.log(err); if (!err){ var database = client.db('my_database'); database.collection('users').find({}).toArray(function(err, docs){ console.log(docs); }); } }); Result null for error and array users in collection So,