Articles of centos

在CentOS上使用systemd-journal 219的CPU使用率较高

systemd-journal似乎具有较高的CPU使用率,与节点上的实际服务HAProxy相比: 385 root 20 0 69948 26152 25776 S 3.0 0.2 0:04.05 systemd-journal 22509 haproxy 20 0 58264 7256 1812 S 1.3 0.0 0:00.45 haproxy 中央处理器: vendor_id : GenuineIntel cpu family : 6 model : 63 model name : Intel(R) Xeon(R) CPU E5-2676 v3 @ 2.40GHz stepping : 2 microcode : 0x25 cpu MHz : […]

如何确定在服务器上造成高带宽使用率的原因

我有一个运行在VPS上的MySQL数据库服务器。 服务器通过专用networking接口连接到Web服务器,除SSH和PHPMyAdmin安装外,没有公共服务。 前段时间,我安装了一个Monit规则来检查公共networking接口(AKA,而不是MySQL数据经过的那个)上的exceptionstream量: # Monitor network connection check network public with interface eth1 if failed link then alert if changed link then alert if saturation > 90% then alert if download > 10 MB/s then alert if total upload > 1 GB in last hour then alert 几个月前,我开始感到由这个规则触发的Monit警报: Upload bytes exceeded Service public Date: Tue, […]

main.cf中的postfixconfiguration不生效

我在centos 7我configurationpostfix的/etc/postfix/main.cf像这样 smtpd_sasl_auth_enable = yes smtpd_sasl_type = cyrus smtpd_sasl_security_options = noanonymous, noplaintext smtpd_sasl_path = /run/saslauthd smtpd_recipient_restrictions =permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination smtp_sasl_mechanism_filter = GSSAPI 并像这样重新启动后缀 systemctl restart postfix.service 但是当我检查 postconf -d 看到我目前的configuration我看到上面的变化不会影响 输出postconf -d: smtpd_sasl_security_options = noanonymous smtpd_sasl_auth_enable = no

打开文件限制

在mongo db的安装过程中,我遇到了一个警告 软rlimits太低。 rlimits设置为1024个进程,64000个文件。 进程数量至less应该是文件数的32000:0.5倍。 我发现很多网站描述如何提高系统和用户的打开文件的限制,但我还没有发现我可以/应该增加这些值的程度。 这些值是否依赖于服务器资源? 如果是的话,我怎样才能找出我应该为我的系统设置什么样的最大值? 显然,两个设置对于mongodb的性能(打开的文件限制和进程数量)很重要。 我如何正确调整进程的数量? 如何检查我是否使用太高的值?

在没有互联网的系统上安装RPM导致依赖冲突:libstdc ++。so.6,libm等

为了避免XY的问题,让我先描述一下情况。 我们有一个独特情况的客户项目。 我们有一个相对现代的软件栈(Keras DNN的东西),需要在客户端的系统上运行。 该系统是一个Cloudera CentOS 6集群,用于安全生产。 我们无法保证这件事曾经见过networking。 我们开发了一个bash脚本,它使用RPM从磁盘安装必要的软件包,并在我们的本地模拟(容器化)集群上进行testing(因为repo数据库不是最新的,所以YUM失败)。 经过一番捣鼓之后,我们能够让Keras运行起来,而不需要像从互联网上的数据包那样运行。 客户端有自己的虚拟化系统,它应该和实际的集群非常接近(就configuration而言)。 但是,当他运行它时,总是发生巨大的灾难。 很多错误,如: (用于通过sudo rpm -Uvh glibc-common-2.12-1.209.el6_9.1.x86_64.rpm glibc-2.12-1.209.el6_9.1.x86_64.rpm glibc-headers-2.12-1.209.el6_9.1.x86_64.rpm glibc-devel-2.12-1.209.el6_9.1.x86_64.rpm安装glibc-common-2.12和朋友sudo rpm -Uvh glibc-common-2.12-1.209.el6_9.1.x86_64.rpm glibc-2.12-1.209.el6_9.1.x86_64.rpm glibc-headers-2.12-1.209.el6_9.1.x86_64.rpm glibc-devel-2.12-1.209.el6_9.1.x86_64.rpm ) warning: ./rpm/glibc-common-2.12-1.209.el6_9.1.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY error: Failed dependencies tzdata >= 2015g-4 is needed by glibc-common-2.12-1.209.el6_9.1.x86_64.rpm libc.so.6(GLIBC_2.13)(64bit) is needed by (installed) util-linux-2.23.2-26.el7.x86_64 libc.so.6(GLIBC_2.13)(64bit) is […]

发出删除逻辑卷 – 无法删除打开的逻辑卷“XXX_rootimg”,尽pipe它没有打开

我在从Centos中删除逻辑卷时遇到了一个问题。 不幸的是,我不知道以前做了什么,所以我只能写下它现在的样子: 1) #lvremove -vf /dev/mapper/XXX_rootimg Using logical volume(s) on command line Can't remove open logical volume "XXX_rootimg" 2) #dmsetup info -c VG0-XXX_rootimg 253 19 L–w 1 1 0 LVM-tih2pGmALOu0JHX(cut) 3) #lsof /dev/mapper/XXX_rootimg (nothing) 4) #lsof | grep "253,19" (nothing) 5) #lvscan -av ACTIVE '/dev/VG0/XXX_rootimg' [34.18 GB] inherit 6) # lvchange -an -v /dev/mapper/XXX_rootimg Deactivating […]

设置apache允许来自1个IPv6地址的stream量

我试图设置一个Apache只允许用户从一个特定的IP地址。 这是/var/www/html目录的指令 <Directory "/var/www/html"> Options Indexes FollowSymLinks AllowOverride None Options -Indexes <RequireAll> Require ip 2b00:ff2:600:8200::/64 </RequireAll> </Directory> 不幸的是,它阻止了我的IPstream量。 我看到默认的apache网站,虽然我已经设置了一个index.html文件。 任何想法什么是正确的指令,以允许从1 ipv6stream量? 我使用的是Apache 2.4.6

大多数端口无法访问

我使用以下iptablesconfiguration在VPS上运行CentOS -P INPUT ACCEPT -P FORWARD ACCEPT -P OUTPUT ACCEPT -A INPUT -m state –state RELATED,ESTABLISHED -j ACCEPT -A INPUT -p icmp -j ACCEPT -A INPUT -i lo -j ACCEPT -A INPUT -p tcp -m state –state NEW -m tcp –dport 22 -j ACCEPT -A INPUT -p tcp -m state –state NEW -m tcp –dport […]

www名为:错误(意外的RCODE REFUSED)parsing日志

我们的日志文件充满了类似日志 www named[2961]: error (unexpected RCODE REFUSED) resolving '131.79.75.106.in-addr.arpa/PTR/IN': 106.75.128.65#53 右侧的IP地址看起来是来自中国。 我们在我们的服务器上运行多个网站,但据我所知,我们使用我们的主机的DNS服务。 我们的服务器是否被用作DDOS攻击的一部分? 如果是这样,我们怎么能阻止呢? 我怎么知道哪个进程触发了这个DNS请求?

代理(或redirect?)每个位置的请求

像这样的东西可以在mod_proxy中全局运行: ProxyPass /api/* http://localhost:8081/api ProxyPassReverse /api/* http://localhost:8081/api 所以我所有的/api客户端请求都被定向到http://localhost:8081/api 如果我有两个位置,如localhost/site1/ localhost/site2/ ,我需要不同的redirect每个站点?所有这些应用程序请求/ apiasynchronous 所以访问site1,xhr调用请求/ api,我想要http:// localhost:8081 / api来响应 for / site2一个xhr调用请求/ api,我想要http:// localhost:9091 / api来响应 这可以通过在每个文件夹中的.htaccess来完成,或者通过全局redirect来完成吗?我需要mod_rewrite和http Referrer规则或mod_proxy这个吗? 谢谢