Friday, March 31, 2006

creative commons for chinese

creative commons (cc) 许可证日前在其官方站点上包含进了简体中文的生成器,具体链接可以在下面这里找到。

http://creativecommons.org/license/

Thursday, March 30, 2006

两种间接修改php.ini的方法

有很多虚拟主机的用户由于没有远程登陆主机条件,就算有服务商也不会提供修改 php Php.ini 文件的权限,要是想配置适合自己的php.ini文件就显的不可能了。今天查阅了一下 php 手册同时在网上搜索了一下,有以下几种方法可以得知和间接配置php.ini文件:
第一种:如果虚拟主机支持.htaccess文件。
可以在.htaccess文件中添加类似代码修改php.ini

php_flag register_globals on

以上代码将把全局变量功能打开。由于使用.htaccess,目录中每个被读取和被解析的文件每次都要进行处理,而不是在启动时处理一次,所以性能会有所降低。
第二种:使用php内置的函数。
可以在*.php的文件中写入如下代码:

ini_set (’register_globals’,'on’);

这样也会把全局变量功能打开。通过 get_ini () 可以取得 php.ini 文件的配置情况。如:

echo ini_get(’register_globals’);

可能得到的输出是 0,即全局变量功能处于关闭状态。

Saturday, March 25, 2006

受到垃圾评论的攻击~

昨天一小时之内被50条垃圾评论攻击,没有办法只有暂时关闭WordPress的匿名评论功能,今天回家准备装一个反垃圾评论的插件试试。

--

哈哈,今天安装了Spam Karma 2.2,先看看效果如何。

Thursday, March 23, 2006

Kernel 2.6.16 support IBM's cell cpu and Oracle's OCFS2

Linus Torvalds release new linux kernel version 2.6.16 on Mar 23rd.

The best news is that The 2.6.16 supprot IBM's cell cpu and Oracle's OCFS2 file system. You can download on kernel.org.

the below is chinese version about this entry.

Linux Torvalds 在三月二十号发布了新的linux内核版本 2.6.16。

最好的消息是2.6.16加入了对IBM cell cpu 以及甲骨文OCFS2文件系统的支持。你可能在 kernel.org 上下载。

清理bind服务和自定义日志

首先说的是清理bind配置中不再提供服务的域名,由于我管理的服务器BIND服务管理的域名不是很多(小于20个),所以我就直接用手工的方式验证配置上的域名是否还在使用这个BIND服务;

$nslookup
>set type=ns
>some.domain

这样来查找配置(/etc/named.conf)上的域名还在不在你的服务器上,如果不再就删除掉,然后写份报告出来就行了,别忘记备份。

Redhat用户使用chkconfig关闭不必要服务

在Redhat Linux上你可以使用chkconfig方便的停止一些没有必要运行的服务,当然,这要视你的系统环境而定。

#Disable automounters
chkconfig --level 2345 amd off

#Disable unless this is a laptop
chkconfig --level 2345 apmd off

#Disable unless you want to run batch programs within certain loads
chkconfig --level 2345 atd off

#Disable unless you want emails of EVERY ARP on your network segment
chkconfig --level 2345 arpwatch off

#Disable unless you want boot diskless workstations
chkconfig --level 2345 bootparamd off

#Disable unless this machine will be a DHCP *SERVER*
chkconfig --level 2345 dhcpd off

#Disable unless this machine will be a full blown router
chkconfig --level 2345 gated off

#Disable unless this machine will be a WWW server
chkconfig --level 2345 httpd off

#Disable unless this machine uses a modularized kernel
# NOTE: Not needed for 2.2.x+ kernels
chkconfig --level 2345 kerneld off

#Disable unless you really want to configure remote machines via Linuxconf
chkconfig --level 2345 linuxconf off

#Disable unless this machine will be a print server
#(for the local or remote machine)
chkconfig --level 2345 lpd off

#Disable unless you really need the proprietary MC server
chkconfig --level 2345 mcserv off

#Disable unless this machine will be a database server
chkconfig --level 2345 mysql off

#Disable unless this machine will be a caching or full blown DNS server
chkconfig --level 2345 named off

#Disable unless this machine will be a NFS server
chkconfig --level 2345 nfs off

#Disable unless this machine is a laptop or the PC has PCMCIA cards
chkconfig --level 2345 pcmcia off

#Disable unless this machine will be an NFS server or needs RPC tools
chkconfig --level 2345 portmap off

#Disable all R-cmds
chkconfig --level 2345 rusersd off
chkconfig --level 2345 rwalld off
chkconfig --level 2345 rwhod off

#Disable unless this machine is a email server
chkconfig --level 345 sendmail off

#Disable unless this machine is a Samba (MS File&Print) server
chkconfig --level 345 smb off

#Disable unless this machine is to support SNMP
chkconfig --level 2345 snmpd off

#Disable unless this machine is a local/remote HTTP proxy server
chkconfig --level 2345 squid off

#Disable unless this machine will be running X-windows
chkconfig --level 2345 xfs off

#Disable unless this machine will be an NTP server
chkconfig --level 2345 xntpd off

#Disable unless this machine will be part of a NIS/YP domain
chkconfig --level 2345 ypbind off
chkconfig --level 2345 yppasswdd off

#Disable unless this machine will be a NIS/YP server
chkconfig --level 2345 ypserv off

Wednesday, March 22, 2006

The best ftp client on linux

which ftp client do you use on linux now? I use IglooFTP PRO 1.2.3/1.2.4 two years. It's very good. smarty and fast, like some good ftp client on windows. also, if you are a GNOME user, GFTP is the best choise for you. on KDE, kbear is the default.

You can download a crack IglooFTP PRO on this site. You can use the keygen with both IglooFTP PRO 1.2.3(GTK) and 1.2.4(GTK2).

what is the best ftp client for you? give me the turth. :)

Xara Xtreme on Linux !

这几周以来听到的最好消息就是 Xara Xtreme 的发布,它是 Xara (一个win32系统的高速图形处理软件的Linux版本,更为重要的是,它是开源软件,如果你是LINUX上的高级用户,你完全可以定制 Xara Xtreme。) 它几乎和WIN32版本的界面,操作一模一样;非常容易上手。并且Xara网站上提供了非常丰富的视频教程和图象资源,不到一天,你就可以成为专业的图形处理专家。

值得注意的是它是运行在 GTK+ 引擎上的,似乎优秀的图形处理工具都不约而同的选择了 GTK+ 引擎,比如GIMP, Inkscape。 毫无疑问,Xara Xtreme 这次的发布给LINUX社区带来了一份厚礼,有GIMP,Inkscape,Xara Xtreme成为一名优秀了LINUX平台处理专家,你还忧郁什么?

Monday, March 20, 2006

使用TC简单实现控制自己机器的网络速度

老板说最近公司下载量太,不能下载大文件,我该怎么办?
没有问题,使用 tc 就可以快速的控制自己机器的网络速度

首先确定删除以前的 tc 规则

$sudo tc qdisc del dev eth0 root

然后增加规则,控制速度在 50kbit

sudo tc qdisc add dev eth0 root tbf rate 50kbit latency 50ms burst 1540

这样就好了

Linux中文LiveCD的制作

及永刚撰写了这篇关于Linux中文LiveCD的制作手册,个人觉得不错。

http://www.soforge.com/Linux/livecd.html

Thursday, March 16, 2006

不用WINDOWS安装盘,在LINUX上恢复损坏的WINDOWS启动

用 install 或者 livecd 都可以挂出一个原来的 系统
我是用 INSTALL CD,因为LIVECD加载太慢,进入INSTALL CD,用 ALT+F2 换到第二个控制台下, 挂出你的盘,用CHROOT就可以了。

如果不小心使用了 grub-install /dev/hda1 (应该是 grub-install /dev/hda)
那么你的WINDOWS启动向导就被覆盖了,不用担心,因为你覆盖的只是 /dev/hda1 最开始的 512 字节, 后面还有备份, 你可以在你的 chroot 环境或者 LINUX 环境中恢复它,而万全不需要去寻找 WINDOWS 的安装盘之类的,(如果你有正版,建议使用,白用白不用,花钱买的!) 方法如下
dd if=/dev/hda1 of=/root/backupboot.hda1 count=1 skip=6
dd if=/root/backupboot.hda1 of=/dev/hda1 count=1

这样你就可以启动WINDOWS了……

昨天在公司用WINDOWS不小心把 LINUX 下的 /BOOT 分区删除了(因为WINDOWS 挂载了我的 /BOOT 分区,导致WINDOWS异常,在系统管理-》磁盘管理中 艰难的把挂载 /BOOT 的盘符 删除了,结果发现是删除了 /BOOT 的所有内容 ……)
不用担心,用INSTALL CD给一个可以上网的 CHROOT 环境, 发短消息(SMS)给你的UBUNTU朋友(其他也可以,不过可能麻烦点),叫他压缩他的 /BOOT 放在网上, 你下载下来 放到 新的 /BOOT 中行了 , 然后 再安装 grub-install /dev/hda ,如果搞成 /dev/hda1 那么就回到帖子最开始的情况了, 在编辑 /boot/grub/menu.lst 的时候注意你的朋友的 分区设置 可能和你的不一样, 这就需要修改。完成之后如果不放心就再对系统进行检查,fsck 磁盘 等等, 系统完好如初, 如果你是一个“破坏狂”那么建议定期备份系统的主要文件到网络上(就算硬盘被你吃了也没有什么好担心的,除了你的胃)。
总的来说,LINUX上的系统恢复比WINDOWS简单许多,不过有时候可能会比较麻烦,这就要看你是不是有一个 比较 smarty 的分区了。