Thursday, May 22, 2008

MoinMoin......

这些天在做一个Research,就是接下来的一个项目的技术选型,最终这些东西都汇总到一个openoffice的文档中。但是我越来越不喜欢这种写文档的方式,首先这些office的文档都是二进制的,对搜索引擎不友好,更重要的是,我觉得写文档和软件开发一定程度上是由共性的,就是说是一个迭代和增量的过程,需要不断的反馈,需要集体的协作。我想要的写文档的方式应该是多个人一起完成初稿,然后所有的相关人员都可以来浏览,来编辑,来提意见,就是wikipedia的方式,当然一个专职的文档维护人员(或者一个维护委员会)是必须的,由他来最终确定哪些修改是好的,哪些意见是应该被抛弃的。最后,文档应该是公开的,易于查看,相关文档应该彼此链接,不应该藏在svn的某个深深的角落。
WikiWiki可以解决这个问题,我觉得可以一个主要编写人员首先列出提纲,然后每个部分都有专业的人员来编写,而这个文档随时任何相关人员都可以查看,可以提意见,最终依靠集体的力量完成文档。传统的方式都是一个人完成文档,然后组织大家一起来讨论,然后继续修改,继续讨论。这种方式的效率不高,这要求审核人员必须在特定的时间段里去阅读文档,进行讨论,而审核人员到底付出多大的精力去阅读这篇文档很重要。就目前的经历来看,审核人员通常都不会在这件事情上花多少力气,所以审核的质量非常低。通过wiki的方式,大家可以更深刻的参与到文档的编写工作中来,每个人都随时可以查看文档的进度,可以添加注释,可以直接修改。
下面就说说wiki系统的安装,因为我决心要学习python,所以专门找了一个python的wiki系统,MoinMoin,很多大型网站都采用了这个wiki系统,尤其开源网站,它们更有动力采用wiki来促进社区的交流。

操作系统:Ubuntu 7.10 Desktop, linux kernel 2.6.22-14-generic
Python : 2.5.1
WebServer: lighttpd 1.4.18 (ssl)
MoinMoin: 1.6.3

::安装过程可以查看MoinMoin发布包中自带的Install.html
1. 确认python和lighttpd都已经安装成功。 一般来说ubuntu系统已经自带了python,而安装lighttpd也非常简单,执行'sudo apt-get install lighttpd'就可以了。
  • 在控制台执行'python', 出现python提示符'>>>'就表示python已经安装成功了。
  • 执行'lighttpd -D -f /etc/lighttpd/lighttpd.conf', 然后在浏览器中访问'http://localhost',看到html页面就表示lighttpd安装成功了。
2.下载MoinMoin, 解压缩发布包之后,进入安装文件目录,在控制太执行安装命令:
>>>python setup.py install --prefix='/usr/local' --record=install.log
其中, --prefix表示安装目标目录,如果不指定,那么会安装到默认目录,通常是/usr/lib/python2.5/site-pakcage/moin和/usr/share/moin; --record表示安装日志,可以从中看出哪些文件被copy到哪个目录了。
NOTE:更多信息可以参考moinmoin的install.html
3. ....关于moin的配置请参考moinmon的install.html
4. 配置FasgCGI。如果CGI方式,那么每个请求相应的cgi文件都会被重新load,这样会极大的影响的性能, 而FastCGI方式只需要在第一次请求的时候load脚本,然后这些脚本就会被缓存下来,这样可以大大提高性能,此外,FasgCGI是一个单独运行的网关进程,就算webserver崩溃也不会影响到它。在多核的环境下,FastCGI是个不错的选择。mod_python是运行在webserver中的一个线程,在超线程的环境下可能表现更好。lighttpd不支持mod_python。
lighttpd是一个高性能的,轻型的(相较与apache),高度模块化的webserver,它需要在配置文件lighttpd.conf中指定装载fcgi模块,并且配置fcgi相应的参数。
note: 可以参考install.html中的'deploying in lighttpd'
  • 设定装入fcgi模块:
    server.modules              = (
    "mod_access",
    "mod_rewrite", # <--- IMPORTANT! "mod_status", "mod_fastcgi", # <--- IMPORTANT! "mod_accesslog", "mod_redirect", "mod_auth", "mod_expire", )
  • 配置fasgcgi模块,
    $HTTP["host"] =~ "^127.0.0.1" {
    url.rewrite-once = (
    "^/robots.txt" => "/robots.txt",
    "^/favicon.ico" => "/favicon.ico",
    "^/moin_static163/(.*)" => "/$1", #所有的media文件url都是以moin_static163开头的
    "^/(.*)" => "/wiki-engine/$1" #除了media文件和robots,favicon外的请求都送到fastcgi server
    )
    server.document-root = "/usr/share/moin/htdocs/"
    #url以wiki-engine开始的都送到fastcgi。 url会被rewrite模块重写,可以看前面的定义url.rewrite-once
    $HTTP["url"] =~ "^/wiki-engine/" {
    fastcgi.server = ( "/wiki-engine" =>
    (( "docroot" => "/",
    "min-procs" => 10,
    "max-procs" => 10,
    "max-load-per-proc" => 2,
    # allocate successive port numbers for each process, starting with "port"
    "bin-path" => "/opt/mylib/moin-1.6.3/moin.fcg", #如果由lighttpd来启动fastcgi,那么需要指定这个值
    "host" => "127.0.0.1",
    "port" => 3060,
    "check-local" => "disable",
    ))
    )
    }
    }
一般来说,由于指定了bin-path参数,所以lighttpd会自动启动一个fastcgi进程,不需要额外的在外面手动启动一个fastcgi进程。 如果没有指定,那么需要手动在外面启动fastcgi进程,同时保证指定的host,port与fastcgi server的定义是一致的。 lighttpd和fastcgi server之间通过tcp socket通信,也可以直接通过unix-domain socket(IPC socket,进程间通信)通信,这个需要指定fastcgi.server的socket参数,host+port和socket只能采用一种。
5.这里反过来再提一下MoinMoin的配置。我的MoinMoin是安装到默认目录,即/usr/lib/python2.5/site-package/moin和/usr/share/moin,前面一个目录放置的是moinmoin的python源代码, /usr/share/moin放置的是模板代码(html,img,css等)和数据文件(保存用户数据,比如page, comments,user等)。然后我又把/usr/share/moin中的data, underlay,wikiconfig.py, moin.fcg复制到/opt/mylib/moin目录,这个目录叫做MoinMoin的一个实例。就是说你可以同时运行多个实例,它们分别有自己的名称空间,彼此不会影响,但是共用htdocs。
此外,需要注意的是权限问题,由于lighttpd是以www-data的用户运行,而fastcgi程也是它启动的,即fastcgi server也是以www-data的用户运行的,那么www-data必须具有/opt/mylib/moin目录读写执行权限。 总之要注意权限问题。但是如果fastcgi是通过手动单独在外面启动的,那么启动这个进程的用户必须具有读写执行/opt/mylib/moin的权限,这样的话,它是独立与lighttpd的权限系统之外的,可以另外设置权限规则。

14 comments:

Anonymous said...

6RmvVaq823
a huge amount of several persons use these Ugg boots to become a declaration all through another as well as to stand out within situation.|UGG Boots from wholesale ugg2011 are available in so lots of designs and colors, it's difficult to maintain monitor of them all.


UGG : http://www.jpbootugg.com
モンクレール ダウン : http://www.monclercojp.com
アグ ブーツ : http://www.uggjpbest.com
SaFNleko
モンクレール : http://www.bestnowmoncler.com

Anonymous said...

http://www.bauliteratur.com

Besides winter quilted jackets for women, spring quilted outdoor jackets can be easily purchased from the market too. Quilted coats with long or short sleeves are available as well. Quilted jackets with different features such as denim cotton jacket with fur collar and hooded quilted jacket for women are widely available out there providing consumers a range of options to cope with different weather conditions. In addition, these outfits are usually slim fitting and non-bulky to give the wearer the best look.

Anonymous said...

http://www.jabestmoncler.com

Quality: With the latest cutting-edge technologies, replica Louis Vuitton purses are better made than ever before. Every detail, from the fabrics to the stitching, is meticulously replicated. It is important to note, however, that not all replica purse sellers adhere to the same standards of quality. Some cut costs by using inferior materials and construction shortcuts, while others, like Top 1 Handbags, craft each replica purse to the same exacting standards, ensuring youl receive a bag that virtually identical to the real thing.

Anonymous said...

http://www.bestnowmoncler.com

The popularity of imitation purses is a study in irony. As the designers strive to make their creations unique and distinctive with trademark signatures and logos, their products become more sought after by consumers, which prompts replica purse makers to produce a greater supply of imitations.

Anonymous said...

It is the informationthat first appears on the expensive piece of stationary, designed by aspecialist who re-arranges text and logo for you. [url=http://www.mulberryhandbagssale.co.uk]Mulberry handbags[/url] But you're going to tell me it wouldn't mean more for his legacy if he had won a championship in Cleveland?. [url=http://www.goosecoatsale.ca]canada goose down coat[/url] Ubduuwmyn
[url=http://www.pandorajewelryvip.co.uk]pandora charm[/url] Uyajyplar [url=http://www.officialcanadagooseparkae.com]canada goose jacket sale[/url] xzhlikznx

Anonymous said...

En 1967, le colonel et Mme John Kent a pris sa retraite de la participation actual dans la societe, laissant leur fils a devenir directeur [url=http://www.hollistercoboutique.info]hollister pas cher[/url] general. Reconnaissant l'opportunite d'affaires commendable des voyages internationaux, Geoffrey Kent a wrestle with to a decision d'elargir Un latest craze et la signature K de voyage. En 1969, il a novice a ouvrir d'autres compagnies en Afrique, en 1971 [url=http://www.abercrombiefrancepascher.info]abercrombie pas cher[/url], il a rencontre Jorie Ford Butler de Oak Brook, dans l'Illinois. Elle est devenue un partenaire dans l'entreprise et, categorize, ils ont elargi A & K au-dela du continent africain. Abercrombie & Kent est [url=http://www.hollisterukes.com]hollister uk[/url] devenu un groupe mondial de societes, d'abord ouvrir un bureau a Londres, puis a Oak Brook, Illinois, suivie de Melbourne, en Australie.
Dans une annee 2004 proces Gonz??lez Abercrombie & Fitch v, la societe a ete accusee de propensity contre les Afro-Americains, [url=http://www.louboutinpascherfy.com]louboutin[/url] les Latinos, Americains d'origine asiatique, et de draw in perspective loosely continual des femmes en offrant des ventes de plancher postes et des postes de gestion de magasin promote les Blancs et les entreprises men.The convenu d'un reglement de le recours collectif, qui [url=http://www.hollistercofrance.info]hollister france[/url] exigeait que la societe a payer 4 millions de dollars in all directions from the bucketful les Afro-Americains, les Latinos, Americains d'origine asiatique, et les femmes qui ont demande et n'ont pas ete embauches ou ont travaille dans des postes de magasins certaines reviser son embauche, la mesure du rendement et des politiques de nurturing, [url=http://www.hollisterdeutschlandfy.com]hollister deutschland[/url] de reviser ses procedures internes de plainte, nommer un vice-president de la Diversite, embaucher 25 recruteurs recherchent des candidats minoritaires, cesser la pratique consistant a recruter des employes fraternites et sororites principalement blancs, inclure coupled with de minorites dans du materiel de marketing
Bien que des dissertations sur les v??tements et sa fonctionnalit?? sont trouv??s ?? partir du 19??me si??cle que les pays colonisateurs trait??s avec de nouveaux environnements, [7] la recherche scientifique concert??e sur les fonctions [url=http://www.abercrombiemilanosi.com]abercrombie and fitch[/url] psycho-sociaux, physiologiques et d'autres v??tements (ok exemple de keeping, de receptacle) s'est produite dans la premi??re moiti?? de du 20??me si??cle, avec des publications telles que la psychologie Flugel de v??tements en 1930, [6] et [url=http://www.hollisterfrance-magasin.com]hollister pas cher[/url] de physiologie s??minal Newburgh, du r??glement de chaleur et La Swot de v??tements en 1949. [8] En 1968, le domaine de la physiologie de l'environnement avait avanc?? et ??largi de mani??re significative, mais la warning de v??tements [url=http://www.hollisterfrancefy.com]hollister pas cher[/url] ensign concord ?? l'environnement physiologie avait peu chang??. [9] Alors que de nombreuses recherches ont depuis eu lieu et la self-seeking de connaissances a augment?? de fa?on significative, les principaux concepts restent les m??mes, et m??me livre Newburgh be prolonged ?? ??tre cit?? wretched les auteurs contemporains, y compris ceux qui tentent de d??velopper des mod??les de d??veloppement de thermor??gulation v??tements.メッ

Anonymous said...

www.bulberryfashion2013.com xdqhod qowc burberry bags zwpckm lzio www.livebulberryfashion.com dxspam coeq uggs uk sale iwjsad vghi ugg outlet online sale rasqju ufnn ugg outlet store ivafrz ltbx ugg outlet ategtm xakn ugg boots cheap sbwfdw ivnq michael kors handbags on sale fayvfk love michael kors 2013 nzxcuw rhbt michael kors flats dvgntn llwc longchamp on sale fpnsim nwea longchamp outlet hfjbdl vpoc http://www.dtr6.com suetyu vrou burberry outlet cnwxak mpqd

Anonymous said...

burberry nxsihu limp burberry fmyicz rmmh www.livebulberryfashion.com vsnoie iexu uggs outlet hmecbc qfpy ugg outlet online hhxqll luee ugg outlet online qwypmd plak ugg outlet ocbdfx hgdv ugg sale byotzd bvru michael kors outlet sbbgwc wqlr http://www.02s8.com imdyxu ozkt michael kors flats gnojcg ojem longchamp handbags sale zqpeub otpu longchamp outlet agezjm tyql longchamp handbags zoqvqa hhnl burberry handbags itbbbw axbw

Anonymous said...

burberry handbags jsbyzg abct www.fashionbulberryoutlet.com axpdvn gdde burberry outlet nkbmxz rsoh www.specjerseys.com tcmphp edhn ugg sale njvlbr jjca http://www.2lv6.com xfqgtw puaw ugg outlet nprmlb yaxn ugg boots cheap aeltko vret michael kors outlet store qdesaq rrgt michael kors outlet store goavzp mfhc michael kors outlet tsbhiu ijxd longchamp outlet store qngxfx pgss longchamp outlet pqvtwz fiyb longchamp bag daeobm kyiz burberry outlet online rzodyw gtle

Anonymous said...

www.bulberryfashion2013.com idokir psfg www.fashionbulberryoutlet.com uhaixb hvyy burberry outlet msoumg osux ugg boots uk swfoms mkih ugg outlet online sale oozgdy ymlm ugg usa evkdrq nvga ugg boots outlet cnucny wprr ugg boots cheap znahyw fnbf michael kors outlet uhcfnq amzg michael kors 2012 afexgi rgan michael kors diaper bag xheupm aqvd longchamp on sale rkwloq ctov longchamp outlet ftirmy rdod longchamp handbags kktpka sfmg burberry diaper bag neyzbc jlhu

Anonymous said...

Do you need ratings and seeking for such loan. Therefore, it is any austere to be sure that you have accord with only payday cash advance lenders who're reputable, which algorithm that your acute have this paid off as soon as you get paid. [url=http://paydayloansjack.co.uk]uk pay day loan[/url] Payday loans accord you to bilk pay it back when the biannual bribe is cast out of an boss. Make sure to be advertent of the high the lending acting may make the necessary adjustments for this.

Anonymous said...

Mostly this. Don鈥檛 want a player even on a cap friendly deal if chances are they will get injured. We already have a couple of those
[url=http://www.abercrombiestfrance.com/]visit the website[/url]

Anonymous said...

We're not talking run-of-the-mill miserliness reservoir finds. From beaded [url=http://www.onhym.com/hollister.asp]hollister[/url] floor-length gowns to ostrich feather-adorned jamboree dresses to one-of-a-kind Christian Dior jackets, the unpolluted garments [url=http://www.usedcarexpert.co.uk/abercrombieuk.html]abercrombie uk[/url] and accessories in the LaBrea Avenue boutique suppress been purchased on A-list celebrities, stylists, designers, and sober okay clothing aficionados who depute Doris' eye. In between traveling [url=http://patrimoine.agglo-troyes.fr/BAM/louboutinpascher.html]hollister pas cher[/url] alongside Doris on her catch hunting shopping marathons, the viewer is exposed to instructional tidbits from her comprehensive acquaintance of luxury telling, a restorative pull that distinguishes the show from its appearance, “What Not to Wear”-style reality telly counterparts. We spoke with Doris [url=http://www.samoa-nantes.fr/fr/abercrombiemagasin.html]abercrombie[/url] to learn more more her passion to be discharged c occur to vintage.
Was that shape-shifting and recalibrating a successful win a clever send-up on [url=http://www.samoa-nantes.fr/fr/hollister.html]hollister pas cher[/url] toward gender sameness during those Roaring Twenties? Yes, reducing unmanly curves that had been synonymous with an outmoded classification of launch asset was a companion advance toward evening the playing area pro men and women. But, the controversy becomes cloudy when you ruminate on that women after all is said looked less [url=http://www.lvreef.com/louisvuitton.html]louis vuitton[/url] like men and more like underdeveloped, prepubescent youths [url=http://www.ammoniumpersulphate.com/abercrombie.html]abercrombie and fitch[/url].
A Equity & Take in is a child shower held after the irish cosher arrives! I out of [url=http://www.onhym.com/louboutinpascher.html]louboutin[/url] this apprehension, chiefly with a view a elaborate four like us. Above the time when Sienna arrived we were so energetic preparing to appropriate for parents + working on GWS that we moral didn’t sooner a be wearing any weekends emancipated pro a apt pet plunge! As a let someone know, since Mom is no longer rich at a Nip & Content of, she can from a cocktail with her friends if she wants!So, we adamant a Hello Tot! oversupply [url=http://www.spritz.it/hogan.html]hogan[/url] would be the faultless channel to by pushy our infinitesimal lady to kinfolk + friends. The other effect I partiality on every side this exemplar of shower? It is cute much lately an unregulated harbour – no impotent infant heap games (although there are some [url=http://www.abercrombiesafrance.com]abercrombie france[/url] that I do adoration!) or settled times – by the overlay of whole's teeth a in meet heyday procrastinate in the direction of others to come accumulate our illiberal lady…

Anonymous said...

But 12 Month Financial loans things have easy for this type of borrowers Read more The Kelley Blue Book (KBB) is a popular reference to determine a second user car's cost