centos7

How to setup local syslog-ng in docker container of CentOS 7?

我只是一个虾纸丫 提交于 2019-12-04 19:02:16
I want to isolate a testing environment in docker, I did that on CentOS 6 How to let syslog workable in docker? In CentOS 7, the syslog-ng's configuration is different, when I run /usr/sbin/syslog-ng -F -p /var/run/syslogd.pid It appears the following error message, but there is no proc/kmsg in config files. syslog-ng: Error setting capabilities, capability management disabled; error='Operation not permitted' Error opening file for reading; filename='/proc/kmsg', error='Operation not permitted (1)' The Dockerfile FROM centos RUN yum update --exclude=systemd -y \ && yum install -y yum-plugin

How to enable mod_rewrite on Apache 2.4?

别来无恙 提交于 2019-12-04 17:31:36
问题 I'm using Wordpress and wanted to enable pretty urls feature, but they don't work, i'm thinking that it's because of mod_rewrite, but i don't know how to enable it on Apache 2.4 under CentOS 7... I've already try this: grep -i LoadModule /etc/httpd/conf/httpd.conf | grep rewrite but nothing... Also would like to know it loading all Apache modules has any bad consequence or is it bad practice? 回答1: I found the way to know if a module is loaded or not, here's to command to list the modules

Failed to get D-Bus connection: Operation not permitted

依然范特西╮ 提交于 2019-12-04 16:16:33
问题 I'm trying to install ambari 2.6 on a docker centos7 image but in the the ambari setup step and exactly while intializing the postgresql db I receive this error: Failed to get D-Bus connection: Operation not permitted I've got this error every time I try to run a serice on my docker image. I tried every solution in the net but nothing worked yet. Does any one have an idea how to resolve this ? Thank you in advance 回答1: Use this command docker run -d -it --privileged ContainerId /usr/sbin/init

Nginx: Permission denied to Gunicorn socket on CentOS 7

会有一股神秘感。 提交于 2019-12-04 12:01:56
I'm working in a Django project deployment. I'm working in a CentOS 7 server provided ma EC2 (AWS). I have tried to fix this bug by many ways but I cant understand what am I missing. I'm using ningx and gunicorn to deploy my project. I have created my /etc/systemd/system/myproject.service file with the following content: [Unit] Description=gunicorn daemon After=network.target [Service] User=centos Group=nginx WorkingDirectory=/home/centos/myproject_app ExecStart=/home/centos/myproject_app/django_env/bin/gunicorn --workers 3 --bind unix:/home/centos/myproject_app/django.sock app.wsgi

PostgreSQL “initdb” (Database Initialization) on Linux

半城伤御伤魂 提交于 2019-12-04 10:36:47
I'm working on creating a Database Cluster (single database) in PostgreSQL 9.x working on a Linux system (CentOS - RedHat - Fedora). I've installed the correct PostgreSQL packages (server & client) however, I'm unable to create a database and get some type of initializing dependencies error: Bus Error / Exit Code 135 . I've changed my user to "postgres" with "su postgres" and then tried to initialize the database with "initdb" (this may be the problem) Installed: postgresql-libs-9.2.13-1.el7_1.x86_64 Installed: postgresql-9.2.13-1.el7_1.x86_64 Installed: postgresql-server-9.2.13-1.el7_1.x86_64

resize2fs: Bad magic number in super-block while trying to open

戏子无情 提交于 2019-12-04 07:21:17
问题 I am trying to resize a logical volume on CentOS7 but am running into the following error: resize2fs 1.42.9 (28-Dec-2013) resize2fs: Bad magic number in super-block while trying to open /dev/mapper/centos-root Couldn't find valid filesystem superblock. I have tried adding a new partition (using fdisk) and using vgextend to extend the volume group, then resizing. Resize worked fine for the logical volume using lvextend, but it failed at resize2fs. I have also tried deleting an existing

Scheduling a python 3.6 script in using crontab/cron

无人久伴 提交于 2019-12-04 04:55:21
问题 I'm just setting up a cron tab/job on my Cent OS developement server. Within my crontab I have the following. (Ignore the time setting, this was added about 15:32 UTC server time just to get the next scheduled run in). 34 15 * * * cd welcomeclient-0.0.5 && python3.6 main.py In the command line cd welcomeclient-0.0.5 && python3.6 main.py works fine. welcomeclient-0.0.5 is under root in the droplet, and python3.6 is in /usr/bin . Any suggestions? 回答1: Try using absolute paths in your crontab

centos libgeos repository missing

百般思念 提交于 2019-12-04 03:31:24
问题 On centos 7.3 minimal trying to install shapely or geopandas requires access to https://github.com/libgeos/libgeos libgeos. Trying to install this via sudo yum install libgeos-dev tells me that this package is not available. It seems that I am lacking a repository. So far I have been unable to find a working one as http://trac.osgeo.org/geos is pointing to https://yum.postgresql.org/repopackages.php#pg96 for the RPM but still after rpm -Uvh https://download.postgresql.org/pub/repos/yum/9.6

sudo yum install installs only JRE not JDK - Centos

≡放荡痞女 提交于 2019-12-04 02:54:38
I tried installing open-jdk in Centos using the below command, sudo yum install java-1.8.0-openjdk-1.8.0.131-3.b12.el7_3.x86_64 It installs only the JRE by not JDK. After installation, The folder /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.131-3.b12.el7_3.x86_64 only jre javac is not recognized. After going through this link , found out that sudo yum install java-1.8.0-openjdk installs only JRE. Executed sudo yum install java-1.8.0-openjdk-devel to install JDK. 来源: https://stackoverflow.com/questions/44847659/sudo-yum-install-installs-only-jre-not-jdk-centos

centos7安装gitlab7.5.0

≯℡__Kan透↙ 提交于 2019-12-04 01:55:02
在 http://my.oschina.net/u/1169607/blog/345833 中介绍了 centos7 上安装 gitlab 的方法,接下来想体验下 gitlab CI 的使用。但是 gitlab CI 需要 gitlab 的版本为 7.5.0 或更新,所以需要卸载之前安装的 7.4.3 ,重新安装 7.5.0 。 1 卸载 gitlab 首先用 rpm -qa | grep -i gitlab 命令查看安装的 gitlab ,然后用 rpm -e --nodeps 命令删除已安装的 gitlab ,然后再用 rpm -qa | grep -i gitlab 命令查看下是否删除,操作如下所示: [root@openstack ~]# rpm -qa | grep -i gitlab gitlab-7.4.3_omnibus.5.1.0.ci-1.el7.x86_64 [root@openstack ~]# rpm -e --nodeps gitlab-7.4.3_omnibus.5.1.0.ci-1.el7.x86_64 [root@openstack ~]# rpm -qa | grep -i gitlab 接下来开始安装 gitlab7.5.0 。 2 下载包和安装 在 http://my.oschina.net/u/1169607/blog/345833