Articles of centos

简单安全的firewalld只允许ssh?

我升级到CentOS 7并学习firewalld。 当我build立一个新的服务器,我的默认iptableconfiguration最好的安全性(我相信这是一个非常标准的configuration): # IPv4 iptables -F iptables -A INPUT -p tcp –dport 22 -j ACCEPT iptables -P INPUT DROP iptables -P FORWARD DROP iptables -P OUTPUT ACCEPT iptables -A INPUT -i lo -j ACCEPT iptables -A INPUT -m state –state ESTABLISHED,RELATED -j ACCEPT /sbin/service iptables save iptables -L -v # IPv6 ip6tables -F ip6tables […]

R包 – 我应该挂载/ usr / share / R / library

我们有一个小型Linux机器群(~15),最多可容纳20个用户。 在过去的几年中,我们已经编写了几个基本的R脚本来进行基本的统计分析。 我作为新手系统pipe理员的问题是软件包pipe理。 目前,如果有人写一个新的脚本需要一个新的包,这个包需要安装在所有用户的所有机器上。 这似乎是一个相当穴居人的策略(我们也为python和perl模块做这个)。 我目前正在将我们的操作系统从rhel5升级到CentOS6,并且会正确地做事。 这是我最初的想法? 在第一台机器上的R(有CentOs6正在运行) .libPaths()指向“/ usr / lib64 / R / library”“/ usr / share / R / library” 我打算为所有包含行.libPaths("/usr/share/R/library" )用户创build一个默认的.Rprofile 。 我想这会默认安装软件包到上述目录。 目前对usr/share/R/library/的写入权限是drwxr-xr-x 。 第一个问题应该是所有的用户都可以写入这个目录或者以root用户的身份安装R包。 在随后的机器上,我将安装CentOS6,然后我想在所有其他系统上使用nfs来automount / usr / share / R /指向margay:/ usr / share / R /。 所以我更新机器2上的操作系统( lynx )并安装R.如何在lynx上自动挂载/ usr / share / R /指向等价的目录。 这似乎是一个明智的解决scheme? 如果我在margay安装一个新的软件包,我能够自动运行在其他机器上使用这个软件包的任何R脚本吗? […]

不同的networking速度来自同一子网上的服务器

我有一个很奇怪的问题,我正在寻找如何debugging它的build议。 我有两台服务器(A)和(B)在同一个子网和交换机上。 服务器A-> B以全部12MB / s传输,反之亦然。 然而,对于外部站点,服务器A以4MB / s传输,而服务器B仅以500KB / s传输。 相同的文件,相同的terminal服务器,相同的出站路由,相同的传输方式(SCP和HTTP)。 我们没有限制速度,为了testing目的,iptables被closures,两台主机都在运行CentOS 6。 我怎样才能找出造成速度差异的原因?

在LVM上增加docker的容量

我按照这里的说明在CentOS上使用LVM设置docker。 我给它一个16G的磁盘。 它消耗了6.37GB。 现在,我的一个容器用完了磁盘空间。 为了让Docker从LVM池中消耗更多空间并允许容器增长,我该怎么做?

Centos下。 infiniband组播连接失败,状态为-22

我有一个Linux Centos 6.5作为操作系统的集群。 所有的机器通过infiniband连接,networking工作正常,但在所有机器的/ var / log /消息中,我可以看到以下消息 ib0:多播连接失败的ff12:401b:ffff:0000:0000:0000:0000:0001,状态-22 但是,如果我执行支票,我会得到以下结果: #ibcheckstate Summary: 56 nodes checked, 0 bad nodes found 176 ports checked, 0 ports with bad state found 感谢致敬

CentOS Apache将每个端口redirect到80

我在我的服务器上运行CentOS版本6.4(最终),我有以下问题。 我有一个完美运行的Apache 2.2.15安装,但是我添加了另一个虚拟主机到configuration,以便有两个不同的站点:一个在端口80上,另一个在端口8090上。 我已经检查了Apache在两个端口上都在监听,configuration正确,我添加了Listen指令和两个NameVirtualHosts,每个端口一个。 两个端口都在IPTables上打开,并允许在SELinux上访问。 我也重新启动并确保正确的configuration正在应用。 问题是,我试图访问: http://服务器:8090 它显示为该站点configuration的页面 http://服务器:80 任何想法可能发生什么? 如果你需要它,我可以发布configuration文件的部分。 虚拟主机configuration Listen 80 Listen 8090 NameVirtualHost *:80 NameVirtualHost *:8090 <VirtualHost *:8090> ServerAdmin [email protected] DocumentRoot /var/www/y/public_html ServerName a.com ErrorLog /var/www/y/error_log CustomLog /var/www/y/access_log common <directory /var/www/y/public_html> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ – [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </directory> […]

selinux:文件夹的rwx权限

我遇到了调用perl和shell脚本的PHP接口的问题。 这些function可以将file upload到一个文件夹,并在一些input中执行它们,同时将输出存储到其他文件中。 现在看来,我可以给读写访问或执行使用下列之一: chcon -Rv –type=httpd_sys_rw_content_t user_dir/ chcon -Rv –type=httpd_fastcgi_script_exec_t user_dir/ 我怎样才能recursion启用文件夹具有读写和执行权限?

在CentOS 7中自动获取Kerberos票(开机时)?

我使用Ansiblepipe理一组Windows服务器,我的控制机器运行CentOS 7.1。 我已经build立了我的/etc/krb5.conf文件来validation域控制器,所以我可以使用一个域帐户来validation我的所有主机。 这工作正常 – 只要我手动运行kinit [email protected]第一。 问题是,一旦我重新启动我的控制机器,Kerberos票证过期,并且任何试图运行Ansible针对Windows服务器导致标准的“没有Kerberos凭据”错误,直到我再次运行kinit 。 是否有build议的做法: 在系统重启的情况下持久保存Kerberos票据 在启动时对特定域进行身份validation? 编辑:这是我的(修改)输出到realm discover : [root@server ~]# realm discover my.domain.com type: kerberos realm-name: MY.DOMAIN.COM domain-name: my.domain.com configured: kerberos-member server-software: active-directory client-software: sssd required-package: oddjob required-package: oddjob-mkhomedir required-package: sssd required-package: adcli required-package: samba-common login-formats: %[email protected] login-policy: allow-realm-logins

CLOUDLINUX 6.6 x86_64 YUM错误

运行yum更新失败后,运行yum-complete-transaction时出现以下错误: Skipping the running kernel: kernel-2.6.32-531.29.2.lve1.3.11.1.el6.x86_64 –> Processing Dependency: /bin/sh for package: kernel-2.6.32-531.29.2.lve1.3.11.1.el6.x86_64 Skipping the running kernel: kernel-2.6.32-531.29.2.lve1.3.11.1.el6.x86_64 –> Restarting Dependency Resolution with new changes. Error: Depsolving loop limit reached. Error: Package: python-pip-7.1.0-1.el6.noarch (epel) Requires: python(abi) = 2.6 Removing: python-2.6.6-52.el6.x86_64 (@updates) python(abi) = 2.6 Error: Package: python-pip-7.1.0-1.el6.noarch (epel) Requires: python-setuptools Removing: python-setuptools-0.6.10-3.el6.noarch (@cloudlinux-x86_64-server-6) python-setuptools = […]

CSF + LFD在WordPress站点上不能阻止xmlrpc.php的暴力行为

我刚刚在我的rackspace云服务器上安装了csf + lfd(一个运行centos 6.7的vanilla LAMP堆栈)。 我只调整了默认csf.conf文件中的一些设置:允许在TCP_IN和TCP6_IN的端口,然后将RESTRICT_SYSLOG设置为3 。 我也把TESTING设置为0 。 然后我安装了csf + lfd作为服务: chkconfig –level 235 csf on service csf restart 首先设置csf + lfd的动力是抵制对该服务器上的Wordpress网站的攻击。 机器人正在试图通过xmlrpc.php文件蛮力。 首先,我拒绝通过以下方式在Apache中全局访问此文件: <FilesMatch "^(xmlrpc\.php|wp-trackback\.php)"> Order Deny,Allow Deny from all </FilesMatch> 这似乎运作良好。 我可以在Apache错误日志中看到如下行: [Mon Aug 24 13:19:48 2015] [error] [client 1.2.3.4] client denied by server configuration: /path/to/virtualhost/xmlrpc.php 但是有一个机器人来自某个特定的IP地址,每秒钟一个小时左右点击xmlrpc.php URL。 我希望csf + lfd会注意到,并将IP地址添加到拒绝列表,但它没有这样做。 我在csf.conf文件的日志文件位置部分中有Apache错误日志: […]