Articles of centos7

Web服务器显示IP地址而不是域名

我正在CentOS 7上运行一个Web服务器(Apache2)。我有以下虚拟主机文件。 该网站正在服务,因为它应该。 但是,URL在浏览器(任何浏览器)中从域名verizondecom.com更改为服务器的IP地址。 什么需要改变,使URL是域名而不是服务器的IP? NameVirtualHost *:80 <VirtualHost *:80> ServerName www.verizondecom.com ServerAlias verizondecom.com ErrorLog /var/log/httpd/verizondecom.err CustomLog /var/log/httpd/verizondecom.log combined DocumentRoot /var/www/www.verizondecom.com/public SetEnv ENVIRONMENT "production" <Directory "/var/www/www.verizondecom.com/public"> AllowOverride ALL Order allow,deny Allow from all Require all granted </Directory> </VirtualHost>

Centos7 cgroups,限制cronjobs的cpu份额

是否有可能限制从cron启动的进程的CPU份额? 背景:我们已经在Centos7上共享主机,客户可以通过directadmin控制面板制作cronjob。 有时这些cronjobs吃所有cpu。 这就是为什么我想限制由cronjobs启动的进程的CPU。 我试过了: # systemctl set-property crond.service CPUShares=500 但是从cron开始的工作似乎进入user.slice:/user.slice/user-1003.slice/session-283630.scope # systemctl show session-283630.scope -p CPUShares CPUShares=18446744073709551615 所以看起来它不会inheritancecpushares。 是否有可能限制cronjs的cpu份额? 顺便说一句:为什么它显示CPUShares = 18446744073709551615而不是CPUShares = 1024? 当我检入/sys/fs/cgroup/cpu,cpuacct/user.slice/user-0.slice/cpu.shares时,它显示1024: # cat /sys/fs/cgroup/cpu,cpuacct/user.slice/user-0.slice/cpu.shares 1024 但是用systemctl显示CPUShares = 18446744073709551615: # systemctl show user-0.slice -p CPUShares CPUShares=18446744073709551615

改变testing链接端口

安装SonarQube后无法访问TestLink,我遇到了一些麻烦。 也许这件事是: 2软件使用相同的端口。 对方一个软件的.conf是错误的。 这是我的情况: 第一步 :我在Cent OS上成功安装TestLink并能够使用本地IP从浏览器访问Testlink(访问Testlink的先决条件是安装EPEL,之前已经安装了APACHE) 第二步 :不幸的是,我安装了SonarQube。 成功安装SonarQube后。 我无法使用本地IP访问Testlink(或使用:localhost / testlink)。 浏览器自动redirect到SonarQube。 我认为这个问题是使用相同端口的2个软件,这里是Testlink和Sonar的configuration。 我在这个configuration中找不到任何相同的端口。 服务器/机器信息: > static IP: 192.168.198.144 status of Apache: [susu@localhost cltest]$ > sudo systemctl status httpd.service [sudo] password for susu: ● > httpd.service – The Apache HTTP Server Loaded: loaded > (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: > disabled) Active: active […]

解释PTP4L和PHC2SYS系统日志logging

我正在使用ptp4l和phc4sys服务将Centos 7.4服务器的时钟同步到中央PTP源。 这些服务定期写入如下所示的系统日志logging。 我还没有find任何文件解释每个字段在这里意味着什么,单位是什么。 我会感激任何线索! Nov 14 17:07:26 stg1 ptp4l:[718277.895] rms 74 max 99 freq +8760 +/- 84 delay 535 +/- 0 Nov 14 17:07:27 stg1 phc2sys:[718278.105] phc offset -62 s2 freq +14460 delay 2117

SELinux在CentOS 7上的Anacron postrotate脚本中使用时,拒绝“systemctl kill”

我正在使用名为UrBackup的备份软件,我configuration为通过cron.daily每天轮换一次日志。 日志旋转后,软件使用postrotate脚本来向运行进程发送一个带有“systemctl kill”的HUP信号。 然而,SELinux拒绝这个操作,我不知道如何解决这个问题。 这是来自/etc/logrotate.d的UrBackup的整个logrotateconfiguration文件: "/var/log/urbackup.log" { daily rotate 30 missingok create 640 urbackup urbackup compress postrotate test -e /var/run/urbackupsrv.pid && kill -HUP 'cat /var/run/urbackupsrv.pid' || /bin/systemctl kill -s HUP urbackup-server.service endscript } 正如我所发现的那样,系统上正在执行以下有问题的postrotate脚本: /bin/systemctl kill -s HUP urbackup-server.service SELinux阻止了这一点。 以下是/ var / log / messages中的相关日志条目: Nov 14 03:33:33 backup4 kernel: type=1107 audit(1510648413.518:4407695): pid=1 uid=0 […]

CentOS 7中的CGroupconfiguration

我使用的是CentOS 7,我有几个用户在系统中注册(UID:1000,1001,1002等) 我想限制使用cgroup和systemd的每个用户的内存消耗。 下面的命令工作得很好,但UID = 1000的用户必须login。 systemctl set-property user-1000.slice MemoryLimit=3000M systemctl daemon-reload 如果用户不login我收到以下错误信息 Failed to set unit properties on user-1000.slice: Unit user-1000.slice is not loaded. 想象一下,我有20个用户,我想为他们设置内存限制。 我应该手动login还是编写一些解决方法脚本来执行,以便为每个用户运行systemctl set-property命令? 或者存在一些优雅和直接的解决scheme?

Centos 7 IPV6“崩溃”

我不完全确定在哪里开始debugging,我真的希望有人能指出我正确的方向,请。 我花了很多时间在四处搜寻,但考虑到事情似乎每天工作几小时,这并没有真正certificate有效果。 但简而言之,根据ping6日志,IPV6似乎在我的Centos 7系统上工作的时间有限: PING ipv6.google.com(par21s05-in-x0e.1e100.net (2a00:1450:4007:812::200e)) 56 data bytes 64 bytes from par21s05-in-x0e.1e100.net (2a00:1450:4007:812::200e): icmp_seq=1 ttl=58 time=0.830 ms 64 bytes from par21s05-in-x0e.1e100.net (2a00:1450:4007:812::200e): icmp_seq=2 ttl=58 time=0.863 ms 64 bytes from par21s05-in-x0e.1e100.net (2a00:1450:4007:812::200e): icmp_seq=3 ttl=58 time=0.856 ms — ipv6.google.com ping statistics — 3 packets transmitted, 3 received, 0% packet loss, time 2001ms rtt min/avg/max/mdev = […]

通过Cobbler PXE安装CentOS 7的问题

我正在尝试安装Cobbler,这样我就可以通过PXE启动在服务器上自动安装CentOS 7。 但是,在KVM虚拟机上testing安装大约2分钟后,出现以下错误消息: dracut-initqueue[590]: Warning: dracut-initqueue timeout – starting timeout dracut-initqueue[590]: Warning: Could not boot dracut-initqueue[590]: Warning: Warning /dev/root does not exist 安装停在这里,启动Dracut紧急shell。

smartmontools不输出扫描数据

我有一个centOS 7服务器,并想设置smartmontools来为我做一些监控。 raid6中有6个硬盘的megaraid设备。 每天进行短期扫描并将扫描数据输出到日志文件 计划周末的长时间扫描 如果发现任何问题,请给我发电子邮件 我已经把我的规则添加到smartd.conf,重新启动smartd,但没有新的日志文件,所以不知道如果智能扫描只是没有运行,或者如果有另一个问题? # SHORT SCANS DAILY: /dev/sda -d megaraid,0 -s S/../.././06 -m root,[email protected] -M daily -a > /var/log/smartd/short0.log /dev/sda -d megaraid,1 -s S/../.././07 -m root,[email protected] -M daily -a > /var/log/smartd/short1.log /dev/sda -d megaraid,2 -s S/../.././08 -m root,[email protected] -M daily -a > /var/log/smartd/short2.log /dev/sda -d megaraid,3 -s S/../.././09 -m root,[email protected] -M […]

Linux PXE构build无法通过http下载kickstart文件

我正在努力在我们的环境中build立一个基于PXE的构build系统。 服务器将如何启动到networking,从DHCP服务器获取IP地址和PXE服务器详细信息,然后在PXE菜单中select重build选项。 然后,它应该通过HTTP下载kickstart文件。 这里是问题,我注意到,在我的几个testing服务器这一步失败,因为它无法下载Kickstart文件。 几点附加点: HTTP服务器没有问题,因为有另一台服务器正在成功重build(在相同的设置中)。 即使是有问题的服务器以前工作正常,它突然停止工作。 我可以使用wget下载kickstart文件。 我试图四处张望,但找不到任何不妥之处。 在我的三台testing服务器中,其中两台是戴尔PowerEdge R710,另一台是台式机。 所有这三个都用于正常工作,但自从最近几天以来,一个戴尔PowerEdge服务器和桌面开始有这个问题。 附上关于如何尝试下载kickstart文件的截图。 对于故障排除,我尝试将PXE菜单文件中的“inst.ks”更改为“inst.repo”,但仍然失败。 让我知道如果有什么不清楚。 任何指针都会有所帮助。 谢谢。