乐趣: March 2008 Archives

前几天写了一篇moinmoin安装配置的东东,家里网络不好,没存下来就挂了。真是无用。眼看着这个月就要过去了,总共才写了一篇,实在是对不起苍天黄土。

费话少絮,切正题。先安装一个www/moinmoin

cd /usr/ports/www/moinmoin && make install clean

这个ports现在可以用make instance帮你做许多事了。这里有几个变量要说明一下。

MOINDEST wiki数据放在哪里
MOINTYPE wiki运行在哪种模式下面cgi,fastcgi,standalone??

即然这样,就干吧,当然了我是要用mod_python驱动了。

make MOINDEST=/www_root/wiki instance

ports能做的事情就这么多了。设置Apache如下

Alias /moin/ "/usr/local/share/moin/htdocs/"
<Location /wiki>
    SetHandler python-program
    PythonPath "['/www_root/wiki'] + sys.path"
    PythonHandler MoinMoin.request.request_modpython::Request.run
</Location>

还有一个文件是wikiconfig.py

sitename 
interwikiname
logo_string
data_dir #这个东东要注意请写绝对路径
data_underlay_dir #同上
url_prefix_static #这个要和Apache的Alias地址一样
language_ignore_browser  #你想让用户按浏览器语言来显示吗?No.

这样子也就可以用了。地址就是http://host/wiki

最近在读C陷阱与缺陷,正好有朋友问到了在写Shell Script时要注意哪些东东。总结一下:
  • 注意空格
    • 有空格:在条件语句(if while until)中注意方括号与判定语句之间有空格
    • 没有空格:在赋值语句(=)等号两边是没有空格格的
其他的想起来了再写吧。

About this Archive

This page is a archive of entries in the 乐趣 category from March 2008.

乐趣: February 2008 is the previous archive.

乐趣: April 2008 is the next archive.

Find recent content on the main index or look in the archives to find all content.

Pages

Powered by Movable Type 4.21-en