發表文章

目前顯示的是 七月, 2011的文章

Install Mercurial Server on Ubuntu

Refernece : http://phpfour.com/blog/2011/05/setting-up-central-mercurial-server-in-ubuntu/
http://mercurial.selenic.com/wiki/PublishingRepositories#Publishing_multiple_repositories

$ sudo apt-get install mercurial
安裝Mercurial


$ cd /var/
$ sudo mkdir hg
$ sudo mkdir hg/repos
$ sudo chown -R www-data:www-data hg/repos


$ cd /var/hg
$ sudo cp /usr/share/doc/mercurial/examples/hgweb.cgi .
$ sudo chmod a+x hgweb.cgi


$ vim hgweb.cgi


config = "/var/hg/hgweb.config"

import os
os.environ['HGENCODING'] = "UTF-8"




$ vim hgweb.config
[collections]
/var/hg/repos = /var/hg/repos

$ cd /etc/apache2/sites-available
$ sudo vim default


如果你default裡面沒有定義的話,就依照我的範例複製貼上就可以了:



<VirtualHost *: