我最近把我的CentOS 7机器从一个Apachenetworking服务器移到了一个nginxnetworking服务器上,而且在学习nginx的入口和出口时,我仍然在研究各种问题。 我偶然发现的一个问题是,在我的公共Web根目录中,文本文件(如robots.txt)无法访问。 我的服务器块configuration如下: server { listen 80; server_name example.com; root /var/www/example.com/public_html; index index.php; access_log /var/www/example.com/logs/example.com_access.log; error_log /var/www/example.com/logs/example.com_error.log error; location / { index index.php index.html; } location /reports { autoindex on; } location ~ \.php$ { try_files $uri =404; fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } error_page 404 /var/www/html/404.html; error_page 500 502 503 504 […]
我们正在CentOS 7上运行一个LAMP堆栈VPS,它托pipe着一些网站,MariaDB数据库和相关的服务。 在深夜,我们的服务器神秘地完全离线。 当我们发现这个问题时,我们重新启动了VPS,服务器恢复正常了 – 但是我收到了一个SSH警告,告诉我RSA2指纹在重新login时发生了变化(这看起来非常可疑)。 日志parsing似乎表明,eth1连接突然停止工作: 完整日志从/ var / log / messages: http : //pastebin.com/Gbmitkhs 以下是服务器脱机之前的最后几行: Dec 17 02:24:53 WebServer NetworkManager[487]: <warn> (eth1) firewall zone remove failed [102402]: (4) Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the […]
要求:我试图在最新的CentOS 7上运行无头selenium(使用PHPUnit)。 问题:似乎我正确安装了一切,但Firefox不启动,我的seleniumweb驱动程序卡在14:45:31.646 INFO – Launching Firefox… 用firefox命令,我得到以下输出 [admin@EE ~]$ /usr/bin/Xvfb :1 -screen 0 1024x768x24 & [1] 11932 [admin@EE ~]$ export DISPLAY=:1 [admin@EE ~]$ firefox firefox:11936): Gtk-WARNING **: Locale not supported by C library. Using the fallback 'C' locale. Xlib: extension "RANDR" missing on display ":1". Fontconfig warning: ignoring UTF-8: not a valid region tag […]
如果我在端口25的局域网连接到我的邮件服务器,它提供了STARTTLS telnet mailserver.com 25 Trying 192.168.0.x… Connected to mailserver.com Escape character is '^]'. 220 mailserver.com ESMTP Postfix ehlo bla 250-mailserver.com 250-PIPELINING 250-SIZE 10240000 250-VRFY 250-ETRN 250-STARTTLS 250-ENHANCEDSTATUSCODES 250-8BITMIME 250 DSN 如果我从外部尝试,我不会得到STARTTLS报价: telnet mailserver.com 25 Trying xx.xxx.xxx.xx… Connected to mailserver.com Escape character is '^]'. 220 mailserver.com ESMTP Postfix ehlo bla 250-mailserver.com 250-SIZE 10240000 250-VRFY 250 DSN […]
我想重新格式化/ dev / md0,这是一个由4个磁盘(sd [bcde])组成的RAID0arrays。 但是,当我试图运行命令mke2fs,我收到以下错误信息: /dev/md0 is apparently in use by the system; will not make a filesystem here! 我也尝试了mdadm – 停止它,但它没有工作: mdadm: Cannot get exclusive access to /dev/md0:Perhaps a running process, mounted filesystem or active volume group? 仅供参考,/ dev / md0未安装,并且lsof / fuser的输出仅为空。 有什么想法吗? [UPDATE1] lsblk的输出如下所示: NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT […]
我们有大的NFS服务器(大约50TB的数据,数以百万计的文件)。 具有SSDcaching的12x 6TB SATA磁盘(MegaRAID CacheCade)。 CentOS 7. 1x至强E5-2620 我们的问题是,从连接到这个NFS服务器的6个服务器中有大约100个进程导致大量的负载。 混合的读/写操作。 我们试图find一种方法来了解是什么导致了负载 – 哪个客户端(IP),哪个目录出口,希望哪个目录。
给定一个包含文件的树结构,说: source |– bar | +– three.txt |– baz | +– four.txt +– foo |– one.txt +– two.txt 如果我做 tar czvf dest/archive-1.tgz –listed-incremental dest/archive.snar source/* 这将创build一个包含所有当前文件和文件夹的.tgz文件,正如我所期望的那样: source/bar/ source/baz/ source/foo/ source/bar/three.txt source/baz/four.txt source/foo/one.txt source/foo/two.txt 如果我马上做: tar czvf dest/archive-2.tgz –listed-incremental dest/archive.snar source/* 这似乎创build.tgz文件包含当前目录的所有子文件夹,没有文件: source/bar/ source/baz/ source/foo/ 这不是我想要的。 就像这样的一个玩具例子来说,它并没有那么糟糕,但是在一个大的文件夹结构中,很难说这个.tgz基本上是空的。 这是很多的噪音。 理想情况下, tar会告诉我,没有更新的文件,并退出一个错误代码,但即使它做了一个空的焦油,这将是更好的(对于我来说,在这种情况下)比大量空文件夹的档案。 有没有办法让tar –listed-incremental像我想要的那样行事? 我已经做了一些searchfind解决scheme,但我还没有find很多。 我最终可能会停止使用–listed-incremental并且用find来组装一个文件列表,但是如果有一种方法可以让–listed-incremental做我想做的事情,那么这将是更多的工作。 有什么build议么?
我有HP ML 150 Smart Array b140i控制器。 我想安装CentOS 6.6,但驱动程序不是内置ISO。 我已经下载驱动程序并安装在USB(dd)中。 我需要命令来检查USB,以及放在哪里。
挂载多个共享时获取意外的行为。 NFS服务器 $ -> cd /mnt/raid/nas && ls -lZa drwxrwxr-x. nas filer unconfined_u:object_r:file_t:s0 file drwxrwxr-x. nas filer unconfined_u:object_r:file_t:s0 repo $ -> cat /etc/exports /mnt/raid/nas 10.1.0.0/18(rw,fsid=0,sync) /mnt/raid/nas/repo 10.1.0.0/18(rw,all_squash,sync,no_subtree_check,anonuid=501,anongid=503) /mnt/raid/nas/file/perm 10.1.0.0/18(rw,all_squash,sync,no_subtree_check,anonuid=501,anongid=503) $ -> id nas && id filer uid=501(nas) gid=501(nas) groups=501(nas) uid=502(filer) gid=503(filer) groups=503(filer) NFS客户端 $ -> id nas && id filer uid=501(nas) gid=501(nas) groups=501(nas) uid=502(filer) gid=503(filer) […]
Redhat有这个支持安全修复的策略。 但是,当RHEL和CentOS站点被审计时,审计人员总是列出软件包版本或者询问ssh它的版本号是什么,然后他们让你失败,因为你看起来运行的是OpenSSH的易受攻击版本。 我能看到的唯一方法就是: 编译RHEL安全公告的列表,这大概会显示显然旧的rpm实际上是修补的。 我敢打赌,审计师实际上不会真正阅读。 只要安装一个新的包,即使它没有意义。 这比听起来要困难得多,因为开发人员的软件包不会有init.d脚本和其他集成。 而当你的远程访问方法时,OpenSSH很难安装在无人值守数据中心的顶部。 有更好的主意吗? 有一种叫做OVAL的东西。 Redhat至less用来提供这种格式的build议。 它是否真的在审计工作?