Bash Shell中逗号操作符示例

Posted by – 2010-09-03

#!/bin/bash
#     The comma operator links together a series of arithmetic operations.
#+    All are evaluated, but only the last one is returned. 

# Set "a = 9" and "t2 = 15 / 3"
let "t2 = ((a = 9, 15 / 3))"
echo $t2.$a

# The comma  operator can also concatenate

Nginx下配置Cache-Control头

Posted by – 2010-09-01

HTTP协议的Cache -Control指定请求和响应遵循的缓存机制。
在请求消息或响应消息中设置 Cache-Control并不会影响另一个消息处理过程中的缓存处理过程。
请求时的缓存指令包括no-cache、no-store、max-age、

CentOS安装视频教程

Posted by – 2010-08-27

闲来无事,做了个CentOS的安装教程,主要用于服务器安装。传到youku了,这样就不受天朝网速影响了。。

Windows下监控应用程序

Posted by – 2010-08-23

从来没想到有一天我需要写批处理。
功能很简单,监控应用程序search的三个进程,如果进程不在了就重启该进程,因为启动后会有多个cmd窗口,所以最后把多余的cmd窗口用taskkill关掉。

Memcached自动安装脚本

Posted by – 2010-07-22

今天写了一个小脚本。两点收获:
一、只要稍做修改就可以自动下载最新的开源软件包,像nginx就可以,难点在于得到下载用的url。这里采用的是elinks和wget。
二、用tar

VsFTPD自动安装脚本

Posted by – 2010-07-20

虽然平时配置一个ftp要不了5分钟,但写完脚本才发现,浪费的时间实现太多了,脚本一般半分钟就装好了。
本脚本在CentOS 和 Redhat Enterprise环境中测试通过。有空再测其它发行版。
脚本中用到了以下几个东西:

Nginx与php分离配置

Posted by – 2010-05-12

####################################
#Nginx与php分离配置
#Author:楚霏
#Date: 2010-5-12
#Update: 2010-5-12
#Env: Centos 5.4 x86_64
####################################

一、准备工作
####################################

转出万网记

Posted by – 2010-05-06

这个域名在万网呆了快两年了,用了一段Godaddy的服务感觉不错,至于其它原因,每个想转移域名的都差不多,不再赘述。
2010年3月,我首先想到的是投诉到ICANN,没什么效果;

XtraDB internals

Posted by – 2010-04-27

原文地址:http://www.percona.com/docs/wiki/percona-xtradb:internals:start

Gearman_Configuration

Posted by – 2010-04-21

####################################
#Gearman_Configuration
#Author:楚霏
#Date: 2010-4-21
#Update:2010-4-21
#Env: Centos 5.4 x86_64
####################################

一、准备工作
####################################
环境:Centos