我在 VmWare 上有一个虚拟的 Centos 5.6。突然,它停止工作,似乎文件系统变为只读。
cat /proc/mounts
rootfs / rootfs rw 0 0
/dev/root / ext3 ro,data=ordered 0 0
...
Run Code Online (Sandbox Code Playgroud)
看来这里,这是一个已知的“问题”。但我尝试了“解决方案”,我得到了:
mount -o remount /
mount: block device /dev/VolGroup00/LogVol00 is write-protected, mounting read-only
Run Code Online (Sandbox Code Playgroud)
我不知道到底要在 dmesg 中寻找什么……这里是“只读”的唯一参考:
grep -B 10 "read-only" dmesg
Initializing IPsec netlink socket
NET: Registered protocol family 1
NET: Registered protocol family 17
Using IPI No-Shortcut mode
ACPI: (supports S0 S1 S4 S5<6>Time: tsc clocksource has been installed.)
Initalizing network drop monitor service
Freeing unused kernel …
Run Code Online (Sandbox Code Playgroud) 我有一个正在工作的应用程序服务器,它只能接受来自本地主机的 http 请求。
在家里我通过 ssh 访问服务器。一旦进入服务器我就可以curl http://localhost/test.html
我想在家里的网络浏览器上执行相同的操作,即以某种方式通过 ssh 重定向我的浏览器流量并访问 test.html,就像我在服务器上一样。
我尝试ssh -v -D 9090 user@xx.xx.xx.xx
过,在 Firefox 中通过 SOCKS v5 主机设置手动代理后:在 ip: 127.0.0.1 和端口 9090 上
我看到 ssh 调试中发生了一些事情,但看起来没有重定向到 80 服务器端口
我正在尝试从 amazonlinux (基于 Fedora)构建一个容器。
如果我构建映像并进入容器,则 yum 命令可以正常工作。但是,如果我将 yum 命令放入 Dockerfile 中,则不会。似乎无法联系存储库
Dockerfile
FROM amazonlinux
RUN yum update -y
Run Code Online (Sandbox Code Playgroud)
运行: sudo docker build 。
Sending build context to Docker daemon 3.072kB
Step 1/2 : FROM amazonlinux
---> df7d0b6ddeee
Step 2/2 : RUN yum update -y
---> Running in 14e4e4bad5b1
Loaded plugins: ovl, priorities
Run Code Online (Sandbox Code Playgroud)
结果尝试了几个https,最后:
...URLError: (28, 'Resolving timed out after 5516 milliseconds')
Trying other mirror...
The command '/bin/sh -c yum update -y' returned a non-zero code: 1
Run Code Online (Sandbox Code Playgroud) 我想复制我的虚拟机并将其放在负载平衡器后面。
Apache1 Apache2 ....ApacheN
| | |
-------------------------
LoadBalancer
Run Code Online (Sandbox Code Playgroud)
我只想为虚拟主机使用一个配置文件(实际上是一个包含在每个 httpd.conf 中的 conf 文件目录)、一个日志文件和一个用于所有实例的公共 DocumentRoot 目录。这可能吗,只是在虚拟机之间共享一些目录并相应地配置每个 Apache?
或者文件打开和写入会有一些冲突?
是否有更好的方法来维护具有相同配置的所有机器?
我能想到的另一件事是,它是一个复制主配置并重新启动所有 Apache 实例的脚本。还有一些脚本来合并所有日志......
欢迎任何建议。
更新:我认为在我的情况下性能不是问题,但是当我开始注意到日志损坏时,我停止从两个实例写入同一个日志文件。
[04/Oct/2014:17:10:34 +0200] "GET /index.html HTTP/1.0" 200 15082 22633
[04/Oct/2014:17:10:36 +0200] "GET /index.html HTTP/1.0" 200 15082 13[04/Oct/2014:17:10:38 +0200] "GET /index.html HTTP/1.0"[04/Oct/[04/Oct/2014:17:10:40 +0200] "GET /index.[04/Oct/2014:17:09:42[04/Oct/2014:17:10:42 +0200][04/Oct/2014:17:09:44 +0200] "GET /index.html HTTP/1.0" 200 15082
Run Code Online (Sandbox Code Playgroud) 我的数据库服务器(一个 CPU 虚拟机)由 Nagios 监控。
我没有使用 Nagios 的经验,也无法理解此图:
非常基本的疑问:我有一个应用程序在具有 2 个 vCPU 的 VM 上运行。两个 CPU 的平均负载略低于 50%。
这是否意味着 1 个 CPU 足以满足我的应用程序?或者更多的 CPU 受益于并行运行的线程?
编辑:这是一个来自我的系统的真实示例,它由 8 个 CPU 组成,超过一个月。数据归一化为 100%=8CPU。我想知道这些信息是否足以解决我的问题,基本上是系统过大。
我有以下 Dockerfile 应该启动 Centos 机器并安装 httpd:
FROM centos:centos6.6
RUN yum install -y httpd
RUN chkconfig httpd on;
RUN /etc/init.d/httpd start
EXPOSE 80
CMD ["/bin/bash"]
Run Code Online (Sandbox Code Playgroud)
我构建图像:
docker build --no-cache -t centos_http .
Run Code Online (Sandbox Code Playgroud)
构建说:
...
Step 4/6 : RUN /etc/init.d/httpd start
---> Running in 0766e84ec292
Starting httpd: httpd: Could not reliably determine the server's fully qualified domain name, using 172.17.0.2 for ServerName
[ OK ]
...
Successfully built 5380a0bacdfb
Run Code Online (Sandbox Code Playgroud)
但是如果我运行图像:
docker run -p 8090:80 -it 5380
[root@eda7400a46a9 /]# ps -ef | grep …
Run Code Online (Sandbox Code Playgroud) docker ×2
amazon-ami ×1
apache-2.2 ×1
centos ×1
cpu-usage ×1
httpd ×1
load-average ×1
ssh-tunnel ×1