Install and configure MoinMoin in Ubuntu

Source: Internet
Author: User
Install MoinMoin installation setting directory in Ubuntu 1 install MoinWiki1.1 unzip installation package 1.2 create working directory 1.3 modify configuration file 1.3.1 single wiki configuration 1.3.2 multiple wiki configurations 1.3.3 Startup File configuration 1.4 path setting 1.4.1 at the root path set 1.4.2 settings in other paths 1.5 start wiki installation MoinWikiApache with mod_wsgi:

Install and configure MoinMoin in Ubuntu

Directory

1. Install MoinWiki
1.1 decompress the installation package
1.2 create a working directory
1.3 modify the configuration file
1.3.1 single wiki Configuration
1.3.2 multiple wiki configurations
1.3.3 Startup File Configuration
1.4 path settings
1.4.1 settings in the root path
1.4.2 settings in other paths
1.5 start wiki
 

Install MoinWiki
Apache and mod_wsgi: Recommended deployment when installing MoinMoin on Apache, which is fast and easy to install. Use the package Installation tool to install the libapache2-mod-wsgi package and have apache configured.

Decompress the installation package
Decompress the downloaded compressed files and check the extracted files. Only two directories are available.

Moin-1.9.0
+ MoinMoin-MoinMoin program source file.
+ Wiki-template file.
We call the wiki directory a template because you usually do not need to use these files in this directory, just copy them to the desired place. Therefore, you can build multiple wikis and easily upgrade them to the new MoinMoin version.

Create a working directory
You need to create at least two directories:

Source code directory
Wiki instance directory
Here we create two directories, moinsource and mywiki, respectively in the home directory.

Cd ~ Yourname/
Mkdir moinsource mywiki
Copy the corresponding files to these two directories:

Cp-r moin-1.9.0/MoinMoin moinsource
Cp-r moin-1.9.0/wiki/config moinsource
Cp-r moin-1.9.0/wiki/server moinsource
Cp-r moin-1.9.0/wiki/data mywiki
Cp-r moin-1.9.0/wiki/underlay mywiki
The following permissions must be set for the instance directory:

Sudo chown-R www-data: www-data mywiki
Sudo chmod-R ug + rwX mywiki
Sudo chmod-R o-rwx mywiki
Modify configuration file
Single wiki Configuration
The configuration file of moinmoin is located in the moinsource/config/directory. If a wiki is installed, you only need to modify the wikiconfig. py file in the directory:

Open the wikiconfig. py file in the editor and modify the values of the following variables. If this variable is not available, create it by yourself. (The path uses an absolute path.) the following variables must be set:

Data_dir: data DIRECTORY pointing to your wiki instance/home/yourname/mywiki/data
Data_underlay_dir :! MoinMoin contains pre-fabricated systems and help pages, all of which are under the underlay directory. It points to the underlay directory/home/yourname/mywiki/underlay of your wiki instance
Interwikiname: a brief descriptive identifier of your wiki. It must be unique and cannot be changed later.
Sitename: The name of your wiki website
Multiple wiki configurations
If you need to enable multiple wikis, create multiple directories with the same directory as mywiki and change the name to another one. The configuration directories of multiple wikis are located in the wikifarm directory of the moinsource/config/directory:

Copy the configuration file:

Cp mywiki. py wiki_1.py
Cp mywiki. py wiki_2.py
Configure wiki_1 and wiki_2 according to the configuration description of a single wiki.

Tips for configuring wiki farm:

Different data_dir and data_underlay_dir are required for each wiki.
If you want two wikis to share some settings, put them in farmconfig. py-the two wikis will inherit these settings.
Write different settings from farmconfig. py in two wikis
Refer to settings of mywiki
Wikis = [

# Wikiname, url regular expression
#---------------------------------------------------------------
("Mywiki", r ". *"), # this is OK for a single wiki

# For multiple wikis, do something like this:
# ("Wiki1", r "^ http: // wiki1 \. example \. org/. * $ "),
# ("Wiki2", r "^ http: // wiki2 \. example \. org/. * $ "),
]

Change it:

Wikis = [

# Wikiname, url regular expression
#---------------------------------------------------------------
# ("Mywiki", r ". *"), # this is OK for a single wiki

# For multiple wikis, do something like this:
("Wiki_1", r "^ http: // wiki1 \. example \. org/. * $ "),
("Wiki_2", r "^ http: // wiki2 \. example \. org/. * $ "),
]
Wiki_1 corresponds to the Moin configuration file wiki_1.py and wiki_2, followed by the domain name matching settings.

Startup File Configuration
Open moinsource/server/moin. wsgi in the editor and find:

# Sys. path. insert (0, 'prefix/lib/python2.3/site-packages ')
Change it:

Sys. path. insert (0, '/home/yourname/moinsource ')
Find:

# Sys. path. insert (0, '/path/to/wikiconfigdir ')
# Sys. path. insert (0, '/path/to/farmconfigdir ')
Change to a single wiki as needed:

Sys. path. insert (0, '/home/yourname/moinsource/config ')
# Sys. path. insert (0, '/path/to/farmconfigdir ')
Replace multiple wikis with the following:

# Sys. path. insert (0, '/path/to/wikiconfigdir ')
Sys. path. insert (0, '/home/yourname/moinsource/config/wikifarm ')
Path settings
Settings in the root path
In order for the web server to find the MoinWiki Startup File, You need to specify these paths in the Apache configuration file:

Apache needs to know! The path of the MoinMoin Startup File. In our example, It is/home/yourname/moinconf/server/moin. wsgi.
Apache needs to know the wiki script root path
To do this, you need to edit the Apache Virtual Host Configuration files, which are usually located in the/etc/apache2/sites-available/directory.

Edit the VM configuration file corresponding to wiki and add the following to its VirtualHost definition:

WSGIScriptAlias // home/yourname/moinconf/server/moin. wsgi
You can.

Settings in other paths
If the wiki is installed in the/mywiki directory of the website (this means that you have the/var/www/mywiki directory. If you do not have the/var/www/mywiki directory, create the directory as an empty directory) and change it:

WSGIScriptAlias/mywiki/home/yourname/moinconf/server/moin. wsgi
You also need to add the following in the configuration file:

Url_prefix_static = '/mywiki/moin_static190'
Start wiki
Sudo apache2ctl restart

Reading:

Ubuntu and Windows share use local knowledge base MoinMoin http://www.linuxidc.com/Linux/2008-04/12134.htm

MoinMoin http://www.linuxidc.com/Linux/2013-10/91064htm on Nginx and uWSGI

MoinMoin Wiki permission User Guide http://www.linuxidc.com/Linux/2013-10/91066.htm

MoinMoin: Click here
MoinMoin: Click here

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.