README.creole 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  1. This is the README file distributed together with the
  2. [[https://oddmuse.org/|Oddmuse]] script.
  3. == Installing Oddmuse on a Debian System running Apache
  4. The following instructions require a number of tools. You can make sure
  5. they're all installed by issuing the following command as {{{root}}}:
  6. {{{
  7. apt-get install coreutils apache2 sudo wget w3m perl \
  8. libwww-perl libxml-rss-perl diffutils
  9. }}}
  10. You probably created an account for yourself. You might have to add this
  11. user to the {{{sudo}}} group. Here's how I created my own user as
  12. {{{root}}}:
  13. {{{
  14. adduser alex
  15. usermod -a -G sudo alex
  16. }}}
  17. Now you can login as {{{alex}}} and do everything else using {{{sudo}}}.
  18. You need to copy wiki.pl into your cgi-bin directory, and you need to
  19. make the script executable. You might also have to change its owner to
  20. an appropriate user on your system.
  21. {{{
  22. sudo wget -O /usr/lib/cgi-bin/wiki.pl \
  23. http://git.savannah.gnu.org/cgit/oddmuse.git/plain/wiki.pl
  24. sudo chmod +x /usr/lib/cgi-bin/wiki.pl
  25. sudo chown www-data.www-data /usr/lib/cgi-bin/wiki.pl
  26. }}}
  27. If you're on SUSE, the user might not be {{{www-data}}} but
  28. {{{wwwrun}}} without appropriate group:
  29. {{{
  30. sudo chown wwwrun.root /usr/lib/cgi-bin/wiki.pl
  31. }}}
  32. You should be able to test it right now! Visit
  33. {{{http://localhost/cgi-bin/wiki.pl}}}. If your site is available from
  34. the outside, you will be able to use a normal browser. If don't have a
  35. domain name yet, you'll probably have to use a text browser like
  36. {{{w3m}}}.
  37. {{{
  38. w3m http://localhost/cgi-bin/wiki.pl
  39. }}}
  40. If you create pages in this wiki, these will get stored in a temporary
  41. directory. You need change the data directory from {{{"/tmp/oddmuse"}}}
  42. to like {{{"/var/local/oddmuse"}}}. The best way to do this without
  43. changing {{{wiki.pl}}} is by editing
  44. {{{/etc/apache2/sites-available/default}}}. Add the following line:
  45. {{{
  46. SetEnv WikiDataDir /var/local/oddmuse
  47. }}}
  48. Enable the default site by calling the following command:
  49. {{{
  50. sudo a2ensite default
  51. }}}
  52. Reload the Apache configuration by calling the following command:
  53. {{{
  54. sudo service apache2 reload
  55. }}}
  56. You need to create the new data directory. You webserver runs CGI
  57. scripts as {{{www-data}}}. Thus, you need to change the owner and group
  58. of the directory to {{{www-data}}}.
  59. {{{
  60. sudo mkdir -p /var/local/oddmuse
  61. sudo chown www-data.www-data /var/local/oddmuse
  62. }}}
  63. Done! Visit your wiki and start editing. Click on the edit link (the
  64. first link below the navigation bar, at the bottom of the page). This
  65. will allow you to enter some text for this page. Click the Save button
  66. and you are done.
  67. To add new pages, edit the homepage and add links to new pages by
  68. putting their names in {{{[[double square brackets]]}}}.
  69. Enjoy your wiki experience.
  70. Visit https://www.oddmuse.org/ to learn more about the translation
  71. files and modules that are part of this package.
  72. == Checking the Apache Setup
  73. If you think this information doesn't work for you, here are some things
  74. to check.
  75. Apache's config directory is {{{/etc/apache2/apache2.conf}}}. This is
  76. where we get the {{{www-data}}} username from. It says:
  77. {{{
  78. # These need to be set in /etc/apache2/envvars
  79. User ${APACHE_RUN_USER}
  80. Group ${APACHE_RUN_GROUP}
  81. }}}
  82. Checking {{{/etc/apache2/envvars}}} we see the following:
  83. {{{
  84. export APACHE_RUN_USER=www-data
  85. export APACHE_RUN_GROUP=www-data
  86. }}}
  87. So that's what we're using in the {{{chown}}} command in our
  88. instructions above.
  89. The default site is configured in
  90. {{{/etc/apache2/sites-available/default}}}. In order for it to be
  91. //enabled//, there must be a symlink from a file in
  92. {{{/etc/apache2/sites-enabled}}} to the file in
  93. {{{sites-available}}}. You can enable it using the following command:
  94. {{{
  95. sudo a2ensite default
  96. }}}
  97. This file also lists the directories we've used in our instructions
  98. above.
  99. {{{
  100. ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
  101. }}}
  102. This means that {{{http://localhost/cgi-bin/wiki.pl}}} will call
  103. {{{/usr/lib/cgi-bin/wiki.pl}}}
  104. Don't forget to reload the Apache configuration as shown above, or
  105. simply restart it all:
  106. {{{
  107. sudo service apache2 graceful
  108. }}}
  109. == Using just Perl
  110. You can use Mojolicious as your web server. There is a simple
  111. ##server.pl## which you can use. Here's how you might start it:
  112. {{{
  113. mkdir ~/oddmuse
  114. WikiDataDir=$HOME/oddmuse perl server.pl daemon
  115. }}}
  116. This makes the server available on {{{http://localhost:3000/wiki}}}.
  117. Make sure you create the directory before starting the server!
  118. If you don't, you'll get a strange error:
  119. `STDERR: : No such file or directory at ... perl5/Mojolicious/Plugin/CGI.pm`.
  120. If it works, feel free to upgrade to Hypnotoad.
  121. {{{
  122. WikiDataDir=$HOME/oddmuse hypnotoad server.pl
  123. }}}
  124. Note: Hypnotoad uses a different default port. The above makes the
  125. server available on {{{http://localhost:8080/wiki}}}. Hypnotoad will
  126. keep forking new processes. To stop it, use the {{{-s}}} flag.
  127. {{{
  128. hypnotoad -s server.pl
  129. }}}
  130. == License
  131. Permission is granted to copy, distribute and/or modify this document
  132. under the terms of the GNU Free Documentation License, Version 1.1 or
  133. any later version published by the Free Software Foundation.
  134. This program is free software; you can redistribute it and/or modify
  135. it under the terms of the GNU General Public License as published by
  136. the Free Software Foundation; either version 2 of the License, or (at
  137. your option) any later version.
  138. This program is distributed in the hope that it will be useful, but
  139. WITHOUT ANY WARRANTY; without even the implied warranty of
  140. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  141. General Public License for more details.
  142. Both the GNU Free Documentation License, and the GNU General Public
  143. License are distributed together with this script. See the files
  144. [[https://github.com/kensanata/oddmuse/blob/master/FDL|FDL]] and
  145. [[https://github.com/kensanata/oddmuse/blob/master/GPL|GPL]],
  146. respectively.