MediaWiki入门教程

 MediaWiki是这个世界上使用人数最多的百科建站系统。全球最著名的Wikipedia.com就是用MediaWiki建立的。另外,MediaWiki是在GPL协议下免费开源工程,这意味着你可以免费使用它。下面将介绍如何使用MediaWiki.   如何安装MediaWiki? 从官网下载到MediaWiki的安装包,解压到服务器的根目录下面。然后用你的域名访问网站,就会提示你一步一步安装了。注意最后一个步骤会生成一个LocalSettings.php文件,你需要把这个文件上传到网站的根目录。如果没有把生成的LocalSettings.php放到根目录,下次输入域名访问网站会提示找不到LocalSettings.php。其实整个安装都超级简单!   怎么使MediaWiki只能够被私人使用? 在安装阶段有这个选项配置MediaWiki会被如何使用。如果错过了,可以删除根目录下的LocalSettings.php,再输入域名访问网站重新生成LocalSetting.php。这样有点麻烦,也可以直接编辑LocalSettings。比如: # 禁止未登录用户编辑内容. $wgGroupPermissions[‘*’][‘edit’] = false; # 禁止用户注册,除非系统管理员创建用户。 $wgGroupPermissions[‘*’][‘createaccount’] = false;   怎么创建一个页面? 在这个例子中,我们会教你创建一个页面。页面的内容就是'如何创建一个页面'。 在网站的右上角上点击:登录。 然后用你的管理员账号登录。 在MediaWiki中创建一个页面的方法有点特殊。首先,你在搜索框中输入你将要编辑的词条名字,然后点击搜索。如果词条不存在的话,就会显示一个页面告诉你没有这个词条。在这个页面上会有一个选项提示你创建这个词条。点击“创建词条”。 输入以下内容:    == Create a page == * 把词条输入搜索框,然后搜索。 * 搜索结果显示没有匹配到任何页面,这时有一个选项让你创建一个页面。 * MediaWiki标志语言(MediaKiki Markup Language也常被称为:wikitext)可以在 http://www.mediawiki.org/wiki/Markup_spec 找到。 * 各种编辑页面的例子可以在 http://meta.wikimedia.org/wiki/Help:Editing and http://meta.wikimedia.org/wiki/Help:Wikitext_examples 找到。 点击"预览"按钮,可以看到页面的预览效果。点击"保存页面",则这个页面被编辑完成了。   怎么改名一个页面? 有时候你想要把一个页面改名。MediaWiki处理改名的逻辑实际上是把这个页面使用新的名字移动到一个新的位置,MediaWiki会记住旧的名字,还会建立一个到新页面的引用。 在页面的上部找到"移动"标签页,点击! 填好新的页面名字,点击"移动页面"按钮。 系统会让你确认一次,然后改名就完成了。   怎么改变MediaWiki的Logo呢? 常常有人问如何把网站左上方的网站Logo换掉。 首先你创建一个宽135象素,长135-150象素的logo图象文件。把logo上传到服务器某个位置。默认是放在/skins/common/images/wiki.png。 编辑LocalSetting.php文件,修改 $wgLogo变量。 刷新页面,现在你可以看到新的Logo了。   怎么在页面中建立内部链接(Internal Links)? 不像标准的HTML语法,在编辑MediaWiki的页面时建立指向内部页面的链接是非常容易的。比如你要建立一个到词条名为“我爱香港”的内部链接,则在编辑页面时在词条名前加井号。 如: #我爱香港 MediaWiki的内部链接的颜色有两种,一种是红色,一种是绿色。当内部链接的颜色是红色时,表示还没有收录这个词条,如果你点击的话,会提示你建立新词条。如果是绿色,则相反。   如何改变MediaWiki的导航菜单? 比如我想要把我的wiki站点上所有的category都列在导航条上,那我就需要修改导航条。 在搜索框中输入: Mediawiki:Sidebar。搜索结果会给出导航条的页面。 选择“编辑”。 增加一行以**起头,|符号前面的字符表示导航项将要显示的名字,|后表示页面的名字。 最后选择保存页面,完成! copyright ykyi.net  

June 23, 2012 · 1 min · kamus

It’s a mistake to include Xen in a Linux distro

As the title show, it’s a mistake to include Xen in a linux distro. Why? Somebody would argue that Xen is a very useful technology. Xen does the virtualization work very well and many projects are using Xen which prove Xen is so great. I’m not mean Xen is not good. However, just because Xen is a hypervisor that is based on another microkernel that is not Linux kernel itself. Linux distros that ship Xen today actually are running an entirely different Operating System kernel that most users even don’t notice that. Xen should be a separate, purpose-built kernel, so it should never be a part of the Linux kernel. Isn’t it strange that you think you are running a linux OS, but this ’linux’ has a kernel that is not linux, which is another kernel. You take away the Linux kernel, how could you say the OS is Linux. ...

June 22, 2012 · 2 min · kamus

什麼是敏感指令

1974年,Popek和Goldberg在美國电脑協會的通訊期刊上發表了一篇論文"虛擬化第三代架構的一般性要求"(Formal Requirements for Virtualizable Third Generation Architectures)。在這篇文章中,提出了敏感指令的概念。 敏感指令(Sensitive Instructions)的定義: 敏感指令是這樣一組指令,這些指令的行為取決於指令執行時處理器的工作模式,以及指令在記憶體中的位置。 ——- 對敏感指令的處理是虛擬化技術的一個關鍵點。在用戶態執行的敏感指令如果總會造成陷入(always generates a trap),這樣的敏感指令也屬於特權 指令。在不使用Wmware提出的動態二進制翻譯機制的情況下,除非所有的敏感指令都是特權指令,虛擬機管理程式才能保證正確運行。換言之,如果某種處理器架構的所有的敏感指令都是特權指令的一個子集,我們就可以說這種處理器架構是可虛擬化的。在這種情況下,我們就可以肜經典的“陷入後模擬“(trap-and-emulate)的方法實現虛擬化。按照這個定義,在嵌入式工業中最常見的ARM架構則不是可虛擬化的,因為ARM的敏感指令有些是特權指令,有些則不是。 原文 from the paper “KVM for ARM” by Christoffer Dall and Jason Nieh, Columbia University:Popek and Goldberg define sensitive instructions as the group of instructions where the effect of their execution depends on the mode of the processor or the location of the instruction in physical memory. A sensitive instruction is also privileged if it always generates a trap, when executed in user mode. The VMM can only guarantee correct execution without the use of dynamic translation if all sensitive instructions are also privileged. In other words, an architecture is virtualizable if and only if the set of sensitive instrucctions is a subset of the seet of privileged instructions. If that is the case, the VMM can be implemented using a classic trap-and-emulate solution. Unfortunately, ARM is not virtualizable as the architecture defines both sensitive privileged instructions and sensitive non-privileged instructions. ...

June 21, 2012 · 1 min · kamus

traceroute failed.Specify protocal traceroute used manually to fix it.

Today, I ran the traceroute program on a machine running FreeBSD. It failed once and again. Traceroute complained: traceroute: sendto: Permission denied. So I tried to ping. Ping failed, too. I then checked out the configuration of the firewall, which actually denied the pass through of ICMP packet. So I set it to allow ICMP pacakges to pass through the firewall. Ping worked as I expected. But traceroute still failed. ...

June 20, 2012 · 1 min · kamus

如何正确地提交内核补丁包

原文:https://lwn.net/Articles/500443/ 翻译:ykyi.net Greg Kroah-Hartman(又Greg KH)在执行一个了不起的作务:减少内核开发者,尤其是维护者的暴躁情绪。他在日本横滨举行的全球Linux大会上的讲演呼吁公众理解内核维护者的工作,内核贡献者的什么样的行为会导致内核维护者变得暴戾。但是,如果内核贡献者们能够遵守一些约束,他代表他自己做了许多承诺。 Greg Kroah Hartman把Linux内核称之为"有史以来最宏大的软件开发项目",而且它的开发速度也是“亘古未有”。从3.0到3.4,有373个公司的2833位开发者参于了Linux内核的开发。这一年,(2011年的5月到,2012年的5月),Linux内核在每个小时会有5.79处变动。而且这个开发速度仍然要加速,如果你看看3.4的开发过程,每小时共有7.21处变动。这里所说的变动仅仅指能够被合并到主干的补丁包,而那些被拒绝的补丁包没有被统计进来。 补丁包修改了哪些文件,内核开发者就把补丁包发给负责这些文件的维护者。所以的内核维护者,现在大概有700人。他们把改变应用到130个子系统的维护者那里。再从子系统的维护者到Linus的Linux内核代码分支。最后并必Linux内核的主干。如果提交的补丁包一路通过的话。 因此,来看看为什么一些补丁包不会被接受呢?Greg Kroah Hartman以刚过去的两个星期收到的补丁包为例,这两个星期刚好处于3.5版本的Merge Window时间。Merge Window是一个他确不应该接收到许多补丁包的时间段。他应该在Merge Window开始前收到所以有可能会在Merge Window其间被发往Linux Torvalds的补丁包。不过,他说他在这两个星期的时间里收到487个补丁包。其中的大多数都有很多问题,有些补丁包来自那些本应该对内核有更好理解的内核开发者们。 坏的补丁包 Greg KH举例说明了一些他收到的坏的补丁包。其中一个补丁包被命名为:patch 48/48(一个有48个补丁集的最后一个),但是其它的47个都没有。他还收到一堆补丁但没有写清楚先后顺序。如此,他要么猜测一个顺序,这毫无疑问会失败。另一个替代方案就是安全不管这个补丁了。另外还收到过有10个补丁的补丁集,但是2号补丁确丢失了。 ...

June 20, 2012 · 5 min · kamus

Linux内核维护者的职责

原文: http://www.linuxfoundation.org/news-media/blogs/browse/2012/06/role-linux-kernel-maintainer 翻译: ykyi.net 几个星期前在日本举行的Linux大会(LinuxCon)上,我做了一个演讲,题目是"Linux内核维护者,他们在做什么,如何能够帮到他们"。 这个演讲的视频可以通过这个链接看到。如果你想要幻灯片,和我的讲演稿,可以在这个地址获得。 ...

June 20, 2012 · 1 min · kamus

中山大学软件学院11级硕士研究生2012年上学期软件项目管理期末考试试题

如题,这是中山大学软件学院02年上学期期末的软件项目管理期末考试试题 for MSE 11. The final exam of Software Project Management in the first semester of 2012 for MSE 11, Software School, Sun Yat-sen University. 一 概念题,名词解释(每题5分,共30分) WBS (Work Breakdown Structure) CPM (Critical Path Method) 里程碑 (Milestone) RAM (Responsibility Assignment Matrix) SPI (Software Process Improvement) 决策树 二. 问答题(每题10分,共70分) 请具体解释项目管理知识体系的九大知识域? 如何理解迭代式开发,有何优缺点? 什么是CMMI? CMMI的五个级别各有什么要求? 简述软件项目的风险管理过程。 如何估算软件项目的成本。 项目经理应用哪些能力?为什么? 请具体解释五大项目管理过程组。

June 20, 2012 · 1 min · kamus

What is 802.11 and their friends.

WLAN(Wireless Lan) was invented in University of Hawaii, 1970, under the leadership of Professor Norman Abramson.The wireless network communicated using radios, without using phone lines making it easy to deploy over Hawaii islands. Original WLAN hardware was used as an alternative to cabled network where cabling was impossible or difficult. The protocals of WLAN at that time was proprietary. Many companies and universities appealed to establish a set of protocals as industry protocals. In the end of the 1990s, IEEE 802.11(Wifi) came to satisfy the urgent need. Subsequent amendments such as 802.11a, 802.11b, 802.11g, 802.11n was published in the following years. Other proprietary protocals was then graduately replaced by 802.11 family. ...

June 19, 2012 · 2 min · kamus

A very brief Introduction to Neural Network.

 I have huge interests in the mysterious Artificial Intelligence. Because of the lack of time to devote into learning AI, I still barely know AI related theories. Tonight I read something about Neural Network, which plays a important role in the AI field.   So, what is A NEURAL NETWORK? A neural network is a massively parallel distributed processor made up of simple processing units that has a natural propensity for storing experiential knowledge and making it available for use. It resemble the brain in two respects: knowledge is acquired by the network from its environment through a learning process. Interneuron connection strengths  known as synaptic weights, are used to store the acquired knowledge.   Let us take the human vision as an example to demonstrate why it is necessary to study neural network. Human vision is a very complex information processing task. It is the function of the visual system to provide a representation of the the environment around us and to supply the information we need to interact with the environment. The brain accomplishes recognition task at the same time. For instance, the brain can recognize a familiar face embedded in an unfamiliar scene in shorter than a blink of eye, actually 100-200ms, whereas tasks of much lesser complexity take a great deal longer on a very powerful computer.   What's the reason makes the biological brains so efficient? How to let our machines think and do reasoning like biological brains do. The course of Neural Network has been trying to answer these questions from the day the course was established. A typical neural network has many useful properties and capacities. 1. Nonlinearity 2. Input-output Mapping 3. Adaptivity 4. Evidential Response 5. Contextual Information 6. Fault Tolerance 7. VLSI(Very Large Scale Integrated) Implementability. 8. Uniformity of Analysis and Design 9. Neurobiological Analogy.  

June 18, 2012 · 2 min · kamus

A easy way to add copyright information automatically into post(English Version英文版)

 Several weeks ago, I decided to write about two blog posts every day. I used to write copyright information manually in the post. Apparently, it's better to let the machine do this type of trivial work automatically. So, I searched the plugins to try to find a convenient one. Indeed, I found the plugin named "add post URL" which is able to help the author to insert copyright information into the post. When I clicked the 'DETAIL' button to see more. A warning message popped up: "This plugin has not been tested with your current version of WordPress". I was scared. Because I once had a bad experience about how untested plugin ruined my wordpress as a whole. So, the option of using plugin to insert copyright information was ruled out. ...

June 17, 2012 · 4 min · kamus