Articles of centos

如何dynamic地将主机名传给kickbart文件

在kickstart文件中,您可以像这样设置主机名: network –hostname=derp.fart 我可以用这个命令创build一个新的系统 cobbler system add –name=MYNEWSYSTEM –profile=string –mac=AA:BB:CC:DD:EE:FF 我怎样才能让补鞋匠把系统的名字(MYNEWSYSTEM)写入kickstart文件中的–hostname参数?

nginx作为hypnotoad的反向代理

我已经安装了一个监听80的nginx服务器和一个8080上的hypnotoad服务器。 现有 example.com = nginx服务器 example.com:8080 = hypnotoad服务器 我想configurationnginx作为反向代理,例如: 需要 example.com = nginx服务器 example.com/up = hypnotoad服务器 nginx服务器位于/ var / www / nginx / public , hypnotoad服务器位于/ var / www / hypnotoad / 我曾尝试将以下内容放置在站点可用文件夹中的nginxconfiguration的末尾: location / { proxy_pass http://127.0.0.1:8080/; } 当我访问example.com/up时,我仅被提供文本和超链接。 没有一个CSS或JavaScript的工作 。 当我从浏览器中查看源代码时,它指向nginx服务器的资产,而不是hypnotoad服务器。 我如何解决它?

启用fips后,sudo停止工作

在rhel6系统中,我使用本指南启用了fips: https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/sect-Security_Guide-Federal_Standards_And_Regulations-Federal_Information_Processing_Standard.html 重新启动系统后,sudo条目不再工作。 进入sudoers: example ALL=(ALL) ALL 命令使用sudo运行的示例: sudo ls -l /root [sudo] password for example: /var/cache/.security.db: unable to flush: Permission denied sudo: PERM_ROOT: setresuid(0, -1, -1): Operation not permitted sudo: unable to open /var/db/sudo/example/2: Operation not permitted sudo: unable to send audit message: Operation not permitted sudo: unable to set supplementary group IDs: Operation […]

我可以使用其他版本的PostgreSQL的pg_config吗?

我在CentOS 7上运行PostgreSQL 9.4。我从PostgreSQL的 仓库安装了它。 现在我想安装rubygem。 但是它失败了,因为找不到pg_config 。 现在, psql工作,并在rpm文件,我可以看到: $ rpm -q –scripts -p postgresql94-9.4.12-1PGDG.rhel7.x86_64.rpm | egrep 'psql|pg_config' /usr/sbin/update-alternatives –install /usr/bin/psql pgsql-psql /usr/pgsql-9.4/bin/psql 940 … 所以,它使psql自动可用,但不是pg_config 。 是devise还是意外? 我是否应该安装posgresql ,并使用PosgreSQL 9.2中的pg_config ?

无法检索存储库的metalink:epel

我有两个CentOS服务器,一个是带有VirtualBox提供程序的Vagrant虚拟机,另一个是租用的VPS。 他们使用相同的手册进行configuration。 在VPS上一切都很好,但是我在EPEL上遇到了错误。 我已经恢复了我的剧本几个提交,当我100%确定一切正常,但仍然是同样的错误。 我按照以下顺序使用geerlingguy所做的5个angular色: – { role: geerlingguy.repo-epel } – { role: geerlingguy.firewall } – { role: geerlingguy.nginx } – { role: geerlingguy.git } – { role: geerlingguy.nodejs } 运行我的手册会给我一个错误: Failure talking to yum: Cannot retrieve metalink for repository: epel/x86_64. Please verify its path and try again 当我SSH进入stream浪的机器,并尝试运行任何yum命令: Cannot retrieve metalink for repository: epel/x86_64. […]

CentOS 6.9我删除了libcom_err – 如何恢复它?

我有一个CentOS 6.9 x64服​​务器。 由于libcom_err包的问题(有关冲突的依赖关系),yum更新失败。 我决定尝试删除libcom_err,然后重新安装,看看是否能解决我的问题。 原来这是一个非常糟糕的主意。 删除libcom_err包(并删除了一些其他的依赖项,如e2fsprogs,libss,mysql_devel,krb5-devel,libcom_err-devel),这种打破了一切。 我想我需要下载这个文件,然后手动安装在我的服务器上: http : //mirror.centos.org/centos/6/os/x86_64/Packages/libcom_err-1.41.12-23.el6.x86_64.rpm 除此之外,因为libcom_err没有任何作用。 我无法运行yum,wget或curl。 我该怎么办? 我感觉有点失落,我会做一个干净的安装,除了我的备份工具也损坏,因为libcom_err丢失。

使用systemd重试所有失败的坐骑

我创build了9个机器上复制的几个GlusterFS卷。 所有的坐骑(确切地说128)由systemdpipe理。 systemctl命令显示一个随机的挂载子集为“失败”(参见下面的列表)。 从日志消息中,我猜测那是因为networking或gluster守护进程当时还没有准备好。 mnt-gluster-gluster\x2d119.mount loaded active mounted /mnt/gluster/gluster-119 mnt-gluster-gluster\x2d12.mount loaded active mounted /mnt/gluster/gluster-12 ● mnt-gluster-gluster\x2d120.mount loaded failed failed /mnt/gluster/gluster-120 mnt-gluster-gluster\x2d122.mount loaded active mounted /mnt/gluster/gluster-122 mnt-gluster-gluster\x2d123.mount loaded active mounted /mnt/gluster/gluster-123 ● mnt-gluster-gluster\x2d124.mount loaded failed failed /mnt/gluster/gluster-124 mnt-gluster-gluster\x2d125.mount loaded active mounted /mnt/gluster/gluster-125 mnt-gluster-gluster\x2d126.mount loaded active mounted /mnt/gluster/gluster-126 我认为这将是一个足够的解决scheme,只是重试所有失败的坐骑。 我怎么能做到这一点?

添加了dns端口到iptables,但是没有打开CentOS 7

我添加了DNS服务器端口到iptables,甚至指定的服务正在监听,当我用netstat检查它,但是当我检查端口从外面closures。 iptables -n -L =>输出: Chain INPUT (policy ACCEPT) target prot opt source destination ACCEPT all — 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED ACCEPT icmp — 0.0.0.0/0 0.0.0.0/0 ACCEPT all — 0.0.0.0/0 0.0.0.0/0 ACCEPT tcp — 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:22 ACCEPT tcp — 0.0.0.0/0 0.0.0.0/0 tcp dpt:80 state NEW,ESTABLISHED REJECT all — 0.0.0.0/0 0.0.0.0/0 reject-with […]

configurationiptables让Docker容器访问

我有一个运行Docker的CentOS服务器,我试图用iptables来保护它。 而我无法弄清楚如何让容器访问互联网,而不需要从外部访问端口。 我已经停止了Docker使用'–iptables = false'命令搞乱我的iptables,现在正在努力手动configurationiptables。 我想设置防火墙,以便: input被删除,除非我特别打开它们 容器可以通过本地主机连接相互通信 容器可以连接到互联网下载代码等 我有前两个,但无论我尝试启用第三个无效的第一! 我有两个testing容器。 一个httpd容器转发其web输出端口3333 – 另一个运行Debian的容器。 IPTables被configuration为 iptables -P INPUT DROP iptables -P FORWARD DROP iptables -P OUTPUT ACCEPT iptables -A INPUT -i lo -j ACCEPT 所以从外面我不能访问我的服务器:3333。 但是我可以从主机运行:curl localhost:3333并有权限访问。 然后我补充说: iptables -A INPUT -i docker0 -j ACCEPT 现在我可以运行在我的debiantesting容器curl172.17.0.1:3333,并且工作正常。 但是,如果我在testing容器中,并尝试:curl httpbin.org/ip我没有得到任何回应。 我正在阅读https://fralef.me/docker-and-iptables.html并试着build议: iptables-A FORWARD -i docker0 -o eth0 […]

Python源RPMS的centos?

任何人都有一个链接到的网页,其中源代码的位置? 我正在寻找Python源代码生成一个debuggingPython二进制文件。