我在Unix和Linux中提出了这个问题,但是我认为在这里实际上更合适。 目前,我使用下面的logrotate.dconfiguration /var/log/messages { daily compress rotate 7 postrotate /bin/kill -HUP `cat /var/run/syslog-ng.pid 2> /dev/null` 2> /dev/null || true endscript } 但是,我在syslog-ng存储库的官方logrotate示例中看到,不是执行kill -HUP,而是执行重新加载,例如: /var/log/syslog.log { rotate 7 daily compress postrotate /etc/init.d/syslog-ng reload >/dev/null endscript } 这两种方法之间有什么重大的区别,这会使他们的工作方式,但我的方式不工作,或者你会指望有其他问题吗? 这是一个很老的syslog-ng版本,所以我不确定是否可以关联。 对于额外的上下文,这里是我的版本的syslog-ng的初始化脚本的重载function。 reload() { verify_config echo -n $"Reloading syslog-ng: " killproc syslog-ng -HUP RETVAL=$? echo return $RETVAL } 当系统处于故障状态,并没有注意到系统状态过于可疑时,我检查了lsof,空闲内存等等。
我所理解的是,使用诸如<package>-<ver>.el6_7.<arch>等特定的redhat发行版构build的Redhat软件包,也可以在Redhat 6.3或Redhat 6.9等不同次要版本的系统上运行。 它是否正确? 只有内核才重要,甚至内核也不重要? 如果是这样的话,我应该考虑升级红帽发行版吗? 我看到,如果我更新redhat发行版服务器rpm,它只更新一堆文件,如/ etc / redhat-release和gpg keys: /etc/issue /etc/issue.net /etc/pki/product-default /etc/pki/product-default/69.pem /etc/pki/rpm-gpg /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-beta /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-legacy-former /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-legacy-release /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-legacy-rhx /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release /etc/redhat-release /etc/rpm/macros.dist /etc/system-release /etc/system-release-cpe /etc/yum.repos.d/rhel-source.repo /usr/share/doc/redhat-release-server-6Server /usr/share/doc/redhat-release-server-6Server/EULA /usr/share/doc/redhat-release-server-6Server/EULA_de /usr/share/doc/redhat-release-server-6Server/EULA_en /usr/share/doc/redhat-release-server-6Server/EULA_es /usr/share/doc/redhat-release-server-6Server/EULA_fr /usr/share/doc/redhat-release-server-6Server/EULA_it /usr/share/doc/redhat-release-server-6Server/EULA_ja /usr/share/doc/redhat-release-server-6Server/EULA_ko /usr/share/doc/redhat-release-server-6Server/EULA_pt /usr/share/doc/redhat-release-server-6Server/EULA_zh /usr/share/doc/redhat-release-server-6Server/GPL /usr/share/doc/redhat-release-server-6Server/autorun-template 所以,升级到更高级的redhat发行版就意味着更改系统的标签(可能允许less数应用程序运行,这就要求使用特定的redhat发行版来使用他们的工具)? 我想知道在不更新redhat发行版的情况下更新软件包的缺点。 更新1: 那么,我发现这个: cat /etc/rpm/macros.dist # dist macros. %rhel 6 %dist .el6 %el6 1 这与Redhat发行版服务器RPM一起提供。 […]
我已经在RHEL上安装并configuration了Apache 2.4,同时还安装了PHP 5.6。 [root@host ~]# httpd -v Server version: Apache/2.4.6 Server built: Feb 3 2016 08:23:38 [root@host ~]# php -v PHP 5.6.5 (cli) (built: May 16 2016 12:37:09) Copyright (c) 1997-2014 The PHP Group Zend Engine v2.6.0, Copyright (c) 1998-2014 Zend Technologies with Zend OPcache v7.0.4-dev, Copyright (c) 1999-2014, by Zend Technologies 以下是安装在服务器上的相关软件包。 [root@host ~]# […]
我有三个RHEL6服务器,它们似乎安装了相同版本的python-setuptools(对于Python 2.6),但为easy_install报告完全不同的版本。 当我发现其中一个由于SNI问题而无法解决SSL VHost问题时,这一点就显露出来了。 所有的服务器都安装了python-setuptools-0.6.10-3.el6.noarch。 easy_install –version报告的easy_install –version是: setuptools 1.4.2(这是SNI问题) 分配0.6.10 setuptools 36.2.4 from /usr/lib/python2.6/site-packages/setuptools-36.2.4-py2.6.egg(Python 2.6) 谁能告诉我以上版本的出处?
我正在寻找一些RHEL6服务器,并试图设置它们以使用内部的PyPi服务器(由Nexus 3代理)。 问题是我们的内部PyPi服务器是同一个Nginx服务器上的几个SSL VHosts之一,Python 2.6不是SNI兼容; 因此,easy_install失败,因为它试图从错误的Vhost URL下载,并且由于SNIMissingWarning和InsecurePlatformWarning而导致pip失败。 我查看了https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings上的build议,但似乎这是您自己的脚本的解决方法; 它不能解决Python本身的问题。 无论如何,我安装了urllib3和相关的软件包,问题仍然存在。 [[email protected] ~]# pip install –index https://nexus3.internal/repository/pypi-proxy/simple twine DEPRECATION: Python 2.6 is no longer supported by the Python core team, please upgrade your Python. A future version of pip will drop support for Python 2.6 Collecting twine /usr/lib/python2.6/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:318: SNIMissingWarning: An HTTPS request has been made, but […]
我有一个供应商提供给我的自定义rpm,它具有在安装时被拉取的依赖关系。 我需要在封闭的networking系统上安装这个软件包,所以我无法访问互联网来收集依赖关系。 但是,我可以访问一个中间服务器,可以访问互联网,但不会允许来自封闭networking的stream量。 是否有可能创build一个本地networking存储库封闭的networking可以访问安装这个包? 我已经在我的本地目录中创build了一个回购使用: createrepo . 我也尝试使用以下命令获取依赖关系的列表: rpm -qpR *package* 我将如何去从依赖关系列表中拉动RPM或其他安装数据到本地回购?
我有一个nginx服务器,是众多内部服务的反向代理。 虽然我不知道问题何时开始, 目前,重写语句不再将所有httpstream量redirect到https。 重写语句的最终目标是将所有networkingstream量(包括子文件夹)重新写入example.com,重写为www.example.com。 此外,http:// www.example.com的所有networkingstream量都将redirect到https:// www.example.com。 目前,如果您导航到http:// example.com/service1,则会显示404未findnginx。 /var/log/nginx/error.log日志文件数据如下: 2017/08/24 18:36:55 [error] 31476#31476: *919529 open() "/etc/nginx/html/service1" failed (2: No such file or directory), client: 1.2.3.5, server: , request: "GET /chub HTTP/1.1", host: "example.com" 我注意到的一个项目是显示尝试访问网页的日志文件不是在configuration文件中定义的。 这导致我相信configuration文件存在问题,并且nginx不使用其中的指令来路由stream量。 如果您导航到https:// example.com/service1,则会被redirect到正确的URL。 另外,你是否使用www也无所谓。 或者不,输出是一样的。 唯一certificate成功的是https:// www.example.com。 我已经尝试了很多不同的listen / server_name / return / rewrite指令,但都没有成功。 以下是nginx站点configuration。 请注意,由于窗口大小,一些文本会环绕。 另外请注意,我不得不在一些URL中添加空格,因为我没有10个需要添加超过2个URL的代表点。 log_format awstats '$remote_addr […]
我正在尝试在RHEL6上安装php7。 不能添加备用频道到RHN,所以试着从remi仓库下载所有软件包,然后运行以下命令: [root@MYSERVER php-packages]# yum –nogpgcheck localinstall php-7.0.23-2.el6.remi.x86_64.rpm php-ldap-7.0.23-2.el6.remi.x86_64.rpm php-soap-7.0.23-2.el6.remi.x86_64.rpm php-cli-7.0.23-2.el6.remi.x86_64.rpm php-odbc-7.0.23-2.el6.remi.x86_64.rpm php-xml-7.0.23-2.el6.remi.x86_64.rpm php-common-7.0.23-2.el6.remi.x86_64.rpm php-pdo-7.0.23-2.el6.remi.x86_64.rpm php-xmlrpc-7.0.23-2.el6.remi.x86_64.rpm php-gd-7.0.23-2.el6.remi.x86_64.rpm php-pecl-memcache-3.0.9-0.7.20161124gitdf7735e.el6.remi.7.0.x86_64.rpm php-pgsql-7.0.23-2.el6.remi.x86_64.rpm php-json-7.0.23-2.el6.remi.x86_64.rpm 输出显示php-json是php-common所需要的,但是我已经指定了php-json来安装 Loaded plugins: product-id, refresh-packagekit, rhnplugin, search-disabled-repos, security, subscription-manager This system is receiving updates from RHN Classic or RHN Satellite. Setting up Local Package Process Examining php-7.0.23-2.el6.remi.x86_64.rpm: php-7.0.23-2.el6.remi.x86_64 Marking php-7.0.23-2.el6.remi.x86_64.rpm to be installed Examining php-ldap-7.0.23-2.el6.remi.x86_64.rpm: […]
我下载了nrpe-3.2.0.tar.gz和nagios-plugins-2.2.1.tar.gz ,解压缩,编译并安装在一个RHEL 6.8 64位盒子中。 它在SELinux状态为Permissive时运行良好,但在强制模式下不起作用。 我跑了很多次 grep -e nrpe -e nagios /var/log/audit/audit.log | audit2allow -M nrpe semodule -i nrpe.pp 但是我总是从Nagios服务器得到相同的错误信息: check_nrpe -H 10.252.1.212 CHECK_NRPE: Error – Could not complete SSL handshake. 并在节点的nrpe.log中: [1505198565] is_an_allowed_host (AF_INET): host is in allowed host list! [1505198565] Host address is in allowed_hosts [1505198565] Error: (!log_opts) Could not complete SSL handshake […]
我在RHEL系统上运行Apache / 2.2.15(Unix)。 我的LAMP正在本地主机上运行。 我想检查一下HTTP方法: POST, 得到, PUT和 删除 被允许和启用。 我读过可以用netcat或telnet进行检查https://www.owasp.org/index.php/Test_HTTP_Methods_(OTG-CONFIG-006) (我对netcat和telnet都很陌生,所以对我也是如此)。当我尝试netcat时,这是我得到的: [root@joseph ~]# nc localhost 80 OPTIONS / HTTP/1.1 HTTP/1.1 400 Bad Request Date: Fri, 15 Sep 2017 20:17:12 GMT Server: Apache/2.2.15 (Red Hat) Content-Length: 302 Connection: close Content-Type: text/html; charset=iso-8859-1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>400 Bad Request</title> </head><body> <h1>Bad Request</h1> […]