apache 下限制单个IP 的并发连接数

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

服务器上放了有几个linux 发行版的 ISO 文件,本来是方便大家下载的好事,但总有些人太过强求速度,联系发起几十个甚至几百个进程来下载,搞的apache 下都是这些链接,严重影响别人!所以不得不装个 mod_limitipconn 限制一下并发连接数。服务器上的是apache2.x的版本,所以要用这个 http://dominia.org/djao/limitipconn2.html

Read the rest of this entry »

标签:,

Apache Url Rewrite(mod_rewrite)

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

一、为什么需要用Apache Url Rewrite(mod_rewrite)

网站的生命在于不断地进行更新和维护,根据业务发展的需求转移服务器进行维护、重新组织目录结
构、变换URL甚至改变到新的域名等情况是经常发生的。为了让客户不会因此受到任何影响,最好的方法就是
使用Apache Rewrite Rule(Apache Url Rewrite)。    Read the rest of this entry »

标签:, , , ,

高负载情况下的squid 最大可打开文件数

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

这个问题只有在squid压力大时才会出现,linux默认的用户最大可开启文件数为1024,而编squid 2.6的版本的话编译时默认参数为max_filedesc 16384,这样在高负债下squid 的性能就会很受影响。所以我们可以用ulimit 命令改一下啊,增大这个数值。  Read the rest of this entry »

标签:, ,

MySQL数据库备份和还原的常用命令

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

备份MySQL数据库的命令
mysqldump -hhostname -uusername -ppassword databasename > backupfile.sql

备份MySQL数据库为带删除表的格式
备份MySQL数据库为带删除表的格式,能够让该备份覆盖已有数据库而不需要手动删除原有数据库。
mysqldump -–add-drop-table -uusername -ppassword databasename > backupfile.sql Read the rest of this entry »

标签:, , ,

MySQL修改root密码的多种方法

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

方法1: 用SET PASSWORD命令
  mysql -u root
  mysql> SET PASSWORD FOR ‘root’@'localhost’ = PASSWORD(’newpass’);
Read the rest of this entry »

标签:, ,

Centos5+Apache2.2.6+PHP5+tomcat6.0.14+jdk1.6整合安装

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

 安装步骤:
jdk-6u3-linux-i586.bin

#chmod u+x jdk-6u3-linux-i586.bin
#./jdk-6u3-linux-i586.bin
Read the rest of this entry »

标签:, , , ,

使用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 »

标签:, ,

Page 2 of 3«123»