Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

A simple wiki engine written in Perl. No database required.

License

NotificationsYou must be signed in to change notification settings

kensanata/oddmuse

Repository files navigation

This is the README file distributed together with theOddmuse script.

Installing Oddmuse on a Debian System running Apache

The following instructions require a number of tools. You can make surethey're all installed by issuing the following command asroot:

apt-get install coreutils apache2 sudo wget w3m perl \    libwww-perl libxml-rss-perl diffutils

You probably created an account for yourself. You might have to add thisuser to thesudo group. Here's how I created my own user asroot:

adduser alexusermod -a -G sudo alex

Now you can login asalex and do everything else usingsudo.

You need to copy wiki.pl into your cgi-bin directory, and you need tomake the script executable. You might also have to change its owner toan appropriate user on your system.

sudo wget -O /usr/lib/cgi-bin/wiki.pl \  http://git.savannah.gnu.org/cgit/oddmuse.git/plain/wiki.plsudo chmod +x /usr/lib/cgi-bin/wiki.plsudo chown www-data.www-data /usr/lib/cgi-bin/wiki.pl

If you're on SUSE, the user might not bewww-data butwwwrun withoutappropriate group:

sudo chown wwwrun.root /usr/lib/cgi-bin/wiki.pl

You should be able to test it right now! Visithttp://localhost/cgi-bin/wiki.pl. If your site is available from theoutside, you will be able to use a normal browser. If don't have adomain name yet, you'll probably have to use a text browser likew3m.

w3m http://localhost/cgi-bin/wiki.pl

If you create pages in this wiki, these will get stored in a temporarydirectory. You need change the data directory from"/tmp/oddmuse" tolike"/var/local/oddmuse". The best way to do this without changingwiki.pl is by editing/etc/apache2/sites-available/default. Add thefollowing line:

SetEnv WikiDataDir /var/local/oddmuse

Enable the default site by calling the following command:

sudo a2ensite default

Reload the Apache configuration by calling the following command:

sudo service apache2 reload

You need to create the new data directory. You webserver runs CGIscripts aswww-data. Thus, you need to change the owner and group ofthe directory towww-data.

sudo mkdir -p /var/local/oddmusesudo chown www-data.www-data /var/local/oddmuse

Done! Visit your wiki and start editing. Click on the edit link (thefirst link below the navigation bar, at the bottom of the page). Thiswill allow you to enter some text for this page. Click the Save buttonand you are done.

To add new pages, edit the homepage and add links to new pages byputting their names in[[double square brackets]].

Enjoy your wiki experience.

Visithttps://www.oddmuse.org/ to learn more about the translationfiles and modules that are part of this package.

Checking the Apache Setup

If you think this information doesn't work for you, here are some thingsto check.

Apache's config directory is/etc/apache2/apache2.conf. This is wherewe get thewww-data username from. It says:

# These need to be set in /etc/apache2/envvarsUser ${APACHE_RUN_USER}Group ${APACHE_RUN_GROUP}

Checking/etc/apache2/envvars we see the following:

export APACHE_RUN_USER=www-dataexport APACHE_RUN_GROUP=www-data

So that's what we're using in thechown command in our instructionsabove.

The default site is configured in/etc/apache2/sites-available/default. In order for it to beenabled,there must be a symlink from a file in/etc/apache2/sites-enabled tothe file insites-available. You can enable it using the followingcommand:

sudo a2ensite default

This file also lists the directories we've used in our instructionsabove.

ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/

This means thathttp://localhost/cgi-bin/wiki.pl will call/usr/lib/cgi-bin/wiki.pl

Don't forget to reload the Apache configuration as shown above, orsimply restart it all:

sudo service apache2 graceful

Using just Perl

You can use Mojolicious as your web server. There is a simpleserver.pl which you can use. Here's how you might start it:

mkdir ~/oddmuseWikiDataDir=$HOME/oddmuse perl server.pl daemon

This makes the server available onhttp://localhost:3000/wiki. Makesure you create the directory before starting the server! If you don't,you'll get a strange error: `STDERR: : No such file or directory at ...perl5/Mojolicious/Plugin/CGI.pm`.

If it works, feel free to upgrade to Hypnotoad.

WikiDataDir=$HOME/oddmuse hypnotoad server.pl

Note: Hypnotoad uses a different default port. The above makes theserver available onhttp://localhost:8080/wiki. Hypnotoad will keepforking new processes. To stop it, use the-s flag.

hypnotoad -s server.pl

License

Permission is granted to copy, distribute and/or modify this documentunder the terms of the GNU Free Documentation License, Version 1.1 orany later version published by the Free Software Foundation.

This program is free software; you can redistribute it and/or modify itunder the terms of the GNU General Public License as published by theFree Software Foundation; either version 2 of the License, or (at youroption) any later version.

This program is distributed in the hope that it will be useful, butWITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU GeneralPublic License for more details.

Both the GNU Free Documentation License, and the GNU General PublicLicense are distributed together with this script. See the filesFDL andGPL,respectively.

About

A simple wiki engine written in Perl. No database required.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors17


[8]ページ先頭

©2009-2025 Movatter.jp