Articles of Debian

虚拟服务器不工作,如果我使用www而不是只是域

我有两个域名 Domain1使用IP1 ,而Domain2使用IP2 ,但它们都指向相同的VPS。 如果我去domain1.com ,我得到它的工作,但是去www.domain1.com卡在加载屏幕上,最终说Oops! Google Chrome could not find www.domain1.com! Oops! Google Chrome could not find www.domain1.com! 。 它在Firefox和IE中也是如此。 当它加载时,它说在我的屏幕底部的Resolving Host (在Firefox中,它说Looking Up www.Domain1.com )。 我遵循这个教程的信。 基本上: 1)制作一个public_html目录 2)运行chmod给755 perms 3)创build一个索引文件 4)运行命令cp /etc/apache2/sites-available/default /etc/apache2/sites-available/domain1.com 5)使用nano编辑所述文件 6)制作这个文件: <VirtualHost *:80> ServerAdmin [email protected] ServerName domain1.com ServerAlias www.domain1.com DocumentRoot /var/www/domain1.com/public_html </VirtualHost> 7)运行a2ensite domain1.com 8)重新启动apache

如何自动清除“dpkg -l |”报告的过去的pkgsconfiguration文件 grep ^ rc“

有很多pkgs没有被“apt-get purge”删除,我想自动清理它们。 你不能apt-get purge apache2.2-common因为pkg已经被删除了。 您仍然可以使用dpkg -L apache2.2-common列出pkg中的文件。 这意味着我可以删除pkg中的文件列表,但dpkg如何知道这一点? 如何删除留下的configuration文件并将其从以下报告中删除? 示例输出: $ dpkg -l | grep ^rc rc apache2.2-common 2.2.14-5ubuntu8.10 Apache HTTP Server common files rc libapache2-mod-php5filter 5.3.10-1ubuntu2ppa6~lucid server-side, HTML-embedded scripting languag rc libapr1 1.3.8-1ubuntu0.3 The Apache Portable Runtime Library rc libaprutil1 1.3.9+dfsg-3ubuntu0.10.04.1 The Apache Portable Runtime Utility Library rc libgd2-xpm 2.0.36~rc1~dfsg-3.1ubuntu1 GD Graphics Library […]

获取IPMI SMB(I2C SMBus SSIF)在内核3.2上工作

我有一台旧服务器,我试图让IPMI工作。 服务器主板是SE7520JR2 ( SE7520JR22S, SE7520JR22.86B.P.08.10.0081.051820051126 ) $ dmidecode -t 38 # dmidecode 2.11 SMBIOS 2.3 present. Handle 0x0038, DMI type 38, 18 bytes IPMI Device Information Interface Type: SSIF (SMBus System Interface) Specification Version: 1.5 I2C Slave Address: 0x10 NV Storage Device: Not Present Base Address: 0x42 (SMBus) 我已经通过I2C端口工作 $ modprobe i2c-i801 $ modprobe i2c-dev […]

Debian,Apache和conf-enabled

如果启用configuration的configuration包含Alias指令和目录段,VHost会将这些指令应用到启用了站点的所有站点还是默认(第一个)站点?

Debian 7上的IPv6连接正在下降

编辑 :我尝试了一些不同的基础上search。 这是现在我的/etc/network/interfaces : # This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). # The loopback network interface auto lo iface lo inet loopback # This line makes sure the interface will be brought up during boot auto eth0 allow-hotplug eth0 # […]

分区大小不匹配文件

我有一个Debian Wheezy安装,当前显示100%的磁盘使用率,但在/中的文件似乎没有加起来的df -h输出中报告的磁盘的总和(用du -sh /testing) 。 我已经重新启动,所以这将清除任何可能已被删除,但仍然保持打开的打开的文件。 安装输出: /dev/disk/by-uuid/blahblah-3431-43i9-ac71-blahlah on / type ext4 (rw,relatime,errors=remount-ro,user_xattr,barrier=1,data=ordered) df -h的输出: rootfs 36G 33G 810M 98% / /dev/disk/by-uuid/blahblah-3431-43i9-ac71-blahlah 36G 33G 825M 98% / 输出du -sh /(不包括介质,因为目录已经从其他驱动器安装目录): # du -sh –exclude=media * 7.4M bin 18M boot 0 dev 11M etc 13G home 0 initrd.img 116M lib 4.0K lib64 16K lost+found 4.0K […]

运行第二个mysqld实例进行备份还原

我正在尝试启动第二个mysqld实例来从备份中恢复数据(innoDB)。 按照手册我把这个: P="/var/lib/reoback/backups/2014-06-30/var/lib/mysql" cd $P mkdir tmp touch mysql.log chown -R mysql:mysql . # mysqld v5.0 mysqld –console –port=3399 –socket=/var/run/mysqld/mysqld.sock –datadir=$P / –pid-file=$P/mysqld.pid –log=$P/mysql.log –log-bin=$P/bin.log / –log-error=$P/error.log –tmpdir=$P/tmp –innodb_force_recovery=6 并最终崩溃我的运行实例。 问题是:如何使用备份文件夹创build第二个mysqld实例?

导出apt包列表以供重用(debian)

是否可以从(Debian)服务器导出软件包列表, 所以我可以重复使用这个列表,只需点击apt-get install <exported_package_list> 在不同的服务器上? 我也可以pipe一个文本文件apt-get像apt-get install << list.txt ?

禁用损坏的RAID 1从健康的硬盘读取

我的软件RAID 1中的一个专用服务器上的硬盘已损坏。 客户支持响应缓慢。 我想将所需的所有数据传输到另一台服务器,但文件访问速度令人难以置信。 我怎样才能禁用RAID,所以我可以挂载健康HHD,只是读取文件? 我的root和home都在RAID 1上的一个单独的分区上。/ dev / sda损坏了,/ dev / sdb是健康的。 更新: 安装输出: /dev/root on / type ext4 (rw,relatime,errors=remount-ro,data=ordered) devtmpfs on /dev type devtmpfs (rw,relatime,size=8162340k,nr_inodes=2040585,mode=755) tmpfs on /run type tmpfs (rw,nosuid,noexec,relatime,size=1632560k,mode=755) tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k) proc on /proc type proc (rw,nosuid,nodev,noexec,relatime) sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime) tmpfs on /dev/shm type […]

为什么安装了旧版本的Nginx?

我安装了Nginx和PHP5-FPM,并且一切正常,但是我注意到我安装了Nginx 1.2.1,而不是最新的稳定版本(1.6.x)。 我也注意到PHP-FPM有PHP 5.4而不是PHP 5.5。 但是,这不像旧的Nginx版本那么多的安全问题。 我如何安装: 添加deb http://nginx.org/packages/debian/ wheezy nginx到/etc/apt/sources.list 。 我也正确地添加了PGP密钥。 su apt-get update在更新期间列出了Nginx服务器,并且没有错误。 apt-get install nginx-extras php5-fpm 然后我configuration了两个我喜欢的。 我也意识到我有一个旧版本的Nginx。 我做了apt-cache show nginx-common ,看到了旧版本。 我试图apt-get upgrade无济于事。 apt-cache show nginx-common输出apt-cache show nginx-common : Package: nginx-common Source: nginx Version: 1.2.1-2.2+wheezy3 Installed-Size: 203 Maintainer: Kartik Mistry <[email protected]> Architecture: all Replaces: nginx (<< 0.8.54-4), nginx-extras (<< 0.8.54-4), […]