标签: debian-wheezy

突然找不到关机命令了

我登录到我的 Debian 7 服务器,使用 apt 进行了升级,并想像shutdown -r now我以前做过很多次那样关闭+重新启动。这一次再也找不到shutdown命令了。我已经在某处读到我可以用整个路径尝试它/sbin/shutdown,但是程序也不在那里。我也找不到任何地方的重启命令。

什么地方出了错?我该怎么做才能恢复关机命令?

debian debian-wheezy shutdown

10
推荐指数
2
解决办法
3万
查看次数

Debian - “警告:将安装以下软件包的不受信任版本!”

当我尝试安装或更新任何软件包时,我得到:

Untrusted packages could compromise your system's security. You should only proceed with the installation if you are certain that this is what you want to do.

我强烈怀疑这与我在更新时遇到的错误有关:

$ sudo aptitude update
Get: 1 http://ftp.us.debian.org wheezy InRelease [208 kB]
Get: 2 http://debian.lcs.mit.edu wheezy InRelease [208 kB]
Ign http://ftp.us.debian.org wheezy InRelease
Hit http://ftp.us.debian.org wheezy/main amd64 Packages/DiffIndex
Hit http://ftp.us.debian.org wheezy/contrib amd64 Packages/DiffIndex
Hit http://ftp.us.debian.org wheezy/non-free amd64 Packages/DiffIndex
Hit http://ftp.us.debian.org wheezy/contrib Translation-en
Hit http://ftp.us.debian.org wheezy/main Translation-en
Hit http://ftp.us.debian.org wheezy/non-free Translation-en
Get: 3 http://debian.lcs.mit.edu …
Run Code Online (Sandbox Code Playgroud)

gpg aptitude apt debian-wheezy

9
推荐指数
1
解决办法
6027
查看次数

重启 debian box 后忽略 sysctl.conf 值

sysctl 重新定义值的正确位置在哪里?

我有:

> uname -a
Linux note 3.1.0-1-amd64 #1 SMP Tue Jan 10 05:01:58 UTC 2012 x86_64 GNU/Linux

> cat /etc/debian_version 
wheezy/sid


> tail -n 2 /etc/sysctl.conf   
#
net.ipv6.bindv6only=0
Run Code Online (Sandbox Code Playgroud)

但是每次重启后 net.ipv6.bindv6only 还是 1

linux debian sysctl debian-wheezy

8
推荐指数
3
解决办法
2万
查看次数

Apache 上的连接被拒绝 HTTPS

我目前正在我的一个网站上试用 HTTPS,并且我从受信任的 CA 获得了试用证书。我已经完成了以下清单:

  • 根据 CA 的说明复制所有证书文件
  • 在 apache 上启用 mod_ssl a2enmod ssl
  • 检查 PHP 已启用 OpenSSL
  • 在 Apache 中创建一个新的虚拟主机监听 443
  • 输入 SSL 指令:

    SSLEngine on

    SSLCertificateKeyFile /etc/ssl/ssl.key/server.key

    SSLCertificateFile /etc/ssl/ssl.crt/api_my_site_com.crt

    SSLCertificateChainFile /etc/ssl/ssl.crt/apimysite.com-bundle

  • 仅检查 apache 正在侦听端口 443 lsof

  • 如果我可以连接到 443(连接到服务器的 IP,而不是域;尝试连接到 my-site.com:443 让我连接失败),请使用 telnet 在本地和我自己的 PC 上检查

但是,当我尝试浏览https://my-site.com(显然不是真正的域)时,出现“连接被拒绝”错误。这是Apache记录的内容:

[Sat Jul 20 22:50:34 2013] [info] Loading certificate & private key of SSL-aware server
[Sat Jul 20 22:50:34 2013] [info] Configuring server for SSL protocol
[Sat Jul 20 22:50:34 2013] [info] …
Run Code Online (Sandbox Code Playgroud)

ssl php5 apache-2.2 debian-wheezy

8
推荐指数
2
解决办法
9万
查看次数

添加 CPU 会降低 MySQL 5.5 (Debian) 的性能

我即将在 OpenVZ 容器中设置一个数据库服务器 (MySQL),我一直想知道应该为它分配多少 CPU。我决定对其进行基准测试。我比较了两个 OS/MySQL 发行版,并测试了它们在 1、2、3 和 4 个 CPU 上的表现。

第一个软件配置是:

  • CentOS 6.5 版(最终版)
  • mysql Ver 14.14 Distrib 5.1.71, for redhat-linux-gnu (x86_64) using readline 5.1

第二:

  • Debian GNU/Linux 7 \n \l
  • mysql Ver 14.14 Distrib 5.5.31,用于 debian-linux-gnu (x86_64) 使用 readline 6.2

两者都在同一内核上运行 - 2.6.32-openvz-042stab083.2-amd64 #1 SMP Fri Nov 8 17:59:25 MSK 2013 x86_64 GNU/Linux。

所有软件都是从软件包中安装的,开箱即用,无需任何自定义配置调整。

硬件:6GB RAM,1-4 个 CPU 3.5 GHz。

对于基准测试,我在以下场景中使用了 sysbench:

sysbench --test=oltp --oltp-table-size=1000000 --mysql-db=test --mysql-user=root --db-driver=mysql --mysql-password=d prepare
sysbench --test=oltp --oltp-table-size=1000000 --mysql-db=test --mysql-user=root --db-driver=mysql …
Run Code Online (Sandbox Code Playgroud)

mysql performance debian-wheezy benchmark

8
推荐指数
1
解决办法
679
查看次数

“500 OOPS:vsftpd:拒绝在 chroot() 内使用可写根运行” - 在 Debian 上登录失败

我安装了 vsFTPd 以在Debian 7.3 (Wheezy)上运行 FTP 服务器。我检查了 vsFTPd 版本是2.3.5,我像这样配置它:

listen=YES
local_enable=YES
write_enable=YES
chroot_local_user=YES
pasv_min_port=15000
pasv_max_port=15200
allow_writeable_chroot=YES
Run Code Online (Sandbox Code Playgroud)

我按照这些文章来解决这个问题:

和谷歌和论坛上的许多其他人一样,但我的问题没有解决。

注意:我已经在Ubuntu 12.04(精确穿山甲)上解决了这个问题,但该解决方案在 Debian 7.3 上不起作用。

我真的搞混了?!

linux ftp chroot debian-wheezy vsftpd

8
推荐指数
1
解决办法
2万
查看次数

为什么 ZFS 不对我的磁盘的 duff 扇区做任何事情?

我的印象是,如果在从 ZFS 池读取期间发生 I/O 错误,则会发生两件事:

  1. 故障将记录在相关设备的 READ 或 CKSUM 统计信息中,向上传播到池级别。
    • 冗余数据将用于重建请求的块,将请求的块返回给调用者,如果 duff 驱动器仍然可用,则将块重写到它,或者
    • 如果冗余数据不可用于纠正读取错误,则将返回 I/O 错误。

我的镜像设置中的一个磁盘似乎出现了坏扇区。这本身并不令人担忧;这样的事情发生了,这就是为什么我有冗余(准确地说是双向镜像)。每次我清理池或读取特定目录中的文件时(我还没有费心确定哪个文件有问题),dmesg 中会弹出以下内容,显然具有不同的时间戳:

Nov  1 09:54:26 yeono kernel: [302621.236549] ata6.00: exception Emask 0x0 SAct 0x9c10 SErr 0x0 action 0x0
Nov  1 09:54:26 yeono kernel: [302621.236557] ata6.00: irq_stat 0x40000008
Nov  1 09:54:26 yeono kernel: [302621.236566] ata6.00: failed command: READ FPDMA QUEUED
Nov  1 09:54:26 yeono kernel: [302621.236578] ata6.00: cmd 60/a8:78:18:5a:12/00:00:5c:01:00/40 tag 15 ncq 86016 in
Nov  1 09:54:26 yeono kernel: [302621.236580]          res 41/40:a8:18:5a:12/00:00:5c:01:00/00 Emask 0x409 …
Run Code Online (Sandbox Code Playgroud)

zfs debian-wheezy zfsonlinux

8
推荐指数
1
解决办法
600
查看次数

自动安装 Debian Backports 内核

我有以下固定设置:

Package: linux-image-amd64
Pin: release a=wheezy-backports
Pin-Priority: 1001

Package: *
Pin: release a=wheezy-backports
Pin-Priority: 499
Run Code Online (Sandbox Code Playgroud)

我收到以下错误:

$ sudo apt-get install linux-image-amd64
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation: …
Run Code Online (Sandbox Code Playgroud)

package-management debian apt pinning debian-wheezy

8
推荐指数
2
解决办法
8359
查看次数

从 jessie 存储库中断更新后如何修复 Debian Wheezy 上的语言环境

我尝试使用 Debian Wheezy 在我的 VDS 上安装 nodejs 和 npm 包。但不是为了编译源代码,而且由于懒惰,我在 Internet 上找到了包含 jessie 源代码并从中安装的说明。

安装没有完成,我什至没有在我的系统中获得 nodejs 和 npm。但是现在我的语言环境设置中有这个问题:

# locale
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=ru_RU.UTF-8
....
Run Code Online (Sandbox Code Playgroud)

我从源列表中删除了 jessie souce。然后更新和升级系统。当我尝试重新安装语言环境时,我收到此错误,因此 jessie 的一些tailes 仍然存在:

# apt-get install --reinstall locales
Reading package lists... Done
Building dependency tree       
Reading state information... Done …
Run Code Online (Sandbox Code Playgroud)

localization dependencies debian-wheezy

7
推荐指数
2
解决办法
9098
查看次数

rsync 在一段时间后意外终止

我在 ssh 会话中运行一个rsync命令nohup,但过了一会儿它返回这个错误:

rsync error: received SIGINT, SIGTERM, or SIGHUP (code 20) at rsync.c(549) [generator=3.0.9]
rsync error: received SIGINT, SIGTERM, or SIGHUP (code 20) at rsync.c(549) [receiver=3.0.9]
Run Code Online (Sandbox Code Playgroud)

我没有自己杀死这个进程,我认为没有任何其他进程可以杀死这个进程。我也用nohup. 我使用nohup是因为 ssh 会话因任何原因终止,rsync进程不会终止。

什么导致终止?

操作系统是 Debian Wheezy。

debian ssh rsync nohup debian-wheezy

7
推荐指数
1
解决办法
3393
查看次数