<?xml version="1.0" encoding="gb2312"?>
<rss version="2.0">
<channel>
<title><![CDATA[CruzChen]]></title>
        <image>
        <title>http://hi.baidu.com</title>
        <link>http://hi.baidu.com</link>
        <url>http://img.baidu.com/img/logo-hi.gif</url>
        </image>
<description><![CDATA[风萧萧兮易水寒.壮士一去不复返...个人网站www.fishshare.net]]></description>
<link>http://hi.baidu.com/chencruz</link>
<language>zh-cn</language>
<generator>www.baidu.com</generator>
<ttl>5</ttl>


<item>
        <title><![CDATA[App Server-简介]]></title>
        <link><![CDATA[http://hi.baidu.com/chencruz/blog/item/dbfae71b8bc665ddac6e757b.html]]></link>
        <description><![CDATA[
		
		 App Server是运行Java企业组件的平台，构成了应用软件的主要运行环境。当前主流的App Server是BEA公司的Weblogic Server和IBM公司的Websphere以及免费的Jboss，选择其中一个进行学习就可以了，个人推荐Weblogic，因为它的体系结构更加干净，开发和部署更加方便，是Java企业软件开发人员首选的开发平台。下面简要介绍几种常用的App Server： 

App Server-分类     1、 Tomcat 
Tomcat严格意义上并不是一个真正的App Server，它只是一个可以支持运行Serlvet/JSP的Web容器，不过Tomcat也扩展了一些App Server的功能，如JNDI，数据库连接池，用户事务处理等等。Tomcat被非常广泛的应用在中小规模的Java Web应用中，因此本文做一点下载、安装和配置Tomcat的介绍： 

Tomcat是Apache组织下Jakarta项目下的一个子项目，它的主网站是：http://jakarta.apache.org/tomcat/;，Tomcat最新版本是Tomcat4.1.27，软件下载的连接是：http://www.apache.org/dist/jakarta/tomcat-4/binaries/;。 

下载Tomcat既可以直接下载zip包，也可以下载exe安装包（个人建议zip更干净些），不管哪种情况，下载完毕安装好以后（zip直接解压缩就可以了）。需要设置两个环境变量： 

JAVA_HOME=C:\j2sdk1.4.2 
CATALINA_HOME=D:\tomcat4 (你的Tomcat安装目录) 

这样就安装好了，启动Tomcat运行CATALINA_HOME\bin\startup.bat，关闭Tomcat运行shutdown.bat脚本。Tomcat启动以后，默认使用8080端口，因此可以用浏览器访问http://localhost:8080来测试Tomcat是否正常启动。 

Tomcat提供了两个Web界面的管理工具，URL分别是： 
http://localhost:8080/admin/index.jsp; 
http://localhost:8080/manager/html; 
在启用这两个管理工具之前，先需要手工配置一下管理员用户和口令。用一个文本工具打开CATALINA_HOME\conf\tomcat-users.xml这个文件，加入如下几行： 

<role rolename="manager"> 
<role rolename="admin"> 
<user username="robbin" password="12345678" roles="admin,manager,tomcat"> 

这样用户“robbin”就具备了超级管理员权限。重新启动Tomcat以后，你就可以使用该用户来登陆如上的两个管理工具，通过Web方式进行Tomcat的配置和管理了。 

2、 BEA Weblogic 
Weblogic可以到BEA的网站上免费注册之后下载到最新的Weblogic8.1企业版，License可以免费使用1年时间，其实这已经完全足够了。Weblogic的下载连接：http://commerce.bea.com/index.jsp，Weblogic的在线文档：http://edocs.bea.com/;。 

3、 IBM Webshpere 
Websphere同样可以下载到免费的试用版本，到IBM的developerWorks网站可以看到Websphere试用产品的下载和相关的Websphere的资料，developerWorks中文网站的连接是：http://www-900.ibm.com/developerWorks/cn/wsdd/;，Websphere的下载连接：http://www7b.software.ibm.com/wsdd/downloads/WASsupport.html;。 

4、 Jboss 
Jboss是免费开源的App Server，可以免费的从Jboss网站下载：http://www.jboss.org/index.html，然而Jboss的文档是不免费，需要花钱购买，所以为我们学习Jboss设置了一定的障碍。在Jdon上有几篇不错的Jboss配置文档，可以用来参考：http://www.jdon.com/idea.html; <a href="http://hi.baidu.com/chencruz/blog/item/dbfae71b8bc665ddac6e757b.html">阅读全文</a>
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/chencruz/blog/category/%CD%F8%C2%E7%BC%BC%CA%F5">网络技术</a>&nbsp;<a href="http://hi.baidu.com/chencruz/blog/item/dbfae71b8bc665ddac6e757b.html#comment">查看评论</a>]]></description>
        <pubDate>2009-04-21  22:23</pubDate>
        <category><![CDATA[网络技术]]></category>
        <author><![CDATA[chencruz]]></author>
		<guid>http://hi.baidu.com/chencruz/blog/item/dbfae71b8bc665ddac6e757b.html</guid>
</item>

<item>
        <title><![CDATA[Linux与Windows多系统引导软件GRUB4DOS下载及使用说明]]></title>
        <link><![CDATA[http://hi.baidu.com/chencruz/blog/item/fd51fcea3aa56edbd439c93c.html]]></link>
        <description><![CDATA[
		
		GRUB4DOS是一个优秀的双(多)系统引导软件，使用GRUB4DOS可以很方便的引导各种操作系统，比如DOS、Windows、Linux等。

使用说明:

解压GRUB4DOS后，将其中的grub.exe文件放在你的一个FAT32分区中。

具体修复过程如下：

1.使用DOS启动盘或Windows 98的启动盘启动到DOS模式下，然后键入：d:\tmp\grub.exe 这里的d:\tmp是笔者解压缩GRUB4DOS的目录。

 
这样就进入了GRUB环境，可以看到一个 grub&gt;提示符。

2.恢复GRUB引导记录。在 grub&gt; 提示符下键入：
root (hdx,y)
kernel (hdx,y)/boot/yourkernelname ro root=/dev/hdxx
setup (hd0)

上面第一条命令是指定你的/boot分区位置，如果/boot没有单独分区，那么就是你的/分区。

第二条命令指定内核位置，具体位置根据自己的实际情况确定。

第三条命令是将GRUB引导记录写入MBR。

如果对Linux分区位置不十分清楚，可以使用Tab键补全功能来查看确定。执行完setup命令后会看到“succeed!”字样，此时重启即可。

3.如果只是想启动Linux，而不是修复GRUB，那么可以在进入DOS后键入下面命令启动你的Linux系统。

d:\tmp\grub.exe --config-file=(hdx,y)/boot/grub/grub.conf

其中参数同上。 <a href="http://hi.baidu.com/chencruz/blog/item/fd51fcea3aa56edbd439c93c.html">阅读全文</a>
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/chencruz/blog/category/Ubuntu">Ubuntu</a>&nbsp;<a href="http://hi.baidu.com/chencruz/blog/item/fd51fcea3aa56edbd439c93c.html#comment">查看评论</a>]]></description>
        <pubDate>2009-04-05  22:54</pubDate>
        <category><![CDATA[Ubuntu]]></category>
        <author><![CDATA[chencruz]]></author>
		<guid>http://hi.baidu.com/chencruz/blog/item/fd51fcea3aa56edbd439c93c.html</guid>
</item>

<item>
        <title><![CDATA[.htaccess使用指南]]></title>
        <link><![CDATA[http://hi.baidu.com/chencruz/blog/item/a1ec1d38d4899723b9998fc2.html]]></link>
        <description><![CDATA[
		
		平生一笑 (2006年4月24日 21:46) | 评论(9) | 引用通告(2)
Apache服务器的.htaccess是一个非常强大的分布式配置文件，学会使用.htaccess，对虚拟主机用户来说，可以实现众多的功能。这里有一篇很容易让人理解的.htaccess介绍，作为入门文章非常的适合。文章最初来自freewebmasterhelp.com，QiRan作了简单的中文翻译，我将加以完善。

Part 1 – Introduction介绍
Part 2 - .htaccess Commande命令
Part 3 - Password protection密码保护
Part 1 – Introduction介绍

Introduction 介绍

In this tutorial you will find out about the .htaccess file and the power it has to improve your website. Although .htaccess is only a file, it can change settings on the servers and allow you to do many different things, the most popular being able to have your own custom 404 error pages. .htaccess isn't difficult to use and is really just made up of a few simple instructions in a text file.
从本指南中，你将可以学习到有关.htaccess文件及其功能的知识，并用以优化你的网站。尽管.htaccess只是一个文件，但它可以更改服务器的设置，允许你做许多不同的事情，最流行的功能是您可以创建自定义的“404 error”页面。.htaccess 并不难于使用，归根结底，它只是在一个text文档中添加几条简单的指令而已。

Will My Host Support It? 我的主机支持它吗？

This is probably the hardest question to give a simple answer to. Many hosts support .htaccess but don't actually publicise it and many other hosts have the capability but do not allow their users to have a .htaccess file. As a general rule, if your server runs Unix or Linux, or any version of the Apache web server it will support .htaccess, although your host may not allow you to use it.
这可能很难用简单的答案来回答。许多主机支持.htaccess，但实际上并不会特别声明，许多其他类型的主机有能力但并不允许他们的用户使用.htaccess。一般来说，如果你的主机使用Unix或Linux系统，或任何版本的Apache网络服务器，从理论上都是支持.htaccess的，尽管你的主机服务商可能不允许你使用它。

A good sign of whether your host allows .htaccess files is if they support password protection of folders. To do this they will need to offer .htaccess (although in a few cases they will offer password protection but not let you use .htaccess). The best thing to do if you are unsure is to either upload your own .htaccess file and see if it works or e-mail your web host and ask them.
判断你的主机是否允许.htaccess，一个标志很好的是它是否支持文件夹密码保护。为达到此功能，主机服务商需要使用.htaccess（当然，少数情况下他们虽提供密码保护功能，但却并不允许你使用.htaccess）。如果你不确定自己的主机是否支持.htaccess，最好的办法是上传你自己的.htaccess文件看看是否有用，或者直接发送e-mail向你的主机服务商咨询。

What Can I Do? 我该怎么做？

You may be wondering what .htaccess can do, or you may have read about some of its uses but don't realise how many things you can actually do with it.
你可能疑惑.htaccess到底能做些什么，或者你可能曾知道它的一些功能但并不真正了解你实际到底可以用它来做多少事情。

There is a huge range of things .htaccess can do including: password protecting folders, redirecting users automatically, custom error pages, changing your file extensions, banning users with certian IP addresses, only allowing users with certain IP addresses, stopping directory listings and using a different file as the index file.
.htaccess可以做大量的事情，包括：文件夹密码保护、用户自动重定向、自定义错误页面、改变你的文件扩展名、封禁特定IP地址的用户、只允许特定IP地址的用户、禁止目录列表，以及使用其他文件作为index文件。

Creating A .htaccess File 创建一个.htaccess文档

Creating a .htaccess file may cause you a few problems. Writing the file is easy, you just need enter the appropriate code into a text editor (like notepad). You may run into problems with saving the file. Because .htaccess is a strange file name (the file actually has no name but a 8 letter file extension) it may not be accepted on certain systems (e.g. Windows 3.1). With most operating systems, though, all you need to do is to save the file by entering the name as:
创建.htaccess文件也许会给你带来一些困难。写文件很容易，你只需要在文字编缉器（例如：写字板）里写下适当的代码。真正困难的可能是文件的保存，因为.htaccess是一个古怪的文件名（它事实上没有文件名，只有一个由8个字母组成的扩展名），而在一些系统（如windows 3.1）中无法接受这样的文件名。在大多数的操作系统中，你需要做的是将文档保存成名为：

".htaccess"
(including the quotes). If this doesn't work, you will need to name it something else (e.g. htaccess.txt) and then upload it to the server. Once you have uploaded the file you can then rename it using an FTP program.
（包括引号）。如果这也不行，你需要将其先命名为其它名字（例如htaccess.txt），再将其上传到服务器上，之后直接使用FTP软件来重命名。

Warning 警告

Before beginning using .htaccess, I should give you one warning. Although using .htaccess on your server is extremely unlikely to cause you any problems (if something is wrong it simply won't work), you should be wary if you are using the Microsoft FrontPage Extensions. The FrontPage extensions use the .htaccess file so you should not really edit it to add your own information. If you do want to (this is not recommended, but possible) you should download the .htaccess file from your server first (if it exists) and then add your code to the beginning.
在使用.htaccess之前，我必须给你一些警告。虽然在服务器上使用.htaccess绝对不太可能给你带来任何麻烦（如果有些东西错了，它只是没效用罢了），但如果你使用Microsoft FrontPage Extensions，就必须特别小心。因为FrontPage Extensions本身使用了.htaccess，因此你不能编辑它并加入你自己的信息。如果确实有这方面的需要（并不推荐，但是可能），你应该先从服务器上下载.htaccess文档（如果存在），之后在前面加上你的代码。

Custom Error Pages 自定义错误页

The first use of the .htaccess file which I will cover is custom error pages. These will allow you to have your own, personal error pages (for example when a file is not found) instead of using your host's error pages or having no page. This will make your site seem much more professional in the unlikely event of an error. It will also allow you to create scripts to notify you if there is an error (for example I use a PHP script on Free Webmaster Help to automatically e-mail me when a page is not found).
我要介绍的.htaccess的第一个应用是自定义错误页面，这将使你可以拥有自己的、个性化的错误页面（例如找不到文件时），而不是你的服务商提供的错误页或没有任何页面。这会让你的网站在出错的时候看上去更专业。你还可以利用脚本程序在发生错误的时候通知你（例如我使用Free Webmaster Help的PHP脚本程序，当找不到页面的时候自动e-mail给我）。

You can use custom error pages for any error as long as you know its number (like 404 for page not found) by adding the following to your .htaccess file:
你所知道的任何页面错误代码（像404找不到页面），都可以通过在.htaccess文件里加入下面的文字将其变成自定义页面：

rrorDocument errornumber /file.html
For example if I had the file notfound.html in the root direct
ory of my site and I wanted to use it for a 404 error I would use:
举例来说，如果我的根目录下有一个nofound.html文件，我想使用它作为404 error的页面：

ErrorDocument 404 /notfound.html
If the file is not in the root directory of your site, you just need to put the path to it:
如果文件不在网站的根目录下，你只需要把路径设置为：

ErrorDocument 500 /errorpages/500.html
These are some of the most common errors:
以下是一些最常用的错误：

401 - Authorization Required 需要验证
400 - Bad request 错误请求
403 - Forbidden 禁止
500 - Internal Server Error 内部服务器错误
404 - Wrong page 找不到页面
Then, all you need to do is to create a file to display when the error happens and upload it and the .htaccess file.
接下来，你要做的只是创建一个错误发生时显示的文件，然后把它们和.htaccess一起上传。

Part 2 - .htaccess 命令

Introduction 介绍

In the last part I introduced you to .htaccess and some of its useful features. In this part I will show you how to use the .htaccess file to implement some of these.
在上一部分，我已经简单介绍了.htaccess以及它的一些有用功能，在这一部分，我将向你演示如何使用.htaccess文档去实现这些功能。

Stop A Directory Index From Being Shown 停示显示目录列表

Sometimes, for one reason or another, you will have no index file in your directory. This will, of course, mean that if someone types the directory name into their browser, a full listing of all the files in that directory will be shown. This could be a security risk for your site.
有些时候，由于某种原因，你的目录里没有index文件，这意味着当有人在浏览器地址栏键入了该目录的路径，该目录下所有的文件都会显示出来，这会给你的网站留下安全隐患。

To prevent against this (without creating lots of new 'index' files, you can enter a command into your .htaccess file to stop the directory list from being shown:
为避免这种情况（而不必创建一堆的新index文件），你可以在你的.htaccess文档中键入以下命令，用以阻止目录列表的显示：

Options -Indexes
Deny/Allow Certian IP Addresses 阻止/允许特定的IP地址

In some situations, you may want to only allow people with specific IP addresses to access your site (for example, only allowing people using a particular ISP to get into a certian directory) or you may want to ban certian IP addresses (for example, keeping disruptive memembers out of your message boards). Of course, this will only work if you know the IP addresses you want to ban and, as most people on the internet now have a dynamic IP address, so this is not always the best way to limit usage.
某些情况下，你可能只想允许某些特定IP的用户可以访问你的网站（例如：只允许使用特定ISP的用户进入某个目录），或者想封禁某些特定的IP地址（例如：将低级用户隔离于你的信息版面外）。当然，这只在你知道你想拦截的IP地址时才有用，然而现在网上的大多数用户都使用动态IP地址，所以这并不是限制使用的常用方法。

You can block an IP address by using:
你可以使用以下命令封禁一个IP地址：

deny from 000.000.000.000
where 000.000.000.000 is the IP address. If you only specify 1 or 2 of the groups of numbers, you will block a whole range.
这里的000.000.000.000是被封禁的IP地址，如果你只指明了其中的几个，则可以封禁整个网段的地址。如你输入210.10.56.，则将封禁210.10.56.0～210.10.56.255的所有IP地址。

You can allow an IP address by using:
你可以使用以下命令允许一个IP地址访问网站：

allow from 000.000.000.000
where 000.000.000.000 is the IP address. If you only specify 1 or 2 of the groups of numbers, you will allow a whole range.
被允许的IP地址则为000.000.000.000，你可以象封禁IP地址一样封禁整个网段。

If you want to deny everyone from accessing a directory, you can use:
如果你想阻止所有人访问该目录，则可以使用：

deny from all
but this will still allow scripts to use the files in the directory.
不过这并不影响脚本程序使用这个目录下的文档。

Alternative Index Files 替换index文件

You may not always want to use index.htm or index.html as your index file for a directory, for example if you are using PHP files in your site, you may want index.php to be the index file for a directory. You are not limited to 'index' files though. Using .htaccess you can set foofoo.blah to be your index file if you want to!
也许你不想一直使用index.htm或index.html作为目录的索引文件。举例来说，如果你的站点使用PHP文件，你可能会想使用index.php来作为该目录的索引文档。当然也不必局限于“index”文档，如果你愿意，使用.htaccess你甚至能够设置foofoo.balh来作为你的索引文档！

Alternate index files are entered in a list. The server will work from left to right, checking to see if each file exists, if none of them exisit it will display a directory listing (unless, of course, you have turned this off).
这些互为替换的索引文件可以排成一个列表，服务器会从左至右进行寻找，检查哪个文档在真实的目录中存在。如果一个也找不到，它将会把目录列表显示出来（除非你已经关闭了显示目录文件列表）。

DirectoryIndex index.php index.php3 messagebrd.pl index.html index.htm
Redirection 重定向

One of the most useful functions of the .htaccess file is to redirect requests to different files, either on the same server, or on a completely different web site. It can be extremely useful if you change the name of one of your files but allow users to still find it. Another use (which I find very useful) is to redirect to a longer URL, for example in my newsletters I can use a very short URL for my affiliate links. The following can be done to redirect a specific file:
.htaccess最有用的功能之一就是将请求重定向到同站内或站外的不同文档。这在你改变了一个文件名称，但仍然想让用户用旧地址访问到它时，变的极为有用。另一个应用（我发现的很有用的）是重定向到一个长URL，例如在我的时事通讯中，我可以使用一个很简短的URL来指向我的会员链接。以下是一个重定向文件的例子：

Redirect /location/from/root/file.ext
http://www.othersite.com/new/file/location.xyz
In this above example, a file in the root directory called oldfile.html would be entered as:
上述例子中，访问在root目录下的名为oldfile.html可以键入：

/oldfile.html
and a file in the old subdirectory would be entered as:
访问一个旧次级目录中的文件可以键入：

/old/oldfile.html
You can also redirect whole directoires of your site using the .htaccess file, for example if you had a directory called olddirectory on your site and you had set up the same files on a new site at: http://www.newsite.com/newdirectory/ you could redirect all the files in that directory without having to specify each one:
你也可以使用.htaccess重定向整个网站的目录。假如你的网站上有一个名为olddirectory的目录，并且你已经在一个新网站 http://www.newsite.com/newdirectory/上建立了与上相同的文档，你可以将旧目录下所有的文件做一次重定向而不必一一声明：

Redirect /olddirectory http://www.newsite.com/newdirectory
Then, any request to your site below /olddirectory will bee redirected to the new site, with the
extra information in the URL added on, for example if someone typed in:
这样，任何指向到站点中/olddirectory目录的请求都将被重新指向新的站点，包括附加的额外URL信息。例如有人键入：

http://www.youroldsite.com/olddirecotry/oldfiles/images/image.gif
They would be redirected to:
请求将被重定向到：

http://www.newsite.com/newdirectory/oldfiles/images/image.gif
This can prove to be extremely powerful if used correctly.
如果正确使用，此功能将极其强大。

Part 3 – 密码保护

Introduction 介绍

Although there are many uses of the .htaccess file, by far the most popular, and probably most useful, is being able to relaibly password protect directories on websites. Although JavaScript etc. can also be used to do this, only .htaccess has total security (as someone must know the password to get into the directory, there are no 'back doors')
尽管有各种各样的.htaccess用法，但至今最流行的也可能是最有用的做法是将其用于网站目录可靠的密码保护。尽管JavaScrip等也能做到，但只有.htaccess具有完美的安全性（即访问者必须知晓密码才可以访问目录，并且绝无“后门”可走）。

The .htaccess File 密码保护的.htaccess文件

Adding password protection to a directory using .htaccess takes two stages. The first part is to add the appropriate lines to your .htaccess file in the directory you would like to protect. Everything below this directory will be password protected:
利用.htaccess将一个目录加上密码保护分两个步骤。第一步是在你的.htaccess文档里加上适当的几行代码，再将.htaccess文档放进你要保护的目录下：

AuthName "Section Name"
AuthType Basic
AuthUserFile /full/path/to/.htpasswd
Require valid-user
There are a few parts of this which you will need to change for your site. You should replace "Section Name" with the name of the part of the site you are protecting e.g. "Members Area".
你可能需要根据你的网站情况修改一下上述内容中的一些部分，如用被保护部分的名字"Members Area"，替换掉“Section Name”。

The /full/parth/to/.htpasswd should be changed to reflect the full server path to the .htpasswd file (more on this later). If you do not know what the full path to your webspace is, contact your system administrator for details.
/full/parth/to/.htpasswd则应该替换为指向.htpasswd文件（后面详述该文档）的完整服务器路径。如果你不知道你网站空间的完整路径，请询问一下你的系统管理员。

The .htpasswd File 密码保护的.htpasswd文件

Password protecting a directory takes a little more work than any of the other .htaccess functions because you must also create a file to contain the usernames and passwords which are allowed to access the site. These should be placed in a file which (by default) should be called .htpasswd. Like the .htaccess file, this is a file with no name and an 8 letter extension. This can be placed anywhere within you website (as the passwords are encrypted) but it is advisable to store it outside the web root so that it is impossible to access it from the web.
目录的密码保护比.htaccess的其他功能要麻烦些，因为你必须同时创建一个包含用户名和密码的文档，用于访问你的网站，相关信息（默认）位于一个名为.htpasswd的文档里。像.htaccess一样，.htpasswd也是一个没有文件名且具有8位扩展名的文档，可以放置在你网站里的任何地方（此时密码应加密），但建议你将其保存在网站Web根目录外，这样通过网络就无法访问到它了。

Entering Usernames And Passwords 输入用户名和密码

Once you have created your .htpasswd file (you can do this in a standard text editor) you must enter the usernames and passwords to access the site. They should be entered as follows:
创建好.htpasswd文档后（可以通过文字编辑器创建），下一步是输入用于访问网站的用户名和密码，应为：

username:password
where the password is the encrypted format of the password. To encrypt the password you will either need to use one of the premade scripts available on the web or write your own. There is a good username/password service at the KxS site which will allow you to enter the user name and password and will output it in the correct format.
“password”的位置应该是加密过的密码。你可以通过几种方法来得到加密过的密码：一是使用一个网上提供的permade脚本或自己写一个；另一个很不错的username/password加密服务是通过KxS网站，这里允许你输入用户名及密码，然后生成正确格式的密码。

For multiple users, just add extra lines to your .htpasswd file in the same format as the first. There are even scripts available for free which will manage the .htpasswd file and will allow automatic adding/removing of users etc.
对于多用户，你只需要在.htpasswd文档中新增同样格式的一行即可。另外还有一些免费的脚本程序可以方便地管理.htpasswd文档，可以自动新增/移除用户等。

Accessing The Site 访问网站

When you try to access a site which has been protected by .htaccess your browser will pop up a standard username/password dialog box. If you don't like this, there are certain scripts available which allow you to embed a username/password box in a website to do the authentication. You can also send the username and password (unencrypted) in the URL as follows:
当你试图访问被.htaccess密码保护的目录时，你的浏览器会弹出标准的username/password对话窗口。如果你不喜欢这种方式，有些脚本程序可以允许你在页面内嵌入username/password输入框来进行认证，你也可以在浏览器的URL框内以以下方式输入用户名和密码（未加密的）：

http://username:password@www.website.com/directory/
Summary 小结

.htaccess is one of the most useful files a webmaster can use. There are a wide variety of different uses for it which can save time and increase security on your website.
.htaccess是一个站点管理员可以应用的强大工具，有更多的变化以适应不同的用途，可以节约时间及提高网站的安全性。

相关阅读：
KxS Password Encrypter
Apache .htaccess Documentation
More .htaccess Sites
Related Reading
.htaccess的特别说明
启用.htaccess，需要修改httpd.conf，启用AllowOverride，并可以用AllowOverride限制特定命令的使用
如果需要使用.htaccess以外的其他文件名，可以用AccessFileName指令来改变。例如，需要使用.config ，则可以在服务器配置文件中按以下方法配置：
AccessFileName .config
一般情况下，不应该使用.htaccess文件，除非你对主配置文件没有访问权限。有一种很常见的误解，认为用户认证只能通过.htaccess文件实现，其实并不是这样，把用户认证写在主配置文件中是完全可行的，而且是一种很好的方法。.htaccess文件应该被用在内容提供者需要针对特定目录改变服务器的配置而又没有root权限的情况下。如果服务器管理员不愿意频繁修改配置，则可以允许用户通过.htaccess文件自己修改配置，尤其是ISP在同一个机器上运行了多个用户站点，而又希望用户可以自己改变配置的情况下。虽然如此，一般都应该尽可能地避免使用.htaccess文件。任何希望放在.htaccess文件中的配置，都可以放在主配置文件的<directory>段中，而且更高效。避免使用.htaccess文件有两个主要原因，即性能和安全。 <a href="http://hi.baidu.com/chencruz/blog/item/a1ec1d38d4899723b9998fc2.html">阅读全文</a>
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/chencruz/blog/category/Cms">Cms</a>&nbsp;<a href="http://hi.baidu.com/chencruz/blog/item/a1ec1d38d4899723b9998fc2.html#comment">查看评论</a>]]></description>
        <pubDate>2008-12-27  23:19</pubDate>
        <category><![CDATA[Cms]]></category>
        <author><![CDATA[chencruz]]></author>
		<guid>http://hi.baidu.com/chencruz/blog/item/a1ec1d38d4899723b9998fc2.html</guid>
</item>

<item>
        <title><![CDATA[.htaccess文件]]></title>
        <link><![CDATA[http://hi.baidu.com/chencruz/blog/item/ac3557d92560292b10df9bc4.html]]></link>
        <description><![CDATA[
		
		Apache系统中的.htaccess文件(或者”分布式配置文件”提供了针对目录改变配置的方法， 即，在一个特定的文档目录中放置一个包含一个或多个指令的文件， 以作用于此目录及其所有子目录。作为用户，所能使用的命令受到限制。管理员可以通过Apache的AllowOverride指令来设置。

　　子目录中的指令会覆盖更高级目录或者主服务器配置文件中的指令。

　　.htaccess必须以ASCII模式上传，最好将其权限设置为644。

　　错误文档的定位

　　常用的客户端请求错误返回代码：
　　401 Authorization Required
　　403 Forbidden
　　404 Not Found
　　405 Method Not Allowed
　　408 Request Timed Out
　　411 Content Length Required
　　412 Precondition Failed
　　413 Request Entity Too Long
　　414 Request URI Too Long
　　415 Unsupported Media Type

　　常见的服务器错误返回代码：
　　500 Internal Server Error

　　用户可以利用.htaccess指定自己事先制作好的错误提醒页面。一般情况下，人们可以专门设立一个目录，例如errors放置这些页面。然后再.htaccess中，加入如下的指令：

　　ErrorDocument 404 /errors/notfound.html
　　ErrorDocument 500 /errors/internalerror.html

　　一条指令一行。上述第一条指令的意思是对于404，也就是没有找到所需要的文档的时候得显示页面为/errors目录下的notfound.html页面。不难看出语法格式为：

　　ErrorDocument 错误代码 /目录名/文件名.扩展名

　　如果所需要提示的信息很少的话，不必专门制作页面，直接在指令中使用HTML号了，例如下面这个例子：

　　ErrorDocument 401 “你没有权限访问该页面，请放弃！”

　　文档访问的密码保护

　　要利用.htaccess对某个目录下的文档设定访问用户和对应的密码，首先要做的是生成一个.htpasswd的文本文档，例如：

　　zheng:y4E7Ep8e7EYV

　　这里密码经过加密，用户可以自己找些工具将密码加密成.htaccess支持的编码。该文档最好不要放在www目录下，建议放在www根目录文档之外，这样更为安全些。

　　有了授权用户文档，可以在.htaccess中加入如下指令了：

　　AuthUserFile .htpasswd的服务器目录
　　AuthGroupFile /dev/null （需要授权访问的目录）
　　AuthName EnterPassword
　　AuthType Basic （授权类型）

　　require user wsabstract （允许访问的用户，如果希望表中所有用户都允许，可以使用 require valid-user）

　　注，括号部分为学习时候自己添加的注释

　　拒绝来自某个IP的访问

　　如果我不想某个政府部门访问到我的站点的内容，那可以通过.htaccess中加入该部门的IP而将它们拒绝在外。

　　例如：

　　order allow,deny
　　deny from 210.10.56.32
　　deny from 219.5.45.
　　allow from all

　　第二行拒绝某个IP，第三行拒绝某个IP段，也就是219.5.45.0~219.2.45.255

　　想要拒绝所有人？用deny from all好了。不止用IP，也可以用域名来设定。

　　保护.htaccess文档

　　在使用.htaccess来设置目录的密码保护时，它包含了密码文件的路径。从安全考虑，有必要把.htaccess也保护起来，不让别人看到其中的内容。虽然可以用其他方式做到这点，比如文档的权限。不过，.htaccess本身也能做到，只需加入如下的指令：

　　order allow,deny
　　deny from all

　　URL转向

　　我们可能对网站进行重新规划，将文档进行了迁移，或者更改了目录。这时候，来自搜索引擎或者其他网站链接过来的访问就可能出错。这种情况下，可以通过如下指令来完成旧的URL自动转向到新的地址：

　　Redirect /旧目录/旧文档名 新文档的地址

　　或者整个目录的转向：

　　Redirect 旧目录 新目录

　　改变缺省的首页文件

　　一般情况下缺省的首页文件名有default、index等。不过，有些时候目录中没有缺省文件，而是某个特定的文件名，比如在pmwiki中是pmwiki.php。这种情况下，要用户记住文件名来访问很麻烦。在.htaccess中可以轻易的设置新的缺省文件名：

　　DirectoryIndex 新的缺省文件名

　　也可以列出多个，顺序表明它们之间的优先级别，例如：

　　DirectoryIndex filename.html index.cgi index.pl default.htm

　　防止盗链

　　如果不喜欢别人在他们的网页上连接自己的图片、文档的话，也可以通过htaccess的指令来做到。

　　所需要的指令如下：

　　RewriteEngine on
　　RewriteCond %{ HTTP_REFERER } !^$
　　RewriteCond %{ HTTP_REFERER } !^http://(www.)?mydomain.com/.*$ [NC]
　　RewriteRule .(gif&line;jpg)$ - [F]

　　如果觉得让别人的页面开个天窗不好看，那可以用一张图片来代替：

　　RewriteEngine on
　　RewriteCond %{ HTTP_REFERER } !^$
　　RewriteCond %{ HTTP_REFERER } !^http://(www.)?mydomain.com/.*$ [NC]
　　RewriteRule .(gif&line;jpg)$ http://www.mydomain.com/替代图片文件名 [R,L] 

原创文章如转载，请注明：转载自月光博客 [ http://www.williamlong.info/ ] 

 <a href="http://hi.baidu.com/chencruz/blog/item/ac3557d92560292b10df9bc4.html">阅读全文</a>
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/chencruz/blog/category/Cms">Cms</a>&nbsp;<a href="http://hi.baidu.com/chencruz/blog/item/ac3557d92560292b10df9bc4.html#comment">查看评论</a>]]></description>
        <pubDate>2008-12-27  23:09</pubDate>
        <category><![CDATA[Cms]]></category>
        <author><![CDATA[chencruz]]></author>
		<guid>http://hi.baidu.com/chencruz/blog/item/ac3557d92560292b10df9bc4.html</guid>
</item>

<item>
        <title><![CDATA[用WINRAR巧妙分割大压缩包]]></title>
        <link><![CDATA[http://hi.baidu.com/chencruz/blog/item/f1c824dfa47ac114622798e6.html]]></link>
        <description><![CDATA[
		
		用WINRAR巧妙分割大压缩包
http://tech.sina.com.cn 2000/12/06  中国电脑教育报 莫治雄
　　当您从网上下载了一个大压缩包后，要用软盘传到另一台没有联网的机器上使用时，必须把它分割成软盘能够容纳得下的若干个小文件。通常的方法是使用文件分割软件，如AXMAN 等。其实，使用WinRAR 的分卷压缩功能就可达到此目的，且方便快捷。下面介绍具体的操作方法：

　　1、启动WinRAR ，显示WinRAR 的主操作界面如上图。请注意，不能使用右键快捷菜单启动，因为这样做只能解压而不能分割压缩包。

　　2、必要时，从WinRAR 主操作界面的“File”菜单上选择“Change drive”选项，改变磁盘驱动器；或选择“Browse for folder”选项，改变文件夹。

　　3、选定要分割的压缩包。

　　4、从“Commands”菜单上选择“Add files toarchive”选项，弹出上图所示的对话框。

　　5、在“Archive”输入框中输入档案文件名(也可使用默认设置)。必要时，可以单击“Browse”按钮，选择档案存放的文件夹。

　　6、在对话框中选中“Create SFX archive”和“Create solid archive”复选框；在“Volume size”下拉列表中选择卷大小，例如使用3英寸软盘，选1，457，500。

　　7、单击“OK”按钮即可对选定的压缩包进行分卷压缩，达到分割大文件的目的。分割后，自动以*.exe、*.r00、*.r01、*.r02…为名存于硬盘上(本例是Flash4.exe、Flash4.r00、Flash4.r01、Flash4.r02等)，把它们拷贝到软盘上，即可把这个大压缩包传送到其他机器上使用。

　　8、要把分割后的小文件还原为原来的压缩包，只要把所有文件拷贝到硬盘上，执行其中的可执行文件(.exe)即可。 <a href="http://hi.baidu.com/chencruz/blog/item/f1c824dfa47ac114622798e6.html">阅读全文</a>
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/chencruz/blog/category/%CD%F8%D5%AA">网摘</a>&nbsp;<a href="http://hi.baidu.com/chencruz/blog/item/f1c824dfa47ac114622798e6.html#comment">查看评论</a>]]></description>
        <pubDate>2008-12-03  19:18</pubDate>
        <category><![CDATA[网摘]]></category>
        <author><![CDATA[chencruz]]></author>
		<guid>http://hi.baidu.com/chencruz/blog/item/f1c824dfa47ac114622798e6.html</guid>
</item>

<item>
        <title><![CDATA[安装 VM tool 解决鼠标在虚拟机中移动不便的问题]]></title>
        <link><![CDATA[http://hi.baidu.com/chencruz/blog/item/72e300fa3c14438e9f5146a1.html]]></link>
        <description><![CDATA[
		
		大家好，我是bluewinter(Winter).今天在折腾半天后终于在虚拟机中的Ubuntu中安装上了VMware tool.。请高手不要笑话，也请帮忙看下我写的是否有问题，以帮助更多的新人更好的在虚拟机下面使用好Ubuntu.

那么我们首先先介绍一下什么是VMware tool，和他到底能干什么？我们为什么要装这个工具。

我看了一下官方的介绍，小弟不是计算机专业，英语也不怎么样，将就翻译给大家看看。

VMware tool是一套用于提高安装在虚拟机中的操作系统性能的组件，并能改善虚拟机的管理能力。安装VMware tool在客户操作系统中（就是你安装在虚拟机中的操作系统）是及其重要的。尽管你可以在没有安装VMware tool的客户操作系统中工作，但是你将失去强大的功能和便利性。具体他后面说的那么多，有些也是太过专业，那么就让我以新手使用的身份来说说，装了VMware tool和没有装有多大的区别。最大的区别就是在没有装之前，你的鼠标在进入UBUNTU后想要随便的从你的操作系统到虚拟机中切换是不可能的，我们需要按Ctrl+Alt才可以，而且在虚拟机中的全屏模式下有的时候你会发现有的时候你的鼠标不听使唤，会感觉有一个无形的“框”在束缚着你。而装了以后，这样的烦恼消失了，你可以任意的在你的虚拟机于本机之间随意让鼠标走动。其余的功能还在发现中，敬请期待我的下篇小记哦。

来让我们看看在安装VMware tool的时候，都安装了些什么东西

VMware Tools service

可以传递虚拟机与主机之间的消息
可以通过在虚拟机上面的关闭或者重启指令来控制虚拟机中的操作系统（我的理解就是在虚拟机控制台上面的标签点击右键的菜单选择关闭或者重启，虚拟机中的操作系统会执行关机或者重启的指令）
与VM Server相联系，如果你装了Server的话
同步你的虚拟机与主机之间的时间
可以运行一些脚本让虚拟机自动操作，而且这些脚本可以在虚拟机关闭的时候运行
一组VMware设备的驱动
SVGA的设备驱动（显示驱动嘛，大家都知道吧）
VMNET网络连接驱动（和主机连接的网络驱动）
BUS SCSI驱动（SCSI的驱动）
Vmware的鼠标驱动
共享夹的核心驱动（用来在主机和虚拟机中使用共享文件夹功能的），在LINUX中叫做vmhgfs
Vmware的用户进程

开启了在虚拟机与主机之间任意的复制粘贴功能。（不用我多解释吧）
开启了在虚拟机与主机之间任意拖拽文件的功能。（这个功能很强大）
Vmware Tool 的控制面板

允许你连接或者不连接虚拟设备，可以修改你的设置。
OK,让我们看看在Ubuntu下是如何把这个东西安装上去的，那么其实这样一个组件的安装是通过ISO镜像在虚拟机中启动这样一个方式来安装的。所以，最好你的虚拟机的光驱是有的而且是设置成启用的，当你的Ubuntu启动好以后（一定要启动并登录后哦），我们在虚拟机控制台上面的菜单栏找到VM然后下面选择Install VMware Tools，在这里我说一下我的VM的版本号6.03。其实这个安装方法是大同小异的，大家不用那么在意。

好了，这个时候你会看到一个对话框出现了，他的意思就是说，一定要在你的虚拟机中的操作系统启动好以后，才可以安装。OK，我们点击Intall。

此时，你会发现你的Ubuntu桌面上出现了一个叫做VMware Tools的DVD光盘图标，OK这个时候VMware Tools镜像已经加载了。

双击你的VMware Tools。你会发现，里面有2个文件，一个叫做VMwareTools-6.0.3-80004.i386.rpm另一个叫做VMwareTools-6.0.3-80004.tar.gz那么根据你的VM的版本号的不同，也许这2个文件的名字有可能有一点不一样，不过没有关系，我们都是装嘛。呵呵。

 

知识链接

问题1：什么是RPM包

RPM（全称为Red Hat Package Manager，亦称为The RPM Package Manager）是在Linux下广泛使用的软件包管理器。最早由Red Hat研制，现在也由开源社区开发。RPM通常随附于Linux发行版，在Fedora 、Redhat、Mandriva、SuSE、YellowDog等主流发行版本，以及在这些版本基础上二次开发出来的发行版采用，但也有单独将RPM作为应用软件发行的发行版（例如Gentoo）。 RPM仅适用于安装用RPM来打包的软件，目前是GNU/Linux下软件包资源最丰富的软件包类型。

问题2：什么是tar.gz

tar.gz就是用tar和gzip压缩后的文件扩展名（大家有兴趣的话可以自己做一个压缩包来看看）

这个时候，我们把2个文件复制出来，到我们的/tmp下面去（选中2个文件──复制──点击位置──计算机──文件系统──tmp──粘贴）（我笨，不晓得其他的方法，老土一点了了哦，呵呵）

关于RPM安装包，默认情况下，在Ubuntu下面双击是没有用的，那么我们还是打开终端（应用程序──附件──终端）在终端下面输入（等等，为了方便我们使用，我们把文件名修改一下，在VMwareTools-6.0.3-80004.i386.rpm上面点击右键──重命名──vmrpm 注意2点，1是在Linux下是区分大小写的，如果你重新命名是大些的话，一会在终端下面输入就要是大写，小写也一样，一定要保持一致.2是不要把后缀名给去掉了哦，就是不要修改.rpm部分）好了，这个时候我们输入
sudo rpm -i /tmp/vmrpm.rpm
（这个地方我说一下，我没有成功，他说我软件依赖失败，我可能是没有装某个软件的原因，后来上论坛看别人装了alien后使用，貌似也没有成功，这一点请高手补充一下。）

那我们来看VMwareTools-6.0.3-80004.tar.gz 这个压缩包，我们双击文件 ，这个时候我们可以看到里面有一个vmware-tools-distrib的文件夹，点击这个文件夹，然后点击上面的解压缩，然后我们看到位置一栏，我们点击文件系统，下拉，看到tmp──双击──解压缩。

好了这个时候，我们看到在你的/tmp文件夹里面多了一个叫做vmware-tools-distrib的文件夹，好了，为了方便我们使用，我们重命名一下他，右键──重命名──vm，我们双击进去，看到一个叫做vmware-install.pl的文件。这个就是我们需要的文件了，这时，我们打开终端输入
sudo /tmp/vm/vmware-install.pl
好了。在输入你的管理员密码以后，程序开始启动了，如果你不想了解具体的信息（也就是安装在什么位置），一路回车就可以了。在安装好以后，重启你的计算机，哈哈。VMware Tools就已经在你的Ubuntu中运行了。

等等，登录后报错？没有关系，是你改变了硬件驱动的原因（如上面所说，我们安装了一组新的VM驱动）重启就可以解决问题了。但是在重启之前，我们还需要做一件事情，细心的你可能会发现你的鼠标滚轮不能使用了，呵呵，我来教你解决，点击位置──计算机──文件系统──双击etc──双击X11──右键点击xorg.conf（这里要等等了，我们需要安装一个小软件才能方便我们以管理员的身份来修改这个文件，不然会说我们没有权限，OK.我们在终端中输入
sudo apt-get install nautilus-gksu
安装好以后，我们接着看）──以管理员打开──找到Section "InputDevice"语句──往下看到Option "Protocol""PS/2"一行──我们在PS/2前面加上IM──点击保存──重启。

OK，快进入你的Ubuntu吧。鼠标正常使用，看看是不是比以前方便了很多呢，其实VMware Tools还有其他的很多功能我们没有用上，大家可以自己慢慢的发掘，并交流经验了。

感谢是非和Disappear <a href="http://hi.baidu.com/chencruz/blog/item/72e300fa3c14438e9f5146a1.html">阅读全文</a>
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/chencruz/blog/category/Ubuntu">Ubuntu</a>&nbsp;<a href="http://hi.baidu.com/chencruz/blog/item/72e300fa3c14438e9f5146a1.html#comment">查看评论</a>]]></description>
        <pubDate>2008-11-24  20:37</pubDate>
        <category><![CDATA[Ubuntu]]></category>
        <author><![CDATA[chencruz]]></author>
		<guid>http://hi.baidu.com/chencruz/blog/item/72e300fa3c14438e9f5146a1.html</guid>
</item>

<item>
        <title><![CDATA[linux下PPPOE拨号共享上网(linux ADSL ppoe 拨号)]]></title>
        <link><![CDATA[http://hi.baidu.com/chencruz/blog/item/7bb0634e09d9e90eb2de0509.html]]></link>
        <description><![CDATA[
		
		linux下PPPOE拨号共享上网 
出处    

1、 网卡配置。 
两块网卡，eth0为拨号网卡，IP：192.168.1.1（其他的地址也可）；eth1为内网网卡，IP：192.168.0.1。掩码均为255.255.255.0。 局域网网段为192.168.0.0。 
注意：此处两块网卡均不能设网关。 
2、 PPPoE软件的升级与安装 
1） 在 http://www.roaringpenguin.com/pppoe/#download 下载 
2） 安装rp-pppoe。以root身份执行 
rpm –Uvh rp-pppoe-3.5-1.i386.rpm 
3、 修改/etc/ sysctl.conf 
将其中的 
net.ipv4.ip_forward = 0 
改为 
net.ipv4.ip_forward = 1 
4、 去除ipchains模块，只选择iptables方法如下： 
1）setup 
2）选择system service 
3）去除ipchains 
4）选中iptables 
5）重启机器 
5、 PPPoE客户端配置 
在rp-pppoe-3.5-1.i386.rpm安装完毕后，接下来就可进行PPPoE客户端配置了。过程如下。 
#/usr/sbin/adsl-setup 
&gt;&gt;&gt; Enter your PPPoE user name: ——此处输入拨号帐号的用户名 
&gt;&gt;&gt; Enter the Ethernet interface connected to the ADSL modem For Solaris, this is likely to be something like /dev/hme0. For Linux, it will be ethn, where n is a number. (default eth0): ——输eth0 
&gt;&gt;&gt; Enter the demand value (default no): ——输no 
&gt;&gt;&gt; Enter the DNS information here: ——输210.52.149.2（视当地运营商的DNS服务器IP而定）
&gt;&gt;&gt; Please enter your PPPoE password: ——输网通用户口令 
&gt;&gt;&gt; Choose a type of firewall (0-2): ——输0 
&gt;&gt;&gt; Accept these settings and adjust configuration files (y/n)? ——输y 
6、 启动拨号连接 
/usr/sbin/adsl-start 
成功连接后，屏幕显示Connected。 
此时这台linux已可以上网浏览了。 
7、 IP伪装 
为了使局域网中的其他机器能通过Linux服务器共享上网，至少须执行下面的命令： 
iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE 
完成后，在192.168.0.0网段（网关为192.168.0.1）的PC机就可透过Linux上网了！ 
8、 开机自启动 
为了使Linux服务器能够自动拨号，执行下面步骤。 
1）chkconfig --add adsl 
2）setup 
3）选择system services 
4）选中ADSL 
5）OK退出 
6）打开/etc/rc.d/rc.local，在该文件的末尾添上下面语句 
echo "[OK]" 
echo "Drop ICMP form anywhere" 
echo 1 &gt; /proc/sys/net/ipv4/icmp_echo_ignore_all 
echo "[OK]" 
iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE 
说明：前面四句用于关闭ICMP，防止别人Ping。 
9、 至此，一切OK，一个简单的拨号建成了。重启机器后，发现linux的internet共享连接已经一切就绪了，好妙！！！ 
为了建立更安全的拨号连接，请再设置各种安全机制，具体可参看本站iptables实战记录及NAT HowTo 简体中文版。

作者Blog：http://blog.csdn.net/lidaibin/ <a href="http://hi.baidu.com/chencruz/blog/item/7bb0634e09d9e90eb2de0509.html">阅读全文</a>
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/chencruz/blog/category/Ubuntu">Ubuntu</a>&nbsp;<a href="http://hi.baidu.com/chencruz/blog/item/7bb0634e09d9e90eb2de0509.html#comment">查看评论</a>]]></description>
        <pubDate>2008-11-24  17:52</pubDate>
        <category><![CDATA[Ubuntu]]></category>
        <author><![CDATA[chencruz]]></author>
		<guid>http://hi.baidu.com/chencruz/blog/item/7bb0634e09d9e90eb2de0509.html</guid>
</item>

<item>
        <title><![CDATA[编辑词条施密特]]></title>
        <link><![CDATA[http://hi.baidu.com/chencruz/blog/item/4fc08d999fa25a0f6f068ceb.html]]></link>
        <description><![CDATA[
		
		编辑词条施密特

编辑本段GoogleCEO

　　Google首席执行官埃里克-施密特在IT业阅历丰富。他拥有普林斯顿大学电子电气工程师学士学位，同时有加州大学伯克利分校的计算机科学学士学位和博士学位，在教育、学术和理论上都是一流水准。毕业后，他首先任职于美国齐格洛公司和贝尔实验室，前者是IT业内著名的Z80系列CPU的设计公司，后者是电信业巨子贝尔的研发基地。他还在IT业的技术圣地施乐的计算机科学 
　　实验室担任过研究工作。
　　1983年，施密特加盟Sun，先后担任首席技术官和首席执行官。他领导开发了Sun的独立编程技术平台，将Java变成Sun有史以来最强大的市场武器。他积极推行网络软件战略，为Sun在90年代初的高速发展打下基础。1997年，施密特受雇于Novell公司，任公司主席兼CEO，主管公司战略规划、管理和技术研发。施密特很快将Novell重新打造成一个赢利的公司，但是随着互联网泡沫破灭，Novell重新陷入巨额亏损的境地。就在他离开的那个季度，Novell亏损1.42亿美元。出于对施密特的尊敬，Novell公司建议让施密特去Google后仍然担任Novell董事会主席。
　　施密特来到Google的时候，公司只有200名员工，而且刚刚盈利。施密特是被风险投资家引荐给Google的，在此之前，他是Novell网络公司的董事会主席兼首席执行官。在两年多时间里。施密特使Google员工数量突破了一千人 <a href="http://hi.baidu.com/chencruz/blog/item/4fc08d999fa25a0f6f068ceb.html">阅读全文</a>
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/chencruz/blog/category/%C8%CB%CE%EF">人物</a>&nbsp;<a href="http://hi.baidu.com/chencruz/blog/item/4fc08d999fa25a0f6f068ceb.html#comment">查看评论</a>]]></description>
        <pubDate>2008-11-08  20:29</pubDate>
        <category><![CDATA[人物]]></category>
        <author><![CDATA[chencruz]]></author>
		<guid>http://hi.baidu.com/chencruz/blog/item/4fc08d999fa25a0f6f068ceb.html</guid>
</item>

<item>
        <title><![CDATA[CSS 中的黄金分割率]]></title>
        <link><![CDATA[http://hi.baidu.com/chencruz/blog/item/c3dc39d712b781daa044dfe4.html]]></link>
        <description><![CDATA[
		
		35公里 写道 "这是一位叫做 Christos Chiotis的希腊Web设计师发表在 CssGlobe 的一篇文章，讲述了黄金分割率在CSS中的应用。黄金分割率是一个应用广泛的数学常数，大约为 1.6180339887。黄金分割率用在Web设计中，可以为设计带来更多视觉上的和谐。在一个简单的两栏式页面布局中，使用两个容器，第一个容器用来显示主要内容，第二个容器显示侧条。比如，页面宽度为 960 px，使用黄金分割率，主内容容器的宽度应该为 960 / 1.62 = 593 px，而侧条的宽度为 960-593=367px。作者建议，在 Web 排版与布局中可以使用以下基本 CSS 设置：
line-height = font-size * 1.62
paragraph margin = paragraph line-height * 1.62 / 2
header’s margin-top = headers line-height * 1.62
不过对中文而言，至少 font-size 和 line-height 之间使用黄金分割率是不适合的，假如中文字体使用 12px 的话，最佳行高是 22px，如果字体使用 14px 的话，行高应该使用 24px - 译者。

另一个例子，在表单中，输入框的宽度应该是标签文字的宽度乘以 1.62。而对于显示在 Web 上矩形来说，它的宽度应该是高度乘以 1.62。这样一来，Web 设计师同时需要很好的计算能力，至少要在旁边放一台计算器，为了节省时间，作者建议在设计中随时记住一个 62/38 原则，在任何需要分割的地方，都使用 62% 和 38% 作比例。对于需要分割成三份的场合，可以先按 62%，38%原则分成两份，再将那份大的按 62% 和 38% 的比例分割。" <a href="http://hi.baidu.com/chencruz/blog/item/c3dc39d712b781daa044dfe4.html">阅读全文</a>
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/chencruz/blog/category/Cms">Cms</a>&nbsp;<a href="http://hi.baidu.com/chencruz/blog/item/c3dc39d712b781daa044dfe4.html#comment">查看评论</a>]]></description>
        <pubDate>2008-11-08  20:09</pubDate>
        <category><![CDATA[Cms]]></category>
        <author><![CDATA[chencruz]]></author>
		<guid>http://hi.baidu.com/chencruz/blog/item/c3dc39d712b781daa044dfe4.html</guid>
</item>

<item>
        <title><![CDATA[在U盘上定制个人PC]]></title>
        <link><![CDATA[http://hi.baidu.com/chencruz/blog/item/09b5c6de1920985395ee37ff.html]]></link>
        <description><![CDATA[
		
		上次从北京回石家庄，在动车提供的杂志中看到“潜行者活动硬盘电脑”的广告，主要意思是：在活动硬盘上提供个人专用的、安全的计算机，而带计算机的这个活动硬盘大约卖2800多元。

实际上，可以使用VMware ACE Workstation，在活动硬盘、U盘上，创建这种便携式的计算机，潜行者活动硬盘也是使用VMware实现的。在前几年，人们出差的时候，经常带一个笔记本电脑，因为许多的文档、数据都在计算机中，而现在人们出差，许多的时候是带一个U盘或活动硬盘，把重要的数据放在U盘或活动硬盘中。这样需要使用别人操作系统，不怎么方便，还需要考虑是否会感染蠕虫、病毒等。

基于此，在活动硬盘或U盘上部署经过加密的可移动计算机是非常实用的事情。本文将介绍如何在一个8GB的U盘上，部署一个虚拟硬盘为2.5GB大小的、安装Windows XP Professional的虚拟机，当需要使用的时候，直接将U盘插到计算机上，运行U盘中的VMware Player程序就可以使用。

使用规则

VMware ACE 中的“ACE”是Assured Computing Environment的简称，它是用来提供安全、基于策略进行管理的虚拟PC环境的平台。VMware ACE可以作为一个独立平台使用，也可以和VMware Workstation 6结合使用。

VMware Workstation主要为开发人员、网络管理员、技术爱好者等专业人员，提供测试与实验环境，VMware Server主要为中小企业提供虚拟化服务器平台，所以，这两个产品的用户，都是专业人员，而VMware ACE，是由专业人员定制虚拟机，定制的虚拟机是给普通用户使用。

下面，以在一个8GB的U盘上创建一台Windows XP虚拟机为例，介绍VMware ACE定制虚拟机的方法，主要步骤如下：

（1）在VMware Workstation中创建虚拟机，在虚拟机中安装操作系统、VMware Tools以及相关应用软件。

（2）在VMware ACE Workstation对安装配置好的虚拟机启用ACE功能。

（3）编辑ACE策略。

（4）创建ACE包。

（5）部署ACE。

（6）最终用户使用。

下面介绍在VMware Workstation中创建虚拟机并启用ACE功能。

首先，在VMware Workstation中，创建Windows XP Professional的虚拟机，主要要求如下：

（1）设置虚拟硬盘大小为2.5GB，并且在安装操作系统的时候，只创建一个分区。

（2）安装操作系统后，安装VMware Tools，安装所需要的软件、输入法等。

（3）安装完成后，关闭虚拟机，并启用ACE功能（在VMware Workstation主界面中，单击“Enable ACE features”链接，启用ACE）。

设置策略

在启用ACE功能后，单击“Edit Policies”链接，进入VMware ACE策略页，设置如下策略：

（1）在“访问控制”策略中，设置“User-specified password”选项，这样，当部署到U盘中的虚拟机每次启动前，都需要密码，这样可以防止非授权用户使用。

（2）在“Copy Protection（复制保护）”选项中，用来保护安装后的实例，在默认情况下，是允许用户复制或移动安装后的实例的，如果想对实例进行保护，可以选中“Do not allow moving or copying of the instance files”（禁止用户复制或移动安装好的虚拟机实例）。

（3）在“Virtual Printer（虚拟打印机）”控制策略中，是否允许实例使用主机操作系统中配置好的打印机，如果要使用虚拟打印机，需要为该ACE实例添加一个串口，这将会在策略被启用时自动创建，如果禁用该策略，会删除该口串口。

（4）在“Administrator Mode（管理员模式）”策略中，如果启用“Enable administrator mode”并且设置管理员密码，则在使用VMware ACE实例的时候，可以通过键入管理员密码，来修改虚拟机的配置，这包括修改虚拟机内存、网卡、硬盘等，启用管理员选项设置。

部署虚拟机到Ｕ盘

经过测试之后（在VMware Workstation界面中单击“Preview in Player”测试虚拟机及其设置的策略），就可以将虚拟机进行打包，然后分发给最终用户使用。在VMware ACE Workstation中，可以创建两种包，一种是安装到计算机上使用的非Pocket包，另一种，是安装到U盘或活动硬盘上，并且可以直接在U盘或活动硬盘上使用的Pocket包。在本节中创建的包属于后者。

在VMware ACE Workstation，单击“Create Pocket ACE package”链接，创建用于活动介质的安装包，主要步骤如下：

（1）在“Name the Package”页中，为将要定制的ACE实例设置名称、选择保存路径，并且在“Notes”中写上注释信息。

（2）在“Pocket ACE Deployment Password”页中，设置部署口令，本例中密码为12345。

（3）创建包完成后，选中“Deploy to portable device now”，立刻向U盘（或活动硬盘，或者其他指定位置）部署虚拟机。

（4）在“VMware Pocket ACE Deploy Utility”页中，插入U盘，单击“Refresh”按钮，在“Choose a removable drive”列表中，显示出U盘，并且显示出U盘可用空间大小，单击“Deploy”按钮开始部署。如果设置了部署口令，会弹出“Enter Password”按钮，键入密码，单击“OK”按钮，开始向U盘部署虚拟机。

（5）部署完成后，单击“确定”按钮，然后单击“Close”按钮。

将ACE实例部署到U盘后，将U盘插入其他计算机，运行U盘根目录下的run.exe，启动虚拟机。如果是第一次使用，将会自动安装VMware Player，并在安装完成后，进入虚拟机。在虚拟机第一次启动时，为虚拟机设置一个密码。

【注意】需要记住该密码，以后每次使用该虚拟机，都要输入这个密码。如果你忘记了密码，需要从管理员处获得恢复密码才能继续使用虚拟机。

从Ｕ盘启动的虚拟机界面 <a href="http://hi.baidu.com/chencruz/blog/item/09b5c6de1920985395ee37ff.html">阅读全文</a>
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/chencruz/blog/category/%CD%F8%C2%E7%BC%BC%CA%F5">网络技术</a>&nbsp;<a href="http://hi.baidu.com/chencruz/blog/item/09b5c6de1920985395ee37ff.html#comment">查看评论</a>]]></description>
        <pubDate>2008-11-07  23:34</pubDate>
        <category><![CDATA[网络技术]]></category>
        <author><![CDATA[chencruz]]></author>
		<guid>http://hi.baidu.com/chencruz/blog/item/09b5c6de1920985395ee37ff.html</guid>
</item>


</channel>
</rss>