Hex Artifact Content
Not logged in

Artifact 712cb7df6c2767e7c62e176c066c5ae144df3726:

File www/selfhost.wiki part of check-in [7a2c37063a] - merge trunk into creole branch by bob on 2009-09-22 07:49:39. Also file www/selfhost.wiki part of check-in [93d0646830] - Typos in the new selfhost.wiki document. by drh on 2009-08-24 18:02:18.

0000: 3c 74 69 74 6c 65 3e 46 6f 73 73 69 6c 20 53 65  <title>Fossil Se
0010: 6c 66 2d 48 6f 73 74 69 6e 67 20 52 65 70 6f 73  lf-Hosting Repos
0020: 69 74 6f 72 69 65 73 3c 2f 74 69 74 6c 65 3e 0a  itories</title>.
0030: 3c 68 31 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65  <h1 align="cente
0040: 72 22 3e 46 6f 73 73 69 6c 20 53 65 6c 66 2d 48  r">Fossil Self-H
0050: 6f 73 74 69 6e 67 20 52 65 70 6f 73 69 74 6f 72  osting Repositor
0060: 69 65 73 3c 2f 68 31 3e 0a 0a 46 6f 73 73 69 6c  ies</h1>..Fossil
0070: 20 68 61 73 20 73 65 6c 66 2d 68 6f 73 74 65 64   has self-hosted
0080: 20 73 69 6e 63 65 20 32 30 30 37 2d 30 37 2d 32   since 2007-07-2
0090: 31 2e 20 20 41 73 20 6f 66 20 74 68 69 73 20 77  1.  As of this w
00a0: 72 69 74 69 6e 67 20 28 32 30 30 39 2d 30 38 2d  riting (2009-08-
00b0: 32 34 29 0a 74 68 65 72 65 20 61 72 65 20 74 68  24).there are th
00c0: 72 65 65 20 70 75 62 6c 69 63 6c 79 20 61 63 63  ree publicly acc
00d0: 65 73 73 69 62 6c 65 20 72 65 70 6f 73 69 74 6f  essible reposito
00e0: 72 69 65 73 20 66 6f 72 20 74 68 65 20 46 6f 73  ries for the Fos
00f0: 73 69 6c 20 73 6f 75 72 63 65 20 63 6f 64 65 3a  sil source code:
0100: 0a 0a 20 20 31 2e 20 20 5b 68 74 74 70 3a 2f 2f  ..  1.  [http://
0110: 77 77 77 2e 66 6f 73 73 69 6c 2d 73 63 6d 2e 6f  www.fossil-scm.o
0120: 72 67 2f 5d 0a 20 20 32 2e 20 20 5b 68 74 74 70  rg/].  2.  [http
0130: 3a 2f 2f 77 77 77 2e 68 77 61 63 69 2e 63 6f 6d  ://www.hwaci.com
0140: 2f 63 67 69 2d 62 69 6e 2f 66 6f 73 73 69 6c 5d  /cgi-bin/fossil]
0150: 0a 20 20 33 2e 20 20 5b 68 74 74 70 3a 2f 2f 77  .  3.  [http://w
0160: 77 77 32 2e 66 6f 73 73 69 6c 2d 73 63 6d 2e 6f  ww2.fossil-scm.o
0170: 72 67 2f 5d 0a 0a 0a 54 68 65 20 63 61 6e 6f 6e  rg/]...The canon
0180: 69 63 61 6c 20 72 65 70 6f 73 69 74 6f 72 79 20  ical repository 
0190: 69 73 20 28 31 29 2e 20 20 52 65 70 6f 73 69 74  is (1).  Reposit
01a0: 6f 72 69 65 73 20 28 32 29 20 61 6e 64 20 28 33  ories (2) and (3
01b0: 29 20 61 75 74 6f 6d 61 74 69 63 61 6c 6c 79 0a  ) automatically.
01c0: 73 74 61 79 20 69 6e 20 73 79 6e 63 68 72 6f 6e  stay in synchron
01d0: 69 7a 61 74 69 6f 6e 20 77 69 74 68 20 28 31 29  ization with (1)
01e0: 20 76 69 61 20 61 20 0a 3c 61 20 68 72 65 66 3d   via a .<a href=
01f0: 22 68 74 74 70 3a 2f 2f 65 6e 2e 77 69 6b 69 70  "http://en.wikip
0200: 65 64 69 61 2e 6f 72 67 2f 77 69 6b 69 2f 43 72  edia.org/wiki/Cr
0210: 6f 6e 22 3e 63 72 6f 6e 20 6a 6f 62 3c 2f 61 3e  on">cron job</a>
0220: 20 74 68 61 74 20 69 6e 76 6f 6b 65 73 0a 22 66   that invokes."f
0230: 6f 73 73 69 6c 20 73 79 6e 63 22 20 61 74 20 72  ossil sync" at r
0240: 65 67 75 6c 61 72 20 69 6e 74 65 72 76 61 6c 73  egular intervals
0250: 2e 0a 0a 4e 6f 74 65 20 74 68 61 74 20 74 68 65  ...Note that the
0260: 20 74 77 6f 20 73 65 63 6f 6e 64 61 72 79 20 72   two secondary r
0270: 65 70 6f 73 69 74 6f 72 69 65 73 20 61 72 65 20  epositories are 
0280: 6d 6f 72 65 20 74 68 61 6e 20 6a 75 73 74 20 72  more than just r
0290: 65 61 64 2d 6f 6e 6c 79 20 6d 69 72 72 6f 72 73  ead-only mirrors
02a0: 2e 0a 41 6c 6c 20 74 68 72 65 65 20 73 65 72 76  ..All three serv
02b0: 65 72 73 20 73 75 70 70 6f 72 74 20 66 75 6c 6c  ers support full
02c0: 20 72 65 61 64 2f 77 72 69 74 65 20 63 61 70 61   read/write capa
02d0: 62 69 6c 69 74 69 65 73 2e 0a 43 68 61 6e 67 65  bilities..Change
02e0: 73 20 28 73 75 63 68 20 61 73 20 6e 65 77 20 74  s (such as new t
02f0: 69 63 6b 65 74 73 20 6f 72 20 77 69 6b 69 20 6f  ickets or wiki o
0300: 72 20 63 68 65 63 6b 2d 69 6e 73 29 20 63 61 6e  r check-ins) can
0310: 20 62 65 20 69 6d 70 6c 65 6d 65 6e 74 65 64 20   be implemented 
0320: 0a 6f 6e 20 61 6e 79 20 6f 66 20 74 68 65 20 74  .on any of the t
0330: 68 72 65 65 20 73 65 72 76 65 72 73 20 61 6e 64  hree servers and
0340: 20 74 68 6f 73 65 20 63 68 61 6e 67 65 73 20 61   those changes a
0350: 75 74 6f 6d 61 74 69 63 61 6c 6c 79 20 70 72 6f  utomatically pro
0360: 70 61 67 61 74 65 20 74 6f 20 74 68 65 0a 6f 74  pagate to the.ot
0370: 68 65 72 20 74 77 6f 20 73 65 72 76 65 72 73 2e  her two servers.
0380: 0a 0a 53 65 72 76 65 72 20 28 31 29 20 72 75 6e  ..Server (1) run
0390: 73 20 61 73 20 61 20 43 47 49 20 73 63 72 69 70  s as a CGI scrip
03a0: 74 20 6f 6e 20 61 0a 3c 61 20 68 72 65 66 3d 22  t on a.<a href="
03b0: 68 74 74 70 3a 2f 2f 77 77 77 2e 6c 69 6e 6f 64  http://www.linod
03c0: 65 2e 63 6f 6d 2f 22 3e 4c 69 6e 6f 64 65 20 37  e.com/">Linode 7
03d0: 32 30 3c 2f 61 3e 20 6c 6f 63 61 74 65 64 20 69  20</a> located i
03e0: 6e 20 44 61 6c 6c 61 73 2c 20 54 58 0a 2d 20 6f  n Dallas, TX.- o
03f0: 6e 20 74 68 65 20 73 61 6d 65 20 76 69 72 74 75  n the same virtu
0400: 61 6c 20 6d 61 63 68 69 6e 65 20 74 68 61 74 20  al machine that 
0410: 0a 68 6f 73 74 73 20 3c 61 20 68 72 65 66 3d 22  .hosts <a href="
0420: 68 74 74 70 3a 2f 2f 77 77 77 2e 73 71 6c 69 74  http://www.sqlit
0430: 65 2e 6f 72 67 2f 22 3e 53 51 4c 69 74 65 3c 2f  e.org/">SQLite</
0440: 61 3e 20 61 6e 64 20 6f 76 65 72 20 61 0a 64 6f  a> and over a.do
0450: 7a 65 6e 20 6f 74 68 65 72 20 73 6d 61 6c 6c 65  zen other smalle
0460: 72 20 70 72 6f 6a 65 63 74 73 2e 20 20 54 68 69  r projects.  Thi
0470: 73 20 64 65 6d 6f 6e 73 74 72 61 74 65 73 20 74  s demonstrates t
0480: 68 61 74 20 46 6f 73 73 69 6c 20 64 6f 65 73 20  hat Fossil does 
0490: 6e 6f 74 0a 72 65 71 75 69 72 65 20 6d 75 63 68  not.require much
04a0: 20 73 65 72 76 65 72 20 70 6f 77 65 72 2e 0a 4d   server power..M
04b0: 75 6c 74 69 70 6c 65 20 66 6f 73 73 69 6c 2d 62  ultiple fossil-b
04c0: 61 73 65 64 20 70 72 6f 6a 65 63 74 73 20 63 61  ased projects ca
04d0: 6e 20 65 61 73 69 6c 79 20 62 65 20 68 6f 73 74  n easily be host
04e0: 65 64 20 6f 6e 20 74 68 65 20 73 61 6d 65 20 6d  ed on the same m
04f0: 61 63 68 69 6e 65 2c 0a 65 76 65 6e 20 69 66 20  achine,.even if 
0500: 74 68 61 74 20 6d 61 63 68 69 6e 65 20 69 73 20  that machine is 
0510: 69 74 73 65 6c 66 20 6f 6e 65 20 6f 66 20 73 65  itself one of se
0520: 76 65 72 61 6c 20 64 6f 7a 65 6e 20 76 69 72 74  veral dozen virt
0530: 75 61 6c 20 6d 61 63 68 69 6e 65 73 20 6f 6e 0a  ual machines on.
0540: 73 69 6e 67 6c 65 20 70 68 79 73 69 63 61 6c 20  single physical 
0550: 62 6f 78 2e 20 20 54 68 65 20 43 47 49 20 73 63  box.  The CGI sc
0560: 72 69 70 74 20 74 68 61 74 20 72 75 6e 73 20 74  ript that runs t
0570: 68 65 20 63 61 6e 6f 6e 69 63 61 6c 20 46 6f 73  he canonical Fos
0580: 73 69 6c 0a 73 65 6c 66 2d 68 6f 73 74 69 6e 67  sil.self-hosting
0590: 20 72 65 70 6f 73 69 74 6f 72 79 20 69 73 20 61   repository is a
05a0: 73 20 66 6f 6c 6c 6f 77 73 3a 0a 0a 3c 62 6c 6f  s follows:..<blo
05b0: 63 6b 71 75 6f 74 65 3e 3c 70 72 65 3e 0a 23 21  ckquote><pre>.#!
05c0: 2f 75 73 72 2f 62 69 6e 2f 66 6f 73 73 69 6c 0a  /usr/bin/fossil.
05d0: 72 65 70 6f 73 69 74 6f 72 79 3a 20 2f 66 6f 73  repository: /fos
05e0: 73 69 6c 2f 66 6f 73 73 69 6c 2e 66 6f 73 73 69  sil/fossil.fossi
05f0: 6c 0a 3c 2f 70 72 65 3e 3c 2f 62 6c 6f 63 6b 71  l.</pre></blockq
0600: 75 6f 74 65 3e 0a 0a 53 65 72 76 65 72 20 28 32  uote>..Server (2
0610: 29 20 72 75 6e 73 20 61 73 20 61 20 43 47 49 20  ) runs as a CGI 
0620: 73 63 72 69 70 74 20 6f 6e 20 61 20 73 68 61 72  script on a shar
0630: 65 64 20 68 6f 73 74 69 6e 67 20 61 63 63 6f 75  ed hosting accou
0640: 6e 74 20 61 74 0a 3c 61 20 68 72 65 66 3d 22 68  nt at.<a href="h
0650: 74 74 70 3a 2f 2f 77 77 77 2e 68 65 2e 6e 65 74  ttp://www.he.net
0660: 2f 22 3e 48 75 72 72 69 63 61 6e 65 20 45 6c 65  /">Hurricane Ele
0670: 63 74 72 69 63 3c 2f 61 3e 20 69 6e 20 53 61 6e  ctric</a> in San
0680: 20 4a 6f 73 65 20 61 6e 64 0a 46 72 65 6d 6f 6e   Jose and.Fremon
0690: 74 2c 20 43 41 2e 20 20 54 68 69 73 20 73 65 72  t, CA.  This ser
06a0: 76 65 72 20 64 65 6d 6f 6e 73 74 72 61 74 65 73  ver demonstrates
06b0: 20 74 68 65 20 61 62 69 6c 69 74 79 20 6f 66 0a   the ability of.
06c0: 46 6f 73 73 69 6c 20 74 6f 20 72 75 6e 20 6f 6e  Fossil to run on
06d0: 20 61 6e 20 65 63 6f 6e 6f 6d 69 63 61 6c 20 73   an economical s
06e0: 68 61 72 65 64 2d 68 6f 73 74 20 77 65 62 20 61  hared-host web a
06f0: 63 63 6f 75 6e 74 20 77 69 74 68 20 6e 6f 0a 70  ccount with no.p
0700: 72 69 76 69 6c 65 67 65 73 20 62 65 79 6f 6e 64  rivileges beyond
0710: 20 70 6f 72 74 20 38 30 20 48 54 54 50 20 61 63   port 80 HTTP ac
0720: 63 65 73 73 20 61 6e 64 20 43 47 49 2e 20 20 49  cess and CGI.  I
0730: 74 20 69 73 20 6e 6f 74 20 6e 65 63 65 73 73 61  t is not necessa
0740: 72 79 0a 74 6f 20 68 61 76 65 20 61 20 64 65 64  ry.to have a ded
0750: 69 63 61 74 65 64 20 73 65 72 76 65 72 20 74 6f  icated server to
0760: 20 72 75 6e 20 46 6f 73 73 69 6c 2e 20 20 41 73   run Fossil.  As
0770: 20 66 61 72 20 61 73 20 77 65 20 61 72 65 20 61   far as we are a
0780: 77 61 72 65 2c 20 0a 46 6f 73 73 69 6c 20 69 73  ware, .Fossil is
0790: 20 74 68 65 20 6f 6e 6c 79 20 66 75 6c 6c 2d 66   the only full-f
07a0: 65 61 74 75 72 65 64 20 63 6f 6e 66 69 67 75 72  eatured configur
07b0: 61 74 69 6f 6e 20 6d 61 6e 61 67 65 6d 65 6e 74  ation management
07c0: 20 73 79 73 74 65 6d 20 0a 74 68 61 74 20 63 61   system .that ca
07d0: 6e 20 72 75 6e 20 69 6e 0a 73 75 63 68 20 61 20  n run in.such a 
07e0: 72 65 73 74 72 69 63 74 65 64 20 65 6e 76 69 72  restricted envir
07f0: 6f 6e 6d 65 6e 74 2e 20 20 54 68 65 20 43 47 49  onment.  The CGI
0800: 20 73 63 72 69 70 74 20 74 68 61 74 20 72 75 6e   script that run
0810: 73 20 6f 6e 20 74 68 65 0a 48 75 72 72 69 63 61  s on the.Hurrica
0820: 6e 65 20 45 6c 65 63 74 72 69 63 20 73 65 72 76  ne Electric serv
0830: 65 72 20 69 73 20 74 68 65 20 73 61 6d 65 20 61  er is the same a
0840: 73 20 74 68 65 20 43 47 49 20 73 63 72 69 70 74  s the CGI script
0850: 20 73 68 6f 77 6e 20 61 62 6f 76 65 2c 0a 65 78   shown above,.ex
0860: 63 65 70 74 20 74 68 61 74 20 74 68 65 20 70 61  cept that the pa
0870: 74 68 6e 61 6d 65 73 20 61 72 65 20 6d 6f 64 69  thnames are modi
0880: 66 69 65 64 20 74 6f 20 73 75 69 74 65 20 74 68  fied to suite th
0890: 65 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 3a 0a 0a  e environment:..
08a0: 3c 62 6c 6f 63 6b 71 75 6f 74 65 3e 3c 70 72 65  <blockquote><pre
08b0: 3e 0a 23 21 2f 68 6f 6d 65 2f 68 77 61 63 69 2f  >.#!/home/hwaci/
08c0: 62 69 6e 2f 66 6f 73 73 69 6c 0a 72 65 70 6f 73  bin/fossil.repos
08d0: 69 74 6f 72 79 3a 20 2f 68 6f 6d 65 2f 68 77 61  itory: /home/hwa
08e0: 63 69 2f 66 6f 73 73 69 6c 2f 66 6f 73 73 69 6c  ci/fossil/fossil
08f0: 2e 66 6f 73 73 69 6c 0a 3c 2f 70 72 65 3e 3c 2f  .fossil.</pre></
0900: 62 6c 6f 63 6b 71 75 6f 74 65 3e 0a 0a 53 65 72  blockquote>..Ser
0910: 76 65 72 20 28 32 29 20 69 73 20 73 79 6e 63 68  ver (2) is synch
0920: 72 6f 6e 69 7a 65 64 20 77 69 74 68 20 74 68 65  ronized with the
0930: 20 63 61 6e 6f 6e 69 63 61 6c 20 73 65 72 76 65   canonical serve
0940: 72 20 28 31 29 20 62 79 20 72 75 6e 6e 69 6e 67  r (1) by running
0950: 0a 74 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 63  .the following c
0960: 6f 6d 6d 61 6e 64 20 76 69 61 20 63 72 6f 6e 3a  ommand via cron:
0970: 0a 0a 3c 62 6c 6f 63 6b 71 75 6f 74 65 3e 3c 70  ..<blockquote><p
0980: 72 65 3e 0a 2f 68 6f 6d 65 2f 68 77 61 63 69 2f  re>./home/hwaci/
0990: 62 69 6e 2f 66 6f 73 73 69 6c 20 73 79 6e 63 20  bin/fossil sync 
09a0: 2d 52 20 2f 68 6f 6d 65 2f 68 77 61 63 69 2f 66  -R /home/hwaci/f
09b0: 6f 73 73 69 6c 2f 66 6f 73 73 69 6c 2e 66 6f 73  ossil/fossil.fos
09c0: 73 69 6c 0a 3c 2f 70 72 65 3e 3c 2f 62 6c 6f 63  sil.</pre></bloc
09d0: 6b 71 75 6f 74 65 3e 0a 0a 53 65 72 76 65 72 20  kquote>..Server 
09e0: 28 33 29 20 69 73 20 61 0a 3c 61 20 68 72 65 66  (3) is a.<a href
09f0: 3d 22 68 74 74 70 3a 2f 2f 77 77 77 2e 6c 69 6e  ="http://www.lin
0a00: 6f 64 65 2e 63 6f 6d 2f 22 3e 4c 69 6e 6f 64 65  ode.com/">Linode
0a10: 20 33 36 30 3c 2f 61 3e 20 6c 6f 63 61 74 65 64   360</a> located
0a20: 20 69 6e 20 41 74 6c 61 6e 74 61 2c 20 47 41 0a   in Atlanta, GA.
0a30: 61 6e 64 20 73 65 74 20 75 70 20 6a 75 73 74 20  and set up just 
0a40: 6c 69 6b 65 20 74 68 65 20 63 61 6e 6f 6e 69 63  like the canonic
0a50: 61 6c 20 73 65 72 76 65 72 20 28 31 29 20 77 69  al server (1) wi
0a60: 74 68 20 74 68 65 20 61 64 64 69 74 69 6f 6e 20  th the addition 
0a70: 6f 66 20 61 0a 63 72 6f 6e 20 6a 6f 62 20 66 6f  of a.cron job fo
0a80: 72 20 73 79 6e 63 68 72 6f 6e 69 7a 61 74 69 6f  r synchronizatio
0a90: 6e 20 61 73 20 69 6e 20 73 65 72 76 65 72 20 28  n as in server (
0aa0: 32 29 2e 0a                                      2)..