使用squid命令查看squid运行状态和清除cache

03月 3rd, 2008 xiao H Posted in 服务器应用 No Comments »

一. 查看squid狀況:
1.
squidclient -t 1 -h 127.0.0.1 -p 80 mgr:info

2.
squidclient -T 1 -p 80 -h 127.0.01 mgr:5min | grep -e client_http.req -e client_http.all_median_svc_time -e client_http.miss_median_svc_time -e client_http.hit_median_svc_time Read the rest of this entry »

标签:, ,

apache,php安全小技巧

02月 28th, 2008 xiao H Posted in 服务器应用, 系统网络安全 No Comments »

最简单的安全技巧,隐藏apache,php 的版本信息

Apache:
打开 httpd.conf,加入以下两行:

ServerTokens ProductOnly
ServerSignature Off

PHP:
打开 php.ini,加入: Read the rest of this entry »

标签:, ,

MySQL的Query Cache

02月 26th, 2008 xiao H Posted in 服务器应用, 系统网络安全 No Comments »

QueryCache(下面简称QC)是根据SQL语句来cache的。一个SQL查询如果以select开头,那么MySQL服务器将尝试对其使用 QC。每个Cache都是以SQL文本作为key来存的。在应用QC之前,SQL文本不会被作任何处理。也就是说,两个SQL语句,只要相差哪怕是一个字符(例如大小写不一样;多一个空格等),那么这两个SQL将使用不同的一个CACHE。不过SQL文本有可能会被客户端做一些处理。例如在官方的命令行客户端里,在发送SQL给服务器之前,会做如下处理:

Read the rest of this entry »

标签:, ,

linux高负载下彻底优化mysql数据库

02月 26th, 2008 xiao H Posted in 服务器应用, 精品文档 No Comments »

作者:未知 来源:linuxsky.org

同时在线访问量继续增大 对于1G内存的服务器明显感觉到吃力严重时甚至每天都会死机 或者时不时的服务器卡一下 这个问题曾经困扰了我半个多月MySQL使用是很具伸缩性的算法,因此你通常能用很少的内存运行或给MySQL更多的被存以得到更好的性能。

Read the rest of this entry »

标签:, ,

Nginx 安装

02月 12th, 2008 xiao H Posted in 服务器应用 No Comments »

预先编译好的安装包
Nginx在一些Linux发行版和BSD的各个变种版本的安装包仓库中都会有,通过各个系统自带的软件包管理方法即可安装。需要注意的是,很多预先编译好的安装包都比较陈旧,大多数情况下还是推荐直接从源码编译。

官方源代码下载
http://sysoev.ru/nginx/download.html
Read the rest of this entry »

标签:, ,

Page 3 of 3«123