Articles of centos

非标准端口上的Nginx虚拟主机不能正常工作

我试图使用清漆作为Nginx的前端代理。 当我尝试使用以下作为我的虚拟主机configuration: server { listen 8080; server_name playwithbits.com www.playwithbits.com; # limit_conn limit_per_ip 16; # ssi on; access_log /home/nginx/domains/playwithbits/log/access.log combined buffer=32k; error_log /home/nginx/domains/playwithbits/log/error.log; root /home/nginx/domains/playwithbits/public; location / { # Enables directory listings when index file not found #autoindex on; # Shows file listing times as local time #autoindex_localtime on; # Enable for vBulletin usage WITHOUT vbSEO […]

安装s3fs的S3存储区显示错误的文件大小

背景:我有一个使用AWS Web界面上传数据的Amazon S3存储桶。 现在我需要对我的桶中的path进行基于权限的访问给FTP用户。 为此,我在新的Amazon EC2实例上运行vsftpd和s3fs。 问题是存储桶内容具有path名而不是点文件,而巨大的文件大小会在vsftpd中创build一个exception。 ls -la看起来像这样: $ pwd /mnt/my-bucket-name/pathname $ ls -la total 1 drwxrwxr-x 1 root root 0 Jun 16 19:54 dir1 drwxrwxr-x 1 root root 0 Jun 16 19:54 dir2 ———- 1 root root 18446744073709551615 Dec 31 1969 pathname 而应该看起来更像是: $ ls -la total 500 drwxrwxr-x 1 root root 500 […]

FcgidProcessLifeTime没有效果

我正在运行PHP处理程序fcgid LoadModule fcgid_module modules/mod_fcgid.so FcgidMaxRequestsPerProcess 3000 FcgidMaxProcesses 3000 FcgidMaxProcessesPerClass 16 FcgidMinProcessesPerClass 1 FcgidProcessLifeTime 7200 FcgidIOTimeout 180 IPCConnectTimeout 60 FcgidIdleTimeout 600 FcgidIdleScanInterval 30 FcgidBusyTimeout 3600 FcgidBusyScanInterval 30 FcgidErrorScanInterval 3 FcgidZombieScanInterval 3 FcgidFixPathinfo 0 FcgidMaxRequestInMem 419430400 FcgidMaxRequestLen 1073741824 每10分钟或更多的进程终止,也设置FcgidProcessLifeTime 7200 我也使用mpm_worker : Timeout 50 <IfModule worker.c> StartServers 16 ServerLimit 1800 MaxClients 1728 MinSpareThreads 75 MaxSpareThreads 250 ThreadLimit […]

可以在自定义initrd(CentOS / RHEL)中使用/ dev / mapper?

我试图在启动之前设置一个映射器设备,因为它需要使用我的/ var分区,这是很大程度上依赖启动。 我的问题是它似乎失败了,没有提供任何输出 – 我不确定这是我做了什么错事或者我根本不知道的限制。 我正在使用flashcache,并使用initrd加载它。 我也有flashcache的二进制文件工作正常,但只是失败。 我只是将以下内容添加到initrd init脚本中: <snip> setuproot echo Creating flashcache volumes for var flashcache_create -p around sdcachehome /dev/sdb1 /dev/sda7 echo Switching to new root and running init. switchroot </snip> 不幸的是,它正在吐出一个无益的“失败”,然后继续引导过程。 Creating flashcache volumes for var cachedev sdcachehome, ssd_devname /dev/sdb1, disk_devname /dev/sda7 cache mode WRITE_AROUND block_size 8, cache_size 0 Flashcache metadata will […]

Centos 5.8无法通过login屏幕

我想我已经搞乱了我的系统。 我一直在使用KDE。 最近,我试图安装一个名为gnome-connection manager的软件。 我下载了deb软件包,把它转换成使用外星人的rpm并安装它。 几秒钟后,系统崩溃,我不得不重新启动它。 重新启动后,而不是logingui,我结束了一个控制台,我不能login到它。 如果我提供了一个不正确的密码,说明密码不正确,但是如果密码正确的话,什么都不会发生,它会再次要求用户名和密码。 不过,我可以login为根,然后“startx”来获取桌面。 我尝试清除/ tmp目录,清除.gconf文件夹并重新启动几次。 但我只能以root用户身份login… 任何人都可以build议一种方法进入我的正常用户帐户?

在CentOS上的OCZ RevoDrive 3上进行TRIM

我有一个OCZ RevoDrive 3,安装在运行内核2.6.32-220.17.1.el6.x86_64的CentOS 6.3上。 / boot在硬盘上,因为OCZ的驱动程序显然还不支持直接启动。 在testing的同时,安装了“丢弃”选项的驱动器就好了。 它似乎只能通过fstab自动安装后自行closures。 该选项显示在mount : [root@craft ocz]# mount /dev/sdb3 on / type ext4 (rw,noatime,discard) 但/ var / log / messages说: 8月12日04:49:53工艺内核:EXT4-fs警告(device sdb3):release_blocks_on_commit:丢弃不支持,禁用 我试图testing它是否与hdparm无关,但是我认为这个问题与这个无关,导致hdparm在尝试–read-sectors ,所以我不确定还有什么要检查。 任何人都知道我可以放弃正常工作? 更新 :有问题的分区的/ etc / fstab行,如注释所示: UUID = a869cf38-7547-49a9-aeb5-17adb56b4bd4 / ext4默认值,noatime,丢弃1 2

logging和助手文件的分析

我们有logging和助手文件。 我们想知道如何知道这个服务器在一段时间内没有被激活是否发生了入侵。 我们在助手文件中的相当多的条目。 这是否意味着发生了一些错误? File /etc/networks in databases has different attributes, 10020021d,20021d File /etc/dnsmasq.conf in databases has different attributes, 10020021d,20021d File /etc/exports in databases has different attributes, 340205bbd,240205bbd File /etc/cgrules.conf in databases has different attributes, 10020021d,20021d File /etc/autofs_ldap_auth.conf in databases has different attributes, 10020021d,20021d

DRBD不断饱和的链接崩溃

在高I / O的情况下,DRBD会导致服务器崩溃。 无论如何,优化DRBD防止再次发生。 下面列出的是我目前的configuration,错误和规格。 如果您需要更多的信息,请让我知道。 提前致谢。 最新的drbdconfiguration(与辅助设置相同): [root@23 ~]# cat /etc/drbd.d/drbd0.res resource drbd0 { startup { degr-wfc-timeout 30; # default is 2 minutes. } disk { on-io-error detach; fencing dont-care; disk-barrier no; disk-flushes no; al-extents 3389; } net { max-buffers 8000; max-epoch-size 8000; sndbuf-size 512k; unplug-watermark 16; after-sb-1pri discard-secondary; } on 23 { device […]

高负载平均,低CPU和IO(Centos 5.7)

CiviCRM的Drupal 7站点在以1和1 VPS平稳运行一年之后突然变得没有反应。 现在网页最终加载,但可能需要一分多钟。 纵观Virtuozzo的资源使用情况,负载平均值有警告,一直保持在1以上。虽然我知道这并不是特别高,但这与网站运行时的变化是一致的。 这是top的典型快照: top – 03:10:32 up 3:21, 1 user, load average: 1.16, 1.22, 1.30 Tasks: 43 total, 1 running, 42 sleeping, 0 stopped, 0 zombie Cpu(s): 0.1%us, 0.1%sy, 0.1%ni, 99.7%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st Mem: 2097152k total, 1015112k used, 1082040k free, 0k buffers Swap: 0k total, 0k used, 0k free, 0k […]

OpenVZ下的CentOS 6.3虚拟机在postfix运行时无法ping,主机查找,出站连接

我最好的理论是,一些内核限制被打到阻止出站连接。 我们已经基本上尝试了从tcpdumps到configuration全新的虚拟服务器(我们没有任何其他虚拟机上的这个问题)的所有事情,然而,即使在新的postfix构build(工作)下,这个问题也继续存在。 电子邮件工作,出站连接工作,只要后缀没有太多的事情。 / proc / user_beancounters显示没有限制被打(下面显示)。 然而,ping甚至IP地址失败。 TCP堆栈看起来很健康。 负载很低。 没有iowait。 刷新的iptables已经。 有没有人经历过这样的事情? uid resource held maxheld barrier limit failcnt 3: kmemsize 166216365 170262528 9223372036854775807 9223372036854775807 0 lockedpages 0 0 9223372036854775807 9223372036854775807 0 privvmpages 285727 351885 9223372036854775807 9223372036854775807 0 shmpages 16933 17605 9223372036854775807 9223372036854775807 0 dummy 0 0 0 0 0 numproc 150 303 9223372036854775807 […]