Apache HTTP Server Version 2.2 文档

本日志由 flyinweb 于 2009-06-26 15:08:00 发表到 WEB服务器 中,目前已经被浏览 13520 次,评论 0 次;

作者添加了以下标签: Apache文档

首页只显示了部分日志内容,要查看日志的全部内容请阅读全文

第一部分 应用篇 -- 利用Tokyo Tyrant构建兼容Memcached协议、支持故障转移、高并发的分布式key-value持久存储系统

Tokyo Cabinet 是日本人 平林幹雄 开发的一款 DBM 数据库,该数据库读写非常快,哈希模式写入100万条数据只需0.643秒,读取100万条数据只需0.773秒,是 Berkeley DB 等 DBM 的几倍。

点击在新窗口中浏览此图片



Tokyo Tyrant 是由同一作者开发的 Tokyo Cabinet 数据库网络接口。它拥有Memcached兼容协议,也可以通过HTTP协议进行数据交换。

  Tokyo Tyrant 加上 Tokyo Cabinet,构成了一款支持高并发的分布式持久存储系统,对任何原有Memcached客户端来讲,可以将Tokyo Tyrant看成是一个Memcached,但是,它的数据是可以持久存储的。这一点,跟新浪的Memcachedb性质一样。

本日志由 flyinweb 于 2012-05-18 14:36:12 发表到 数据库技术 中,目前已经被浏览 52 次,评论 0 次;

作者添加了以下标签: TTserverTokyo CabinetTokyo Tyrant

首页只显示了部分日志内容,要查看日志的全部内容请阅读全文

Name-Based VirtualHosts and SSL

As a rule, it is impossible to host more than one SSL virtual host on the same IP address and port. This is because Apache needs to know the name of the host in order to choose the correct certificate to setup the encryption layer. But the name of the host being requested is contained only in the HTTP request headers, which are part of the encrypted content. It is therefore not available until after the encryption is already negotiated. This means that the correct certificate cannot be selected, and clients will receive certificate mismatch warnings and be vulnerable to man-in-the-middle attacks.

本日志由 flyinweb 于 2012-05-18 11:33:23 发表到 WEB服务器 中,目前已经被浏览 40 次,评论 0 次;

作者添加了以下标签: SSL

首页只显示了部分日志内容,要查看日志的全部内容请阅读全文

启用 apache 的 mod_ssl 之后需要有证书才能正常运作。写了个脚本来操作。首先要确定机器上已经有 openssl 。

本日志由 flyinweb 于 2012-05-18 11:29:30 发表到 WEB服务器 中,目前已经被浏览 39 次,评论 0 次;

作者添加了以下标签: SSL self-signed certificateSSL

首页只显示了部分日志内容,要查看日志的全部内容请阅读全文

Windows Sidebar
There are a number of cool gadgets for the Windows Sidebar that are useful on a server, so I really wanted to get the sidebar working on my Windows Server 2008 boxes. The solution is as follows.
1.Copy the "Windows Sidebar" folder from a Windows Vista SP1 installations Program Files folder that is the same architecture as the Windows Server 2008 box you intend to enable Windows Sidebar on. (i.e., if I'm running Windows Server 2008 64-bit, then I need to copy from a 64-bit Windows Vista SP1 installation.)
2.Copy the "Windows Sidebar" copy into the Program Files folder of the Windows Server 2008 installation. (If 64-bit Windows Server 2008, copy to the "Program Files" folder and NOT the "Program Files (x86)" folder.)
3.Run the following commands from a prompt with administrative credentials
o Regsvr32 atl.dll (如果引组件未注册,在注册下面的组件时,可能会出现类似错误:模块“C:\Program Files\windows sidebar\sbdrop.dll”已加载,但对 DllRegisterServer 的调用失败,错误代码为 0x8007007e。)
o regsvr32 "C:\Program Files\Windows Sidebar\sbdrop.dll"
o regsvr32 "C:\Program Files\Windows Sidebar\wlsrvc.dll"
o "C:\Program Files\Windows Sidebar\sidebar.exe" /RegServer
4.Copy the content of the Sidebar registry area from your Vista box to the 2008 box (HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Sidebar). The registry content is the same for 32-bit and 64-bit, so you can just paste the following into sidebar.reg and execute (by double clicking) to save any copying between machines.

Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Sidebar]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Sidebar\Compatibility]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Sidebar\Settings]
"SidebarDockedPartsOrder"="0x1,0x2,0x3,0x4

5.We can now launch sidebar with the "C:\Program Files\Windows Sidebar\sidebar.exe" command.
6.Sidebar will launch, and now access the Properties of Sidebar (right click on a blank area of sidebar and select Properties) and check the "State Sidebar when Windows starts" option.

Adding Vista Sidebar and Aero to Windows Server 2008 Desktop

Do the following steps in your target Windows Server 2008 x64 box.

To get the sidebar,

  1. From a Vista SP1 x64, copy in the content of C:\Program Files\Windows Sidebar. And place the folder in the same location.
  2. Run sidebar.exe /regserver
  3. Register (regsvr32) the 2 sidebar dlls, sbdrop.dll and wlsrvc.dll
  4. Clone the sidebar registry settings of the Vista box, HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Sidebar\Settings, to the target Windows Server 2008 registry.
  5. Run C:\Program Files\Windows Sidebar\Sidebar.exe to bring up the sidebar and set the properties to start Siderbar when Windows starts.

本日志由 flyinweb 于 2012-05-02 13:56:06 发表到 Windows 中,目前已经被浏览 136 次,评论 0 次;

作者添加了以下标签: Sidebar

首页只显示了部分日志内容,要查看日志的全部内容请阅读全文

简介

1.1 什么是Sphinx/Coreseek

Sphinx是一个在GPLv2下分发的全文检索引擎;Coreseek 是一个可供企业使用的、基于Sphinx(可独立于Sphinx原始版本运行)的中文全文检索引擎,按照GPLv2协议发行,商业使用(例如, 嵌入到其他程序中)需要获得商业授权。

一般而言,Sphinx是一个独立的全文搜索引擎;而Coreseek是一个支持中文的全文搜索引擎,意图为其他应用提供高速、低空间占用、高结果相关度的中文全文搜索能力。Sphinx/Coreseek可以非常容易的与SQL数据库和脚本语言集成。

当前系统内置MySQL和PostgreSQL 数据库数据源的支持,也支持从管道标准输入读取入特定格式的XML数据。通过修改源代码,用户可以自行增加新的数据源(例如:其他类型的DBMS的原生支持)。在最新的版本中,用户还可以使用Python脚本作为数据源来获取任何已知世界和未知世界的数据,这极大的扩展了数据源的来源。

搜索API支持PHP、Python、Perl、Rudy和Java,并且也可以用作MySQL存储引擎。搜索API非常简单,可以在若干个小时之内移植到新的语言上。

Sphinx 是SQL Phrase Index的缩写,但不幸的和CMU的Sphinx项目重名。

1.2. Sphinx/Coreseek 的特性

  • 高速的建立索引(在当代CPU上,峰值性能可达到10 MB/秒);
  • 高性能的搜索(在2 – 4GB 的文本数据上,平均每次检索响应时间小于0.1秒);
  • 可处理海量数据(目前已知可以处理超过100 GB的文本数据, 在单一CPU的系统上可处理100 M 文档);
  • 提供了优秀的相关度算法,基于短语相似度和统计(BM25)的复合Ranking方法;
  • 支持分布式搜索;
  • 提供文档片段(摘要以及高亮)生成功能;
  • 可作为MySQL的存储引擎提供搜索服务;
  • 支持布尔、短语、词语相似度等多种检索模式;
  • 文档支持多个全文检索字段(缺省配置下,最大不超过32个);
  • 文档支持多个额外的属性信息(例如:分组信息,时间戳等);
  • 停止词查询;
  • 支持单一字节编码和UTF-8编码,以及对GBK和BIG5的完善支持;
  • 支持英语、俄语词词干化和Soundex,以便进行词形学处理;
  • 原生的MySQL支持(同时支持MyISAM 和InnoDB );
  • 原生的PostgreSQL 支持;
  • 支持直接模拟为MySQL服务端运行;
  • 支持MMSeg分词引擎,用户可自定义词典;
  • Python数据源支持,得以获取任何已知世界和未知世界的数据.

1.3. 如何得到Sphinx/Coreseek

Sphinx原始版本可以从Sphinx官方网站 http://www.sphinxsearch.com/,Coreseek可以从Coreseek官方网站 http://www.coreseek.cn/下载.

目前,Sphinx/Coreseek的发布包包括如下软件:

  • indexer: 用于创建全文索引;
  • search: 一个简单的命令行(CLI) 的测试程序,用于测试全文索引;
  • searchd: 一个守护进程,其他软件可以通过这个守护进程进行全文检索;
  • sphinxapi: 一系列searchd 的客户端API 库,用于流行的Web脚本开发语言(PHP, Python, Perl, Ruby, Java).
  • spelldump: 一个简单的命令行工具,用于从 ispellMySpell (OpenOffice内置绑定) 格式的字典中提取词条。当使用 wordforms 时可用这些词条对索引进行定制.
  • indextool: 工具程序,用来转储关于索引的多项调试信息。 此工具是从版本Coreseek 3.1(Sphinx 0.9.9-rc2)开始加入的。
  • mmseg: 工具程序和库,Coreseek用于提供中文分词和词典处理。

注:以下安装测试在Cent OS 5.x(5.4/5.6/5.8)x86、x86_64下环境测试通过

本日志由 flyinweb 于 2012-05-02 10:34:54 发表到 Linux 中,目前已经被浏览 139 次,评论 0 次;

作者添加了以下标签: coreseekSphinx

首页只显示了部分日志内容,要查看日志的全部内容请阅读全文

症状:

Cent OS安装httpd-2.4.2时出错:

configure: error: APR not found

背景:

Compiling and Installing Requirements

The following requirements exist for building Apache httpd:

APR and APR-Util
Make sure you have APR and APR-Util already installed on your system. If you don't, or prefer to not use the system-provided versions, download the latest versions of both APR and APR-Util from Apache APR, unpack them into ./srclib/apr and ./srclib/apr-util (be sure the domain names do not have version numbers; for example, the APR distribution must be under ./srclib/apr/) and use ./configure's --with-included-apr option. On some platforms, you may have to install the corresponding -dev packages to allow httpd to build against your installed copy of APR and APR-Util.

本日志由 flyinweb 于 2012-04-23 15:28:45 发表到 WEB服务器 中,目前已经被浏览 225 次,评论 0 次;

作者添加了以下标签: APR not foundAPR-utilAPR

首页只显示了部分日志内容,要查看日志的全部内容请阅读全文

#Rename-FileExtension.ps1
Function Rename-FileExtension($path,$oldExtension, $newExtension)
{
 Get-ChildItem -path $path -Filter $oldExtension |
 Foreach-Object {
   if($_.extension.length -gt 0)
    {
      $baseName = $_.name.remove($_.name.length - $_.extension.length)
    }
  ELSE
    { $baseName = $_.name }
 Rename-Item -Path $_.fullname -newname ($baseName + $newExtension)
 }
} #end functionp
Rename-FileExtension -path "C:\download\" -oldExtension "*.php" -newExtension ".htm"

本日志由 flyinweb 于 2012-04-16 22:10:49 发表到 Windows 中,目前已经被浏览 231 次,评论 0 次;

作者添加了以下标签: Rename-Item

7651/96