Rootop 服务器运维与web架构

2011-05-12
发表者 Venus
暂无评论

spamhaus 反垃圾邮件组织

EMOS做的企业邮局,往163邮箱发送邮件没问题,往新浪,hotmail之类的国际邮箱发送的时候就出错了,信被退了回来:

 The mail system

<networkinbox@sina.com>: host freemx3.sinamail.sina.com.cn[60.28.2.248] said:
    550 #5.7.1 Your access to submit messages to this e-mail system has been
    rejected. (in reply to RCPT TO command)

经一番查询,原来是被spamhaus 反垃圾邮件组织把我的服务器IP加入到黑名单里了。新浪用的它们的过滤名单。

查询地址:http://www.spamhaus.org/lookup.lasso

可以根据提示进行解封,但是我一直没收到确认邮件!郁闷,继续跟进~

2011-05-11
发表者 Venus
暂无评论

tar: 从成员名中删除开头的“/”

写了个脚本,用来备份服务器中的web和数据库,测试的时候报如下错误:

tar: 从成员名中删除开头的“/”

CODE:

#!/bin/bash
backdir=”/backup”
dirname=”$(date +%Y-%m-%d-%H-%M)”
DIR=”nq db”
for dir in $DIR
do
     mkdir -p $backdir/$dirname/$dir
done

# web backup
targz=”nq.tar.gz”
tar zcf $backdir/$dirname/nq/$targz /site/nq

# database backup
dbtargz=”db.tar.gz”
cd /var/lib/mysql
mysqldump –opt -u root -p –password=root NQ> $backdir/$dirname/db/NQ.sql
tar zcf $backdir/$dirname/db/$dbtargz $backdir/$dirname/db/NQ.sql
rm -rf $backdir/$dirname/db/NQ.sql

在Linux中,tar打包的时候,不论是创建还是解压tar包, 默认情况下绝对路径中的根”/”将会被去除, 可用参数P来保留

修改为:tar zcfP $backdir/$dirname/nq/$targz /site/nq 即可。

2011-05-09
发表者 Venus
暂无评论

屏蔽MSN面板下方广告及弹出广告

用记事本打开 C:\WINDOWS\system32\drivers\etc文件夹下的hosts文件
把下面两行代码追加到hosts文件中
0.0.0.0 rad.msn.com
0.0.0.0 rad.live.com

保存退出,重新启动MSN。

原理:

MSN启动时与服务器进行通讯,登陆时是采用IP,而广告是采用域名,只要将域名解析到一个不存在的地址

广告就无法下载到本地,就无法显示了。

2011-05-07
发表者 Venus
暂无评论

script xxx.php not found or unable to stat

Hi all:

My system is RHEL6.0 , and i write a test script to test my php server environment , but when i visit it ,i get nothing.the page is null.

script name : test.php

script code:

<? phpinfo(); ?>

i founded that:”scrip test.php not found or unable to stat” in httpd log.

At last,i’m sure it’s php.ini had somewhere to correct:

; Allow the <? tag.  Otherwise, only <?php and <script> tags are recognized.
; NOTE: Using short tags should be avoided when developing applications or
; libraries that are meant for redistribution, or deployment on PHP
; servers which are not under your control, because short tags may not
; be supported on the target server. For portable, redistributable code,
; be sure not to use short tags.
short_open_tag = On

make the red section to ON

it’s OK ~

2011-05-06
发表者 Venus
暂无评论

关闭系统默认共享

安装微软原版系统之后,系统会存在几个默认的共享,视为潜在的安全隐患。传说中的IPC入侵就是这个原理

(命令提示符键入:net share查看)

共享名       资源                            注解

——————————————————————————-
C$           C:\                             默认共享
D$           D:\                             默认共享
E$           E:\                             默认共享
IPC$                                         远程 IPC
ADMIN$       C:\Windows                      远程管理
命令成功完成。

关闭此共享可进一步提高系统的安全性。

关闭后的效果:

共享名       资源                            注解

——————————————————————————-
IPC$                                         远程 IPC
命令成功完成。

适用于:xp/win7/server 2003/server2008 及R2

将以下代码保存到记事本中,修改拓展名为*.reg 双击导入即可关闭系统的默认共享。

Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters]
“AutoShareServer”=dword:00000000
“AutoSharewks”=dword:00000000

重启系统生效。