我想在我的 debian 服务器上禁用 tcp-offloading ("TOE")。
ethtool -K .....
Run Code Online (Sandbox Code Playgroud)
不过我有一些愿望:
将它干净地集成到 debian
这写着:没有 rc.local,我也想避免伪 rc 脚本...
我猜,它正在安装 ethtool 并使用pre-up.d/ -Hook 使用/etc/network/interfaces 中的选项解除 TOE配置。
我想使用FAI以通用方式解除我所有(未来)服务器的配置。(因为 fai 已经到位 - 并且想要!)某些硬件不支持脚趾选项呢?如果禁用不存在的选项,网络会失败吗?我想不这样做应该是稳健的,但这似乎也不是我想要的解决方案。
它使配置非常混乱,因为 atm 有 11 个选项!使用多个 NIC 这对我来说很容易出错。
没有更通用的解决方案吗?我有一个 sysctl,但还没有找到。我的愿望是:
echo 0 > /proc/sys/net/core/enable_tcp_offloading
Run Code Online (Sandbox Code Playgroud)
PS:我很惊讶地发现我的“新硬件”默认启用了 TOE,因为这个:http : //www.linuxfoundation.org/collaborate/workgroups/networking/toe
是否可以在 Linux Debian 中记录所有尝试连接或连接到端口“5901”的 IP 地址?
我怎样才能做到这一点?
您可能知道,默认情况下,当您在基于 Debian 或 Ubuntu 的系统上安装软件包时,如果软件包包含服务,则通常会在您安装软件包时启用并自动启动该服务。
这对我来说是个问题。
我发现自己需要管理用于构建 LXC 容器的模板。有几个容器,每个容器对应一个 Debian 或 Ubuntu 版本。(也有基于 Red Hat 的容器,但它们在这里不相关。)
/var/lib/libvirt/filesystems/debian6_template
/var/lib/libvirt/filesystems/debian7_template
/var/lib/libvirt/filesystems/ubuntu1004_template
/var/lib/libvirt/filesystems/ubuntu1204_template
Run Code Online (Sandbox Code Playgroud)
偶尔我会发现模板缺少包或需要一些其他更改,因此我将 chroot 到它们以安装包。不幸的是,当我这样做时,我最终会运行该软件包的服务的多个副本!
例如,我发现模板没有 syslog 守护进程,所以我安装了一个:
for template in /var/lib/libvirt/filesystems/{debian,ubuntu}*_template; do
chroot $template apt-get install rsyslog
done
Run Code Online (Sandbox Code Playgroud)
并迅速结束了运行的 rsyslog 的四个副本。更不用说exim4的两个副本了。哎呀!
我在某处读到(虽然我现在找不到了)它不应该在 chroot 中运行时启动服务,但这显然不会在这里发生。
一个潜在可行的讨厌的 hack要求临时替换实际启动服务的各种命令,例如start-stop-daemon和initctl,尽管这比我真正想做的工作要多得多。如果我别无选择,虽然...
这里的理想解决方案是让基于 Debian 的系统停止做这种废话,但如果失败,可能是apt-get?
如果不清楚,如果可能的话,我真的希望在模板之外保留与管理模板相关的任何内容。
我希望有人可以帮助我解决这个奇怪的问题。
我想我知道它为什么会发生,但我不知道如何解决它。也许是因为 BIOS 时间设置不正确或类似的原因。但我不想更改大约 400 多台服务器的 BIOS 时间。(或更换BIOS电池)
root@spool:~# echo TEST > /dev/kmsg
root@spool:~# dmesg -T | tail -1
[Mon Feb 17 04:57:03 2014] TEST
root@spool:~# date
Mon Feb 17 11:45:17 CET 2014
Run Code Online (Sandbox Code Playgroud)
服务器正在运行 ntp 以进行时间同步。
这里有人知道如何在操作系统中解决这个问题吗?
Linux spool 3.2.0-4-amd64 #1 SMP Debian 3.2.46-1+deb7u1 x86_64 GNU/Linux
Run Code Online (Sandbox Code Playgroud)
为什么在回显到/dev/kmsg时,我的消息的日期/时间dmesg与系统日期/时间不同步?
我最近检查了我们的 redis 进程之一,以使用以下方式应用的 ulimits:
cat /proc/<redis-pid>/limits
并且惊讶地发现它处于低默认值:
Limit Soft Limit Hard Limit
Max open files 4016 4016
Run Code Online (Sandbox Code Playgroud)
我很惊讶,因为我们配置了以下内容:
# /etc/sysctl.conf
fs.file-max = 100000
Run Code Online (Sandbox Code Playgroud)
.
# /etc/security/limits.conf
* soft nofile 100000
* hard nofile 100000
Run Code Online (Sandbox Code Playgroud)
.
# /etc/ssh/sshd_config
UsePAM yes
Run Code Online (Sandbox Code Playgroud)
.
# /etc/pam.d/sshd
session required pam_limits.so
Run Code Online (Sandbox Code Playgroud)
谁能告诉我为什么增加的 ulimit 没有应用于正在运行的 redis 进程?
redis 进程以用户“redis”的身份运行,由于限制增加,服务器已重新启动。我们在 Debian Squeeze 上。
我有一台运行 Debian 和 sshd 的服务器,如果我需要重新启动服务器,我的 SSH 会话会在客户端挂起,直到 TCP 超时。我认为这是因为在sshd终止时它没有明确关闭与主机的打开的 SSH 会话。我应该怎么做才能让sshd所有人先断开连接,然后正常终止?到目前为止,我没有看到man sshd_config与关闭行为相关的参数。
我已经设置了一对具有 RAID 阵列(8 核、16GB RAM、12x2 TB RAID6)、3 个 10GigE 接口的相同服务器,以托管一些高可用性服务。
这些系统目前运行的是 Debian 7.9 Wheezy oldstable(因为 corosync/pacemaker 在 8.x stable 和 testing 上均不可用)。
但是,无论我如何配置 DRBD,吞吐量都限制在 100MB/s。它看起来真的像一些硬编码限制。我可以通过调整设置来可靠地降低性能,但它永远不会超过 1Gbit(一次达到 122MB/s 几秒钟)。我真的很喜欢这个。
配置分为两个文件global-common.conf::
global {
usage-count no;
}
common {
handlers {
}
startup {
}
disk {
on-io-error detach;
# no-disk-flushes ;
}
net {
max-epoch-size 8192;
max-buffers 8192;
sndbuf-size 2097152;
}
syncer …Run Code Online (Sandbox Code Playgroud) 我们有一个私有的 debian 存储库,它是由早期的系统管理员在几年前建立的。软件包由旧密钥 7610DDDE(我必须撤销)签名,如 repo 服务器上的 root 用户所示。
# gpg --list-keys
/root/.gnupg/pubring.gpg
------------------------
pub 1024D/2D230C5F 2006-01-03 [expired: 2007-02-07]
uid Debian Archive Automatic Signing Key (2006) <ftpmaster@debian.org>
pub 1024D/7610DDDE 2006-03-03 [revoked: 2016-03-31]
uid Archive Maintainer <root@xxxxxxxxxx.com>
pub 4096R/DD219672 2016-04-18
uid Archive Maintainer <root@xxxxxxxxxx.com>
Run Code Online (Sandbox Code Playgroud)
以下所有命令均以 root 用户身份执行。我修改了 repository/conf/distributions 文件以使用我明确创建的新子密钥进行签名:
Architectures: i386 amd64 source
Codename: unstable
Components: main
...
SignWith: DD219672
Run Code Online (Sandbox Code Playgroud)
但是当我使用 dput 更新包时,我得到
Could not find any key matching 'DD219672'!
ERROR: Could not finish exporting 'unstable'!
This means that from outside your …Run Code Online (Sandbox Code Playgroud) 许多教程告诉您像这样配置 ssh 服务器:
ChallengeResponseAuthentication no
PasswordAuthentication no
UsePAM no
Run Code Online (Sandbox Code Playgroud)
但是使用此设置,您无法使用 PAM,因为我计划将 2 Factor Auth 与 Google Authenticator(OTP 一次性密码)一起使用,我需要 PAM。
那么如何配置一个新的 debian jessie ssh 守护进程,如果我想阻止使用普通密码登录但仍然允许使用 PAM。
也许确切的问题是如何配置 pam 以禁止密码?
PAM 身份验证的详细信息
禁用基于 PAM 的密码身份验证相当不直观。几乎所有 GNU/Linux 发行版(Slackware 除外)以及 FreeBSD 都需要它。如果您不小心,您可以将 PasswordAuthentication 设置为“no”,并且仍然通过 PAM 身份验证仅使用密码登录。事实证明,您需要将“ChallengeResponseAuthentication”设置为“no”才能真正禁用 PAM 身份验证。FreeBSD 手册页有这样的说法,这可能有助于澄清情况:
请注意,如果 ChallengeResponseAuthentication 为“yes”,并且 sshd 的 PAM 身份验证策略包括 pam_unix(8),则无论 PasswordAuthentication 的值如何,都将允许通过质询-响应机制进行密码身份验证。
http://www.unixlore.net/articles/five-minutes-to-more-secure-ssh.html
我在 Debian Wheezy 上有一台旧的测试机器,我现在无法真正更新。
Debian Wheezy 存储库已于 2 月归档。所以我想提前,并更新我/etc/apt/sources.list的
deb http://ftp.fr.debian.org/debian wheezy main
deb http://security.debian.org/ wheezy/updates main
deb http://ftp.fr.debian.org/debian wheezy-updates main
Run Code Online (Sandbox Code Playgroud)
到
deb http://archive.debian.org/debian wheezy main
deb http://security.debian.org/ wheezy/updates main
deb http://archive.debian.org/debian wheezy-updates main
Run Code Online (Sandbox Code Playgroud)
但是,在运行时apt-get update,我收到此错误:
# apt-get update
<snip>
Err http://archive.debian.org wheezy-updates/main i386 Packages
404 Not Found [IP : 193.62.202.28 80]
Run Code Online (Sandbox Code Playgroud)
其他存储库正在更新,没有问题。
我错过了什么吗?