分页: 1/1 第一页 1 最后页 [ 显示模式: 摘要 | 列表 ]
Sep 24
由于脚本编写时出错导致可能存在pathinfo漏洞,请所有lnmp用户检查一下php的pathinfo设置!!!

编辑/usr/local/webserver/php/etc/php.ini 文件,搜索 cgi.fix_pathinfo ,如果cgi.fix_pathinfo 该行为 ; cgi.fix_pathinfo=0 请修改为 cgi.fix_pathinfo=0
或直接执行:sed -i 's/; cgi.fix_pathinfo=0/cgi.fix_pathinfo=0/g' /usr/local/webserver/php/etc/php.ini

再执行:/usr/local/webserver/php/sbin/php-fpm restart 重启php-fpm

如果是cgi.fix_pathinfo=0则没问题,不需要修改。
请各位lnmp(linux+nginx+mysql+php)用户检查一下,防止pathinfo漏洞给网站或服务器带来安全隐患。
Tags: ,
Sep 23
在家搭配了一个模拟的环境,创建了几个虚拟机,今天远程连接到机器上使用内网IP连接到其他内网机器时,出现以下错误提示:
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that the RSA host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
a1:ee:9e:76:32:ab:79:83:21:c1:d1:eb:35:44:fe:b4.
Please contact your system administrator.
Add correct host key in /root/.ssh/known_hosts to get rid of this message.
Offending key in /root/.ssh/known_hosts:13
RSA host key for 192.168.1.6 has changed and you have requested strict checking.
Host key verification failed.
原因就是在上次登录到那台机器之后,我把那台虚拟机重新做了系统,导致Host key和之前保存的不一致,所以提示KEY 验证失败不能登录。
解决方法很简单: vi /root/.ssh/known_hosts 删除掉那个IP对应的公钥,保存退出再连接就可以了。
Sep 23
I added a new slave. I tried to create a new vps with centos 5.x on the new slave. I receive error

Alert: Could Not Start Vps, Reason: Error: Kernel image does not exist: /boot/hypervm-xen-vmlinuz:

Issue command below

cd /usr/local/lxlabs/hypervm/httpdocs/
lphp.exe ../bin/misc/fixcentos5xen.php
Tags: ,
Sep 3
一.文件系统调节
1.硬盘不要使用RAID
2.使用性能好的FS(例如: ReiserFS)
在fstab里面添加noatime,async项,提高文件系统的性能.
二. aufs存储机制
编辑squid-2.6.STABLE13/src/fs/aufs/store_asyncufs.h
#define ASYNC_WRITE 0 (把0修改为:1)
pthread_create(), SMP优越. (线程制)
编辑squid-2.6.STABLE13/include/autoconf.h
define DEFAULT_FD_SETSIZE 1024{1024修改为:65536}
diskd存储机制
通过消息队列和共享内存来实现进程间通信
使用Diskd存储机制而对 kernel.msgmnb等的调整
kernel.msgmnb = 16384
每个消息队列的最大字节限制
kernel.msgmni = 16 (此值可以根据需要增大)
整个系统的最大数量的消息队列, Squid对每个Cache_dir 使用两个队列, 假如你有2个磁盘,那就有2个队列.
kernel.msgmax = 8192
每个消息的最大size.

引用

[root@jackbillow~]# sysctl -a |grep msgmnb
kernel.msgmnb = 16384
[root@jackbillow ~]# sysctl -a |grep msgmni
kernel.msgmni = 16
[root@jackbillow ~]# sysctl -a |grep msgmax
kernel.msgmax = 8192
[root@jackbillow ~]# sysctl -a |grep shmall
kernel.shmall = 2097152
[root@jackbillow ~]# sysctl -a |grep shmmni
kernel.shmmni = 4096
[root@jackbillow~]# sysctl -a |grep shmmax
kernel.shmmax = 2147483648
Tags: ,
分页: 1/1 第一页 1 最后页 [ 显示模式: 摘要 | 列表 ]