由于手册页没有回答我的问题,而且我不想强制循环,所以我决定在这里提出这个问题。
logrotate 的手册页给出了以下示例:
"/var/log/httpd/access.log" /var/log/httpd/error.log {
rotate 5
mail www@my.org
size 100k
sharedscripts
postrotate
/usr/bin/killall -HUP httpd
endscript
}
Run Code Online (Sandbox Code Playgroud)
所有带有通配符的示例都只包含一个条目。现在,我感兴趣的是是否也允许这样做:
/var/log/httpd/*.log /var/log/httpd/*/*.log {
# ... same as above
}
Run Code Online (Sandbox Code Playgroud)
原因如下:我有多个虚拟主机,我将它们拆分为“拥有”这些虚拟主机的用户。由于日志文件是世界可读的,我想将一个文件夹绑定挂载到用户主目录中,但将其限制为用户“拥有”的日志文件,这是通过将日志分离到文件夹中最容易实现的(并绑定- 无论如何安装都需要该方案)。因此,我正在寻找一种解决方案来轮换该目录下的日志文件/var/log/httpd以及该目录的子目录下的所有日志文件 -无需按名称列出每个子目录。
一般来说,手册页不提供通配符规则是否可能有多个条目或仅用于完整路径的线索。我正在使用 Debian“Squeeze”附带的 logrotate 版本 3.7.8-6,但我认为这不一定特定于发行版或程序版本。
Dreamhost 似乎认为我们喜欢 PDT,尽管位于中西部。如何更改时区?
我正在尝试在 Debian Squeeze 上安装 VMWare 工具。
我的错误:
Before you can compile modules, you need to have the following installed...
make
gcc
kernel headers of the running kernel
Searching for GCC...
The path "/usr/bin/gcc" is not valid path to the gcc binary.
Would you like to change it? [yes]
Run Code Online (Sandbox Code Playgroud)
用户名 -a:
Linux debian 2.6.32-5-686 #1 SMP Sat Sep 18 02:14:45 UTC 2010 i686 GNU/Linux
Run Code Online (Sandbox Code Playgroud)
dpkg -l | 制作
ii make 3.81-8 An utility for Directing compilation.
Run Code Online (Sandbox Code Playgroud)
dpkg -l | grep gcc …
我试图在 Debian 中创建一个 USB 引导程序来安装我的新系统。我在 Debian 中找不到任何易于使用的工具。我尝试从 Debian 站点下载混合 ISO 映像,并使用Debian 站点中所述的dd 命令将其复制到 USB ,但它没有启动。
接下来,我在 Ubuntu 中使用了 Startup Disk Creator 工具,它的工作非常出色。Debian 中是否有类似的工具?我知道有 Unetbootin,但是安装起来很困难。
我使用 Windows 7 作为主机操作系统。我在带有 lighttpd 的 VirtualBox 上安装了 Debian 6.0.4。
我可以通过http://localhost在浏览器地址面板中键入我的机器轻松访问 Web 服务器,但是我网络中的其他计算机无法通过键入我的 IP 地址来访问它。
我在 VirtualBox 中使用 NAT 端口转发。我应该怎么做才能使我的网络服务器对我的网络上的每个人都可用?
编辑:
我找到了一个“解决方案”——我必须将访客端口和主机端口设置为不同的端口。但是我仍然有这个问题,即:
服务器在端口 8080 上启动。
Port forwarding : guest port 8080
host port 80
Run Code Online (Sandbox Code Playgroud)
我可以从我的机器上访问服务器
但是我只能通过网络上的其他机器访问服务器 IP:8080
我有一个 4GB 的 U 盘,我sudo cfdisk /dev/sdb使用sudo mkfs /dev/sdb1. 当我在 Debian Squeeze 上运行时,它当前设置为 ID 83with System 。Linuxsudo fdisk -l
我pmount用来挂载外部 USB 驱动器。所以做一个pmount /dev/sdb1挂载它,/media/usb0因为我有ff。线路输入/etc/fstab:
/dev/sdb1 /media/usb0 auto rw,user,noauto 0 0
Run Code Online (Sandbox Code Playgroud)
发出pmount命令后,USB 被挂载到/media/usb0-- 做一个ls -l /media/usb0给我:
drwx------ 2 root root 16384 Mar 2 20:08 lost+found
Run Code Online (Sandbox Code Playgroud)
所以我开始我的业务并尝试将文件复制到,/media/usb0但我收到以下错误:
$ cp ~/foo.bar /media/usb0
cp: cannot create regular file `/media/usb0/foo.bar': Permission denied
Run Code Online (Sandbox Code Playgroud)
但是当我用 …
我写了一个简单的测试程序来测量 syslog 功能的性能。这是我的测试系统的结果:(Debian 6.0.2 with Linux 2.6.32-5-amd64)
测试用例调用有效负载持续时间思想
[] [MB] [s] [MB/s]
------------- ---------- ---------- ---------- ----------
系统日志 200000 10.00 7.81 1.28
系统日志 %s 200000 10.00 9.94 1.01
写/dev/null 200000 10.00 0.03 343.93
printf %s 200000 10.00 0.13 76.29
测试程序进行了 200000 次系统调用,每次调用时写入 50 字节的数据。
为什么 Syslog 比文件 IO 慢十倍以上?
这是我用来执行测试的程序:
#include <fcntl.h>
#include <stdio.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <sys/types.h>
#include <syslog.h>
#include <unistd.h>
const int iter = 200000;
const char msg[] = "123456789 123456789 123456789 123456789 123456789"; …Run Code Online (Sandbox Code Playgroud) 我正在运行 Debian Squeeze (x64):
# uname -srvmo
Linux 2.6.32-5-amd64 #1 SMP Mon Jan 16 16:22:28 UTC 2012 x86_64 GNU/Linux
Run Code Online (Sandbox Code Playgroud)
我的G31M-S 主板中有 2 个兼容的 2 GB DDR2 棒。它支持高达 8GB:

由于这是一个服务器,我并不真正关心图形。所以我把它调到最低。
Internal Graphics Mode Select: Auto
Enabled, 1MB <--
Enabled, 8MB
DVMT Mode Select: Fixed Mode <--
Auto
DVMT/FIXED Memory: 128MB <--
256MB
Run Code Online (Sandbox Code Playgroud)

但是,Linux 仅检测到 3.19GiB 的内存:
# cat /proc/meminfo
MemTotal: 3350712 kB
...
Run Code Online (Sandbox Code Playgroud)
看E820图:
[ 0.000000] BIOS-provided physical RAM map:
[ 0.000000] BIOS-e820: 0000000000000000 - 000000000009f800 (usable) …Run Code Online (Sandbox Code Playgroud) 如何在我的 Debian 安装中安装 KDE?我有一个 Debian Squeeze 6.0.7,它是从 DVD 安装的。我想将kde-full软件包安装到其中。
如何在当前安装中安装 KDE?
我现在的状态是:
Debian Squeeze 6.0.7
更新sources.list以包含 Wheezy main,适用于新内核版本 3.2
更新到 Wheezy 内核
64 位机器,带有 64 位 Debian
我应该如何获得一个良好的 KDE 桌面?
我正在尝试在 Debian6 64 位中运行传感器检测,我得到:对不起,没有检测到传感器。您的系统没有传感器,或者它们不受支持,或者它们连接到不受支持的 I2C 或 SMBus 适配器。
传感器小程序以及传感器 cpu 正确运行
root@debian:/# dmesg | grep -i error
[ 0.558964] ACPI Error (psargs-0359): [RAMB] Namespace lookup failure, AE_NOT_FOUND
[ 7.537292] PM: Error -22 checking image file
[ 9.581500] nouveau: probe of 0000:01:00.0 failed with error -22
root@debian:/# lspci
00:00.0 Host bridge: Intel Corporation Sandy Bridge DRAM Controller (rev 09)
00:01.0 PCI bridge: Intel Corporation Sandy Bridge PCI Express Root Port (rev 09)
00:02.0 Display controller: Intel Corporation Sandy Bridge Integrated Graphics …Run Code Online (Sandbox Code Playgroud)