Articles of redhat

RHEL 6.5到6.4降级错误

我正在关注一个关于降级的RHEL 解决scheme,内容如下: 检查版本和发布 search可用的软件包 yum list kernel-2.6.32-358 * 安装rhel 6.4内核包yum install kernel-2.6.32-358.23.2.el6 ….完成! 重启系统 清理 百胜干净的元数据百胜干净所有 现在降级 yum -y降级redhat-release 我收到以下错误下载软件包: https : //cdn.redhat.com/content/dist/rhel/server/6/6Server/x86_64/os/Packages/redhat-release-server-6Server-6.4.0.4.el6。 x86_64.rpm :[Errno 14] PYCURL ERROR 22 – “请求的URL返回错误:404 Not Found”尝试其他镜像。 目前的6.5是干净的安装不升级,我无法find一个方法来configuration6.4仓库…还有任何grub文件的变化:/boot/efi/EFI/redhat/grub.conf / etc / grub .conf /etc/grub.conf.rpmsave 并根据这个指令重新启动,导致服务器启动到6.4的内核…它不工作,既… … search加载的内核没有重新启动,但它似乎太冒险…这个黑客给刚刚最新的命令EFI相关的错误,所以没有应用它(不想去数据中心…但.. 。) 因此,经过5个小时的search,出现了以下问题:当购买RHEL 6.5订阅时,是不可能降级的,或者这是可能的,但首先必须configurationRHEL 6.4回购(如何)!联系?!) 我完全失去了一些根本的基本链接缺less解决这个问题? 提前致谢 !!!

使用没有root权限的iptables

当以用户ec2-user身份运行以下脚本时,出现iptables v1.4.18: can't initialize iptables table filter: Permission denied (you must be root)错误消息iptables v1.4.18: can't initialize iptables table filter: Permission denied (you must be root) 脚本: #!/bin/sh # Offending IP as detected by mod_evasive # Add the following firewall rule (block IP) $IPTABLES -I INPUT -s $IP -j DROP 我怎样才能运行iptables作为一个非root用户来阻止一个IP地址? 注意:这个脚本通常由mod_evasive调用

从SSL证书/密钥中恢复组织信息

我正在pipe理一个RHEL 6.6服务器,我从pipe理员那里inheritance了公司不再有联系。 我需要replaceSSL证书,为此需要一些关于物理组织的信息: $ openssl req -new -newkey rsa:2048 -nodes -sha256 -keyout example.com.key -out example.com.csr Generating a 2048 bit RSA private key ……….+++ …………………………………………………+++ writing new private key to 'example.com.key' —– You are about to be asked to enter information that will be incorporated into your certificate request. What you are about to enter is […]

rsyslog重启后不能写日志文件

首先,感谢花时间看看这个问题,非常感谢。 我已经有连接rsyslog.confconfiguration运行了一段时间,直到今天,当我不得不重新启动rsyslog随着磁盘越来越满。 结果是rsyslog现在正在以所有先前的权限(当前root | root rw被testing安全)logging到一个新的位置(在.conf文件中被解压缩)。 我面临的问题是,无论我尝试,rsyslog不输出文件。 我运行了一个tcpdump,而且还在接收数据。 匹配标准(主机IP地址)不应该有变化,configuration也没有改变。 任何帮助,特别是我可以运行的debugging命令将不胜感激。 我宁愿学习一些新的东西(比如rsyslog),而不是卸载它,只是使用syslog-ng来代替…这里是configuration: ### Modules $ModLoad imtcp $ModLoad imudp $ModLoad imuxsock # provides support for local system logging (eg via logger command) $ModLoad imklog # provides kernel logging support (previously done by rklogd) ### Set log file permissions $FileOwner root $FileGroup root $FileCreateMode 0777 $DirCreateMode 0777 $Umask […]

尽pipe启用,SELinux不会强制执行apache写入限制

问题简介:当创build新/自定义文档根目录时,SELinux不会保护标记为httpd_sys_content_t的文件和目录不被写入,删除或更改。 我已经在不同的服务器版本上重复了两次这种行为。 环境干净,新鲜安装的CentOS 7.完全通过百胜补丁。 epl回购安装。 Apache,PHP,MySQL(mariadb),phpmyadmin安装。 SELinux在CentOS 7上默认启用。getenforce和sestatus都确认SELinux正在运行。 我在apache中创build了一个简单的虚拟主机,其文档根目录设置为:/ web / sites / test1 起初,一切都按预期工作。 SELinux将不允许Apache显示该网站,直到我做了以下事情: semanage fcontext –add –type httpd_sys_content_t "/web(/.*)?" semanage fcontext –add –type httpd_sys_content_t "/web/sites(/.*)?" restorecon -Rv /web 正如所料,这样做后,虚拟主机工作。 然而,奇怪的行为是,在该虚拟主机中安装WordPress,即使httpd_sys_content_t上下文不应允许(根据我的理解),我可以通过WordPress上传图像等。 我已经确认,wordpress目录中的所有文件都被正确标记为:httpd_sys_content_t 然而wordpress仍然可以写入目录(只要老式文件权限允许)。 我提出了一个解决scheme:在执行完整的文件系统重新标记后,恢复典型/预期的行为: touch /.autorelabel reboot 重新启动后,我必须使用httpd_sys_rw_content_t上下文。 但是我想更清楚地理解为什么这样一个步骤是必要的,因为我已经读过一个完整的重新标记应该很less(如果有的话)是必要的。 有没有更容易,更不激烈的手段让SELinux的行为如预期? 为了更加简洁:我是否应该在这种情况下做一个“touch /.autorelabel”? 有没有更好的办法? 如果它没有做任何事情就可以工作(这也是CentOS 7开箱即用的错误)?

阻止从外部访问应用程序的特定端口影响对本地主机脚本的访问

我已经build立了一个运行特定端口6423的应用程序“phanthomjs”,我希望它可以在本地在本地运行的脚本访问,而不能从外部访问。 phantomjs–webdriver=6324 我当前的脚本使用TCP并运行在同一个盒子上,我们使用服务器名称作为localhost来连接到应用程序。 有没有办法在Redhat Linux中阻止从外部访问这个端口?

如何在BIND 9中正确configuration一个无类别的反向区域

我正在尝试为子类C块configuration反向DNS。 我的ISP委托128 / 25.2.0.192.in-addr.arpa。 我已经花了好几个小时阅读无级别反向地图代表团上的所有内容,但是我似乎无法在testing中正确使用这个工具。 当在BIND框上运行挖掘并请求129.128 / 25.2.0.192.in-addr.arpa时,BIND似乎报告为128 / 25.2.0.192.in-addr.arpa区域的权威性,但不是用我期望的server1.example.com的PTRlogging。 我相信我一定会错过一些东西,但我似乎对此一窍不通。 下面, 2.0.192.rev是我的zone文件, named.conf是BINDconfiguration的区域部分,最后是dig的输出。 我想确认这是正确的做法,如果我犯了一个错误,或者如果有更好的方法来做到这一点,请吗? ——————————————————————— 2.0.192.rev ——————————————————————— $TTL 4h $ORIGIN 128/25.2.0.192.in-addr.arpa. @ IN SOA ns1.example.com. hostmaster.example.com. ( 1144449999 ; serial number 3h ; refresh 15m ; update retry 3w ; expiry 3h ; nx = nxdomain ttl ) IN NS ns1.example.com. IN NS ns2.example.com. […]

无法调整逻辑卷的大小

我在lvdisplay vs df -h显示可用空间的差异 [user@box]~ lvdisplay — Logical volume — LV Path /dev/rhel_data/www LV Name www VG Name rhel_data LV UUID 898kpA-ZtbV-RjEB-Qu6V-tM5v-cEvd-KjbtZS LV Write Access read/write LV Creation host, time box.example.com, 2016-06-14 16:43:11 -0400 LV Status available # open 1 LV Size 279.38 GiB Current LE 71521 Segments 3 Allocation inherit Read ahead sectors auto […]

OpenLDAP链覆盖configuration

我试图让OpenLDAP的链覆盖工作,但不幸的是,文档相当稀疏。 我使用RHEL 6附带的OpenLDAP版本2.4.39软件包,LDAP主站和从站正在使用TLS进行通信。 TLS证书和密钥与Mozilla NSS一起存储,因此下面的tls_certdir和tls_cert语句应该是正确的(它们肯定以这种forms用于复制)。 我的configuration(在slapd.confforms,我使用之前转换为OLC符号)是: overlay chain chain-uri ldap://my.ldap.master.example.com chain-rebind-as-user FALSE chain-idassert-bind bindmethod="simple" binddn="cn=Manager,dc=example,dc=com" credentials="xxxxxxxxxxxxxxxx" mode="self" starttls=yes tls_reqcert=demand tls_cacertdir=/etc/openldap/certs tls_cert=my.ldap.slave.example.com chain-tls start tls_reqcert=demand tls_cacertdir=/etc/openldap/certs tls_cert=my.ldap.slave.example.com chain-return-error TRUE […syncrepl…] updateref ldap://my.ldap.master.example.com 我想得到这个工作,以便政策更新转发到主人(例如,当有人得到他们的密码错误五次或更多,奴隶将发送pwdAccountLockedTime到主,而不是本地存储)。 为了这个目的,我在configuration文件中设置了ppolicy_forward_updates。 我已经testing了这一点,并且在从机上进行更改时,没有看到任何stream向LDAP主机的stream量。 有谁知道我在这里做错了吗?

鞋匠不能同步回购我补充说

我给补鞋匠添加了centos基地回购: cobbler repo add –arch=x86_64 –name=Centos-Base –mirror=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra 但运行的补鞋匠reposync失败: received on stderr: Traceback (most recent call last): File "/usr/bin/reposync", line 343, in <module> main() File "/usr/bin/reposync", line 175, in main my.doRepoSetup() File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 681, in doRepoSetup return self._getRepos(thisrepo, True) File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 721, in _getRepos self._repos.doSetup(thisrepo) File "/usr/lib/python2.7/site-packages/yum/repos.py", line 157, in doSetup self.retrieveAllMD() File "/usr/lib/python2.7/site-packages/yum/repos.py", […]