Author: admin | Category: 默认分类
Comments: 评论关闭

昨天研究了 Google Sitemap Generator  这一由 Google 自身推出的seo工具包。

其不是一个网页脚本或插件。而是一个安装完后即可单独运行的服务。

用于配合 Apache & 其日志更有效地规划站点 Sitemap 地图供 google 以及其他搜索引擎的分析。

现在已经有 For Windows ,Linux,LinuxX64 的版本可供选择。

首页:http://code.google.com/p/googlesitemapgenerator/

下载:http://code.google.com/p/googlesitemapgenerator/downloads/list

以下以 RedHat As5.4 X64  +  Apache 2.2.11 为例,从安装到部署给大家讲解一次。

1,直接从google下载该软件

# wget http://googlesitemapgenerator.googlecode.com/files/sitemap_linux-x86_64-beta1-20091231.tar.gz
# tar zxvf sitemap_linux-x86_64-beta1-20091231.tar.gz
# cd sitemap-install
# ./install.sh

按2下回车,然后阅读协议,按 Y 接受,开始安装向导。

# What is the location of the Apache binary or control script? []
输入 apachectl 的路径,这对应你 Apache 安装的路径。例 /usr/local/apache2/bin/apachectl

回车后返回以下检测到的信息:

The following information about your Apache installation has been detected:
  * Apache version: 2.2
  * Apache architecture: 64 bits
  * Apache root configuration file: /usr/local/apache2/conf/httpd.conf
  * Apache group: apache
***************************************************************************
Is all of this information correct? If you answer No, installation will
terminate and you’ll need to restart the installation, using the necessary
command line options. [N/y] Y

确认信息,按 Y 继续。

—————————————-

Google Sitemap Generator will start creating Web Sitemap files as soon as it
starts up. Do you want Google Sitemap Generator to start submitting these
files automatically? There are three options:
1.  First installation. Start with automatic submission disabled.
2.  First installation. Start with automatic submission enabled.
3.  Reinstallation. Use the old automatic submission settings.

Specify your choice [1]:2
选择安装及启动方式,我选择第二个,第一次安装,开机启动,以及自动开始 Sitemap 生成。

—————————————

Apache configuration successfully updated.
Old configuration is saved at /etc/google-sitemap-generator/httpd.install.conf

安装向导把 httpd.conf 修改了,其实是在其最后一行加入了个 include 引用。
并且在修改之前自动把该文件复制到 /etc/google-sitemap-generator/httpd.install.conf。
如果卸载 Google Sitemap Generator ,卸载程序会把该文件复制回去。 

Ready to set the password for the administration console.
Password (5 or more characters):
Confirm password:
设置密码,至少五位。

—————————————–

Google Sitemap Generator daemon successfully started.
To start the Google Sitemap Generator module in Apache, you must restart Apache.
After you restart Apache, you can go to http://<this-server-address>:8181/ to
configure the application.
Google Sitemap Generator (Beta) was successfully installed.

安装完毕
Google Sitemap Generator  的程序以在后台运行。
程序真正运行,需要重新启动 Apache 令 mod_sitemap 跟配置文件起效。
重启 apache 后在本机访问 http://localhost:8181  再输入你刚才安装时候填写的密码即可登录。

因为安全规则,默认 Google Sitemap Generator   是不允许远程连接的,会提示 Remote access is denied. 
所以我们还需要再配点东西:

进入其默认安装路径 /usr/local/google-sitemap-generator/bin
执行以下命令
# ./sitemap-daemon remote_admin enable
这么就能打开远程登录权限
在本地中重新输入:http://你服务器地址:8181  即可打开登录页面。

一进入,就会显示你在 Apache 上所配置的所有虚拟主机的名称。
理应对应主机头,个个都不一样,但如果发现个个都是 Localhost 或者都跟 httpd.conf  中的ServerName 名字一样,
请在 各个虚拟主机配置中另外加入 ServerName,例如:

<VirtualHost *:80>
    ServerAdmin qbanke@163.com
    DocumentRoot /data2/web_server/admin
    ServerName www.gznow.org
    ServerAlias www.gznow.org
</VirtualHost>

如果你没这个烦事,可以接着下去。

点击其中一个主机头进入配置。

第一页是该主机头的运行状态。

默认开始了 Webserver filter 收集。
你还能开启下边的 Log parser 日志分析。
文件扫描器 File scanner。

我开启了 Webserver filter   Log parser
开启方式:点击左边的 Site configuration 

Pathname for log file(s)  填入服务器上属于该主机头 httpd 日志的地址。
Webserver filter  [ √ ]
Log parser             [ √ ]

把上边2个勾了save后就行了。

这个选项页就完成了,然后下一步。

到左边 Sitemap types
首先来到 Web
这一项相当重要,Google Sitemap Generator  会按照 Apache httpd.conf 的配置找到主机对应的程序根目录。
并且在该目录下生成 sitemap 地图文件已供搜索引擎抓取,顺带生成 robots.txt  ,如果该文件已存在,
就往最后+一句指向该域名根目录下的 sitemap 文件地址。

下边来设置参数:

首先是 schedule ,配置的是更新的频率。
1小时到一天随你,至于抓取结果怎样,还真有待研究。

Sitemap file settings 是配置 Sitemap 的文件名,随你改,还有就是记录行数,跟大小。
文件体积越小,有利于 Google 获取的成功率。
行数多,有利于短时间内让 Google 增加收录数。(查询收录数方式,打开g.cn 输入 site:www.xxx.com)
自己衡量了。

Sitemap file submission 就是让其在 robots.txt   中加入 Sitemap 文件的路径。
我的被改完之后多加了一行:http://www.gznow.org/sitemap_google.xml.gz # Added by Google Sitemap Generator

Save 保存后,Web 内容的属性就配置完成了。

如果你在 google 上有开通了网站管理员工具,可以将相对于的 sitemap 文件添加到配置中。
当然你不+也行,Google 跟其他搜索引擎蜘蛛 会按照 roboots.txt 自己找。

往后的 Mobile, Code Search, Blog Search 是代表不同类型网站的收录配置。
这就要看你站的内容了,如果是手机wap站,就吧 Mobile 也配上吧。有搜索引擎的,就 Code Search,剩下的是博客。

 至此,Google Sitemap Generator  的按照以及配置就说完了。

它会在服务器后台分析 Apache 的动态生成更加有效的 sitemap 供 Google ,Yahoo,Ask,Live 所获取。
理论上应该能加强你网站的 SEO 效能。

不过我也只是刚上手数十小时,不知道功效如何。欢迎大伙们用后都来分享。

对了,忘记说一说,
如果 httpd.conf 的配置有修改,例如增加删减了虚拟主机,除了Apache 要重启外。
Google Sitemap Generator 也需要重启,方法是
进入 /usr/local/google-sitemap-generator/bin
# ./sitemap-daemon service restart

顺便说停止跟开启的方法:
# ./sitemap-daemon service stop
# ./sitemap-daemon service start

不过这个东西有个小Bug(不知道是不是google特意的) 卸载有Bug。
用其位于解压包的 uninstall.sh 程序无法卸载,提示找不到 apache.sh

sitemap-install/bin/apache.sh) can’t be found.

这么简单,再次运行 install.sh ,其会提示你是否先卸载旧版本。

Do you want to uninstall the existing version first? [Y/n]

选择 Y 它就会把所有程序都卸掉。

Do you want to save the URL database and application settings file ? [Y/n]

这个按 N

然后到阅读协议的时候选择 N,退出安装向导。
然后重启 Apache 即可。

Author: admin | Category: Network, 服务器
Comments: 评论关闭

据国外媒体报道,作为全球最大的搜索引擎,谷歌拥有拥有数量众多、规模庞大的服务器系统,但外界却知之甚少。周三,谷歌首次公开了其服务器设计的神秘面纱。


谷歌首次公开了其服务器设计的神秘面纱

  大多数企业都是从戴尔、惠普、IBM或Sun购买服务器系统,而谷歌的服务器系统却是自己设计的。谷歌服务器最令人意外的是,每台服务器都配有12V的备用电池。当主电源发生意外时,电池可以继续供电。


谷歌服务器的侧面

  通常,数据中心采用大型的不间断电源(以下简称“UPS”)作为备用电源,而谷歌服务器却采用了12V的电池。对此,本·翟称:“与UPS相比,电池的成本更低。” 


谷歌员工正在检查数据中心

  而且,电池比UPS更有效率。通常,大型UPS的有效率为92%至95%,这意味着一部分电能被浪费掉,而电池的有效率为99.9%。


谷歌服务器设计图

  能源使用效率(以下简称“PUE”)是衡量数据中心是否节能的一个重要标准,数值为1代表所有的能耗全部用在设备上,而沒有用在冷卻或供电系统上;如果是1.5,意味着50%的能源被后者耗费。

  2008年第三季度,谷歌数据中心的PUE值为1.21,本来已经很低,但第四季度又降至1.20,后又降至1.19。

  谷歌一向重视节能,并愿意共享节能经验。谷歌运营副总裁乌尔斯·霍尔茨(Urs Hoelzle)称,随着环保意识的提升,能源价格的上涨,以及经济低迷导致企业削减运营成本,现在是谷歌共享节能经验的好时机。

  另外,从2005年开始,谷歌的数据中心就采用了标准的集装箱式设计:每个集装箱拥有1160台服务器,能耗为250千瓦,而每个数据中心拥有多个集装箱。

  谷歌的服务器厚度为3.5英寸,配备两个处理器、两块硬盘,采用拥有8个内存插槽的技嘉主板。谷歌核心服务器设计师本·翟(Ben Jai)称,谷歌服务器设计始于2005年,如今已进入第六代和第七代。

  运营谷歌这种规模的大企业必然挑战重重,但同时不乏有利的一面。例如,某一领域的研发成果还可以应用到其他大量的基础架构中,从而加快投资回报速度。

Top
RSS for entries