跳至主要内容

ubuntu架wiki

原帖出处

最近对ubuntu下各类服务表示出浓厚的兴趣,今天在研究怎么装wiki,从网上来看Mediawiki似乎导入的时间较长,对我这个没有耐心的人来说,还是速成一点的比较好,搜索了一下果然有。
安装环境:ubuntu7.04

1、安装MoinMoin

$ sudo apt-get install python-moinmoin

2、新建wiki目录

$ sudo mkdir /var/www/mywiki
$ cd /var/www/

3、复制文件

$ sudo cp -R /usr/share/moin/data mywiki
$ sudo cp -R /usr/share/moin/underlay mywiki
$ sudo cp /usr/share/moin/config/wikiconfig.py mywiki
$ sudo chmod -R a+rwX mywiki

4、安装 moin.cgi

$ sudo cd mywiki
$ sudo mkdir cgi-bin
$ sudo cp /usr/share/moin/server/moin.cgi cgi-bin
$ sudo chown -R www-data.www-data cgi-bin
$ sudo -R ug+rx cgi-bin(这段似乎缺少命令,应该是chown 或者 chmod命令,但是如果是chown的话上面应该写过了,所以不明)
$ sudo -R o-rwx cgi-bin(同上)

5、配置 moin.cgi

$ sudo vi cgi-bin/moin.cgi

在 import sys 后面添加sys.path.insert(0, '..'),注释掉下其余的sys.path.insert语句。

import sys
sys.path.insert(0, '..')
#sys.path.insert(0, '/etc/moin')

6、配置 Apache

在Apache的配置文件 /etc/apache2/apache2.conf 或 /etc/apache2/httpd.conf 添加以下语句:

Alias /wiki/ "/usr/share/moin/htdocs"
ScriptAlias /mywiki "/var/www/mywiki/cgi-bin/moin.cgi

7、配置 MoinMoin

更改 /var/www/mywiki/wikiconfig.py 中的相关内容,如下

data_dir = '../data/'
data_underlay_dir = '../underlay/'
url_prefix = '/wiki'

8、结束

重启Apache

sudo /etc/init.d/apache2 restart

浏览器中输入 http://127.0.0.1/mywiki/,应该已经 OK 了。(貌似我的不OK,发觉实用进来是提示错误的信息。。郁闷。。检查中)

评论

此博客中的热门博文

Python学习笔记20100117

映射list   Dictionary 是用{}. list 是一那个[]. turple是用() 当你定义过dictionary后,你可以使用d.keys(), d.values(),d.items()将定义后的时候分别显示出来 当然可以将list里的值加减乘除,也可以如一般的定义直接重新复制这个list. 链接与分割字符串的 li=";", join(li) 则显示的就是 分隔符为;的数 如果使用li=li.split(";")则将刚刚;的分隔符删除,而split里也可定义域,如li.split(";",1)   自省 <---这是啥 之前在使用的时候发觉有些书本上的模块不能调用,很多是py脚本定义过的函数。 下载该脚本s,然后上传至指定位置。 >>>import sys >>>sys.path >>>sys.path.append("绝对位置")然后就能调用这些脚本和参数了。 删除 >>>sys.path.pop() 定义一个参数是 def info(test, test1=10.test2=12): info是函数名,test是必备参数,因为没有定义值,test1和test2是可选参数,定义了初始值   以上是外部函数的调用,下面转到内部函数 内部函数有type,str,dir及其他   ---type 返回任意字符的类型,模块也可以。types模块 >>> type(1) <type 'int'> >>> li=[] >>> type(li) <type 'list'> >>> import odbchelper >>> type(odbchelper) <type 'module'> >>> type(sys) <type 'module'> >>> import types ...

Setagaya park

  We visited Setagaya Park (世田谷区) yesterday. This park reminds us when we in Europe, which has a fancy fountain in the middle, and free entrance. People just laid down on the grass, enjoy the day time they can waste. people who have kids together,  play all different kinds of sports. you really can't image whether you are in Europe or  Japan. I would prefer to use a Bus instead of the metro, the metro is fast, but you only can see the dark, light, people sit or stand as Sardine, without any emotion. but on the bus, you can see the traffic, the shop, everything on the road. When we on our way to the park, we stop by a good chocolate shop named " craft chocolate works ",  this is a very good place to have ice cream, you probably can choose half & half, you can enjoy the feeling when you smell the chocolate smell and eat with it.  or you can enjoy beer or cake in "globe antiques (ザ グローブアン ティ ークス) .   also, we checked the Blue Bottle Coffee Sangenjaya ...