Articles of Debian

与Debian分享互联网连接

这是我在“服务器”上的当前/ etc / network / interfaces文件: auto lo iface lo inet loopback auto eth0 iface eth0 inet dhcp name Wired Network auto ath0 iface ath0 inet static name Wireless Network address 10.1.1.1 netmask 255.255.255.0 broadcast 10.1.1.255 wireless-channel 1 wireless-essid MYNETWORKNAME madwifi-base wifi0 madwifi-mode Master eth0(有线连接)在服务器上正常工作,我可以ping google.com为例。 /etc/resolv.conf具有正确的名称服务器。 ath0(无线连接)也正常工作,客户端可以通过SSH连接到服务器,例如:[email protected] 目前客户configuration为: 连接到ESSID:MYNETWORKNAME 静态IP:10.1.1。[2-254] 子网:255.255.255.0 我现在想要的是客户端连接到MYNETWORKNAME并有互联网接入。 我加载接口文件:/etc/init.d/networking [重启|开始|停止](没有networkingpipe理器,wicd等) […]

试图降低apache 2进程的数量

我在Debian 6 LAMP与Apache mpm_prefork 我有 Timeout 20 KeepAlive On MaxKeepAliveRequests 80 KeepAliveTimeout 2 <IfModule mpm_prefork_module> StartServers 5 MinSpareServers 5 MaxSpareServers 10 ServerLimit 500 MaxClients 500 MaxRequestsPerChild 1500 </IfModule> 与4GB的RAM。 问题是Apache2启动了太多的进程。 每当我做top我看到大部分时间只有1运行,而睡眠的apache2进程数随着时间增长(现在在437个进程和计数) 我可以知道为什么apache2启动新的进程,而不是使用已打开的? 我怎么能告诉Apache不要打开这么多的过程? 谢谢

git安装后的语言环境问题

前几天我试图在我的Debian系统上安装git。 instalation中止,从这一刻起,我每次得到一个locale错误,我尝试通过apt -…安装/ apt-get remove git Reading package lists… Done Building dependency tree Reading state information… Done The following packages will be REMOVED: git 0 upgraded, 0 newly installed, 1 to remove and 75 not upgraded. 18 not fully installed or removed. After this operation, 0B of additional disk space will be used. Do you […]

升级到Squeeze后,networking访问问题

我计划推出几个(~100)Guruplug显示机器。 他们随同Lenny装运。 我把所有东西都升级到了Squeeze,但是因为我在每个非root用户上都收到套接字错误。 Mar 26 20:31:50 localhost ntpd[1055]: ./../lib/isc/unix/ifiter_ioctl.c:348: unexpected error: Mar 26 20:31:50 localhost ntpd[1055]: making interface scan socket: Permission denied Mar 26 20:35:09 localhost ntpd[1055]: ntpd exiting on signal 15 yeri@gplugD ~ $ ping google.be ping: unknown host google.be yeri@gplugD ~ $ ping 85.12.6.171 socket: Permission denied yeri@gplugD ~ $ ssh localhost socket: […]

raid1降级数组事件

我是新来的raid,并且在一个月前用两个SATA磁盘build立了一个软件RAID1。 我没有检查状态,但通过拔下其中一个驱动器并validation系统正常工作进行testing。 今天,我在terminal上看到一个关于raid失败的邮件。 主题:/ dev / md / 1上的DegradedArray事件:ws 看着/ var / mail,我从几个月前就看到了类似的消息,这是我从来没有注意到的。 驱动器是相当新的,我期望在我的configuration中的问题。 我在某个地方看到,下面的状态下面的下划线表示移除的驱动器,但是单个arrays的状态没有显示任何失败的状态。 什么可能导致这个? cat /proc/mdstat Personalities : [raid1] md1 : active raid1 sda6[0] 471572344 blocks super 1.2 [2/1] [U_] md0 : active raid1 sda1[0] 975860 blocks super 1.2 [2/1] [U_] unused devices: <none> mdadm -D /dev/md0 /dev/md0: Version : 1.2 Creation Time […]

确认! 升级Debian从Lenny到Squeeze杀死了PHP!

今天我做了从Lenny到Squeeze的远程升级(我之前在很多其他服务器上完成了这个工作,没有太多麻烦),除了PHP以外,大多数情况似乎都可以工作。 使用PHP的站点只显示PHP文件,而不是生成服务器的服务器。 据我所知,根据错误日志,Apache服务器实际上是用PHP正常运行的,但是它只是performance得好像根本没有运行。 我遇到的一个奇怪的问题是,/etc/asterisk/mods-enabled/php5.conf似乎是指一个不存在的文件; 即mod_php.c。 这听起来不像是一个编译模块,同时,系统上不存在mod_php.c和mod_php.so,尽pipeDebian dpkg系统似乎是这样认为的。 这里是php5.conf的内容: <IfModule mod_php5.c> <FilesMatch "\.ph(p3?|tml)$"> SetHandler application/x-httpd-php </FilesMatch> <FilesMatch "\.phps$"> SetHandler application/x-httpd-php-source </FilesMatch> # To re-enable php in user directories comment the following lines # (from <IfModule …> to </IfModule>.) Do NOT set it to On as it # prevents .htaccess files from disabling it. <IfModule mod_userdir.c> <Directory […]

Java似乎没有使用两个以上的cpus

在我目前的设置(debian squeeze x64,6 cpu)中,java和apache似乎都不能充分利用服务器的潜力。 慕尼黑监测显示,CPU使用率从未超过200%。 我们运行了几次压力testing,将服务器负载提高到了80,但是CPU使用率一直很低。 有任何想法吗?

每周发送电子邮件,包括使用/免费使用的硬盘空间分类

我想要一个bash脚本,向我发送每周一次的电子邮件,显示基于文件列表数组使用的磁盘空间使用情况。 这可能使用df -h 看看谷歌find任何我可以使用,没有太多运气。

VPS – 开始发送电子邮件的最简单的方法

我在VPS上安装了(clean)Debian 6,并且正在运行一个支持Django的应用程序。 一切工作正常,除了我需要设置SMTP,使我的应用程序(即发件人是本地)发送电子邮件给其用户(所以,收件人在互联网上的其他地方)。 最简单的方法是什么? Debian通常带有exim4 ,但是我有问题设置它来执行这个基本的任务。 有什么样的教程,或者我需要检查的一系列基本步骤? 我现在不需要任何本地电子邮件传送。 当我尝试使用默认configuration发送电子邮件时,以下是我在/var/log/exim/mainlog (用foo.com和bar.comreplace了两个域): 2011-08-27 18:05:27 1QxLNv-0008EL-60 <= [email protected] H=localhost (foo.com) [127.0.0.1] P=esmtp S=2438 2011-08-27 18:05:27 1QxLNv-0008EL-60 remote host address is the local host: bar.com 2011-08-27 18:05:27 1QxLNv-0008EL-60 == [email protected] R=smarthost defer (-1): remote host address is the local host 2011-08-27 18:05:27 1QxLNv-0008EN-7y <= <> R=1QxLNv-0008EL-60 U=Debian-exim P=local S=567 […]

Fail2ban自定义端口

我有一个这样的规则在我的jail.local文件中: [ssh-ddos] enabled = true port = ssh,sftp filter = sshd-ddos logpath = /var/log/messages maxretry = 4 如果我想使用SSH的自定义端口,Fail2ban会自动从我的sshd_config文件中推断出它,还是应该用数字指定端口?