Archive for the ‘ 网站 ’ Category

MediaWiki安装

安装前准备

  • 建立一个mySQL数据库
  • 下载Mediawiki的安装包

站长百科提供的Mediawiki下载点: http://down.zzbaike.com/download/mediawiki-676.html

  • 解压,将文件上传到网站目录
  • 将config/LocalSetting.php设置为可写

安装图解

  • 访问MediaWiki的目录,例如你要装在www.zzbaike.com/wiki目录下,就访问http://www.zzbaike.com/wiki 就可以自动进入安装界面。推荐将mediawiki安装在子目录下。

Image:Mediawiki1.png

  • 点击set up the wiki开始安装,如果config/LocalSetting.php没有设置为可写,会出现如下提示,设置以后点击setup重试。如果已经设置为可写了,就会直接进入安装界面

Image:Mediawiki2.png

  • 安装界面分几个部分,分别是安装环境检测,站点配置,Email选项设置,数据库配置,按照下面几幅图的提示填写好信息,点击Install MediaWiki就开始安装了。

提示:如果您在安装时,环境检测显示You can install mediawiki,就是说你的服务器环境满足安装要求,否则将不能继续安装。如果您遇到安装环境不满足要求的情况,请将Checking Environment部分截图,然后到 http://bbs.zzbaike.com/forum-23-1.html 进行提问。

Image:Mediawiki3.png

Image:Mediawiki4.png

Image:Mediawiki5.png

Image:Mediawiki6.png

Image:Mediawiki7.png

  • 安装成功

Image:Mediawiki8.png
安装完成以后将LocalSetting.php文件从config目录转移到mediawiki所在的目录,并修改文件的权限。现在你就可以使用了。

大漠孤狼原创,始发:http://www.zzbaike.com/wiki/MediaWiki%E5%AE%89%E8%A3%85 ,转载请注明。

Post Footer automatically generated by wp-posturl plugin for wordpress.

January 15th, 2009  in 网站程序 No Comments »

cpanel控制面板为drupal配置cron job教程

drupal的不少功能需要cron job,例如检查新版本,为搜索建立索引等等。也就是需要定期的执行文件:http://example.com/cron.php

cpanel控制面板中设置流程如下:
1.进入 Cron Jobs
2.点击Advanced(Unix Style)
3.填写下面的任意一行命令:

45 * * * *  /usr/bin/lynx -source http://example.com/cron.php
45 * * * * /usr/bin/wget -O – -q -t 1 http://www.example.com/cron.php
45 * * * * curl –silent –compressed http://example.com/cron.php

45 * * * * 表示每个小时的第45分钟执行,也可以根据自己的情况修改为其他时间或时间间隔。至于使用哪个命令请根据你的服务器支持什么而决定。

cpanel的更多使用说明见: http://kb.idcspy.org/CPanel

大漠孤狼原创,始发:http://bbs.zzbaike.com/thread-5510-1-1.html,转载请注明。

Post Footer automatically generated by wp-posturl plugin for wordpress.

January 15th, 2009  in 网站程序 3 Comments »

yahoo的链接指数工具

可以显示有多少网站链接到了你的blog,或者有多少网站链接到了所在的页面。

代码地址:

http://sitemap.cn.yahoo.com/badge

Post Footer automatically generated by wp-posturl plugin for wordpress.

September 19th, 2007  in 网站 No Comments »

如何启用gzip

gzip可以将页面压缩以后传输,可以极大地提高网页的访问速度,尤其是使用国外主机的朋友,能获得成倍的速度提升。

很多程序都设置好了gzip功能,只要在后台启用即可,例如discuz,phpwind,wordpress等。由于访问网站的速度限制主要在于带宽,尤其是对于国外主机更是如此,而服务器的执行时间反而微不足道,所以会发现一个现象,开启的gzip的页面的访问速度要比静态页面还要快。

如果程序没有设置gzip的,可以在php文件的最顶部中加入

ob_start(“ob_gzhandler”);

来启用gzip。

还可以通过.htaccess来设置,在.htaccess中加入

php_flag zlib.output_compression on
php_value zlib.output_compression_level 2

这里有一个测试页面是否压缩的网站,输入网址之后可以测试页面是否已经压缩,如果压缩的页面大小,速度的差异等等,大家可以来测试一下:

http://www.port80software.com/products/httpzip/compresscheck

我用在页面增加ob_start(“ob_gzhandler”);的方法为网站RSS21启用的gzip压缩,感觉速度确实快了很多。下图是用上面的网站测试的结果,效果非常明显。

PHP页面都可以使用gzip进行压缩,但是静态页面如何压缩没找到很好的方法。一种可以通过PHP调用来压缩静态页面,还有一种就是可以通过rewrite,但都不是很好。好像有一个模块可以直接压缩静态页面和CSS文件,但是需要apache2.0以上支持。

Post Footer automatically generated by wp-posturl plugin for wordpress.

April 15th, 2007  in 网站 No Comments »

wordpress 2.1.1可能包含黑客代码

刚刚看到wordpress 网站的通知,黑客入侵了他们的一个服务器,篡改了wordpress 2.1.1的源代码,要求下载了wordpress 2.1.1的用户尽快升级到2.1.2.下面是原文:
Long story short: If you downloaded WordPress 2.1.1 within the past 3-4 days, your files may include a security exploit that was added by a cracker, and you should upgrade all of your files to 2.1.2 immediately.

Longer explanation: This morning we received a note to our security mailing address about unusual and highly exploitable code in WordPress. The issue was investigated, and it appeared that the 2.1.1 download had been modified from its original code. We took the website down immediately to investigate what happened.

It was determined that a cracker had gained user-level access to one of the servers that powers wordpress.org, and had used that access to modify the download file. We have locked down that server for further forensics, but at this time it appears that the 2.1.1 download was the only thing touched by the attack. They modified two files in WP to include code that would allow for remote PHP execution.

This is the kind of thing you pray never happens, but it did and now we’re dealing with it as best we can. Although not all downloads of 2.1.1 were affected, we’re declaring the entire version dangerous and have released a new version 2.1.2 that includes minor updates and entirely verified files. We are also taking lots of measures to ensure something like this can’t happen again, not the least of which is minutely external verification of the download package so we’ll know immediately if something goes wrong for any reason.

Finally, we reset passwords for a number of users with SVN and other access, so you may need to reset your password on the forums before you can login again.

What You Can Do to Help

If your blog is running 2.1.1, please upgrade immediately and do a full overwrite of your old files, especially those in wp-includes. Check out your friends blogs and if any of them are running 2.1.1 drop them a note and, if you can, pitch in and help them with the upgrade.

If you are a web host or network administrator, block access to “theme.php” and “feed.php”, and any query string with “ix=” or “iz=” in it. If you’re a customer at a web host, you may want to send them a note to let them know about this release and the above information.

Thanks to Ryan, Barry, Donncha, Mark, Michael, and Dougal for working through the night to figure out and address this problem, and thanks to Ivan Fratric for reporting it in the first place.

Post Footer automatically generated by wp-posturl plugin for wordpress.

March 6th, 2007  in 网站 1 Comment »