• Contact
  • Contact Us
  • Disclamer
  • Home 1
  • Home 2
  • Home 3
  • Privacy Policy
Tuesday, May 13, 2025
How VPS - How to use/setup VPS
  • Login
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon
No Result
View All Result
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon
No Result
View All Result
How VPS - How to use/setup VPS
No Result
View All Result
Home Operating System CentOS

How to Install MoinMoin on CentOS 7

How VPS by How VPS
October 1, 2019
in CentOS
0
0
SHARES
44
VIEWS
Share on FacebookShare on Twitter

Contents

  1. Prerequisites
  2. Step 1: Install and configure Nginx
  3. Step 2: Install and configure MoinMoin
  4. Step 3: Install and configure uWSGI
  5. Step 4: Allow web access
  6. Step 5: Access MoinMoin from a web browser
  7. Want to contribute?


MoinMoin is an open source, filesystem-based wiki engine written in Python. Nowadays, MoinMoin is widely used in open source community. Many vendors, including, but not limited to Apache, Ubuntu, Debian, and Python, have setup their own wikis with the MoinMoin wiki engine.

In this tutorial, you will learn how to setup a single MoinMoin wiki site on a CentOS 7 server instance. In order to serve MoinMoin, Nginx and uWSGI will be installed as well.

Prerequisites

  • A fresh Vultr CentOS 7 x64 server instance. Say its IP address is 203.0.113.1.
  • A sudo user.
  • The server instance has been updated to the latest stable status using the EPEL YUM repo.

Step 1: Install and configure Nginx

Before you can get MoinMoin up and running, you need to setup a web server for it, and Nginx is a great choice for that purpose.

1) As a matter of convenience, you can install Nginx using the EPEL YUM repo:

sudo yum install nginx -y

2) Configure Nginx as follows so that it can work with uWSGI and MoinMoin.

Use the vi text editor to open the main Nginx config file /etc/nginx/nginx.conf:

sudo vi /etc/nginx/nginx.conf

Within the http { } segment, find the server { } segment which is excerpted below:

http {

...

server {
    listen       80 default_server;
    listen       [::]:80 default_server;
    server_name  _;
    root         /usr/share/nginx/html;

    # Load configuration files for the default server block.
    include /etc/nginx/default.d/*.conf;

    location / {
    }

...

2.1) Use the server’s IP address to define a server name for Nginx:

Find the line:

server_name _;

Replace it with:

server_name  203.0.113.1;

2.2) Configure Nginx as using the uWSGI protocol for communications:

Find the location / { } segment:

location / {
}

Insert two lines as below:

location / {
    uwsgi_pass unix:///run/moin/moin.sock;
    include uwsgi_params;
}

Save and quit:

:wq!

3) Optionally, you can test the modified configuration with the following command:

sudo nginx -t

If nothing goes wrong, you should see the output as below:

nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

4) Finally, start the Nginx service and make it start automatically on system boot:

sudo systemctl start nginx.service
sudo systemctl enable nginx.service

Step 2: Install and configure MoinMoin

1) Use the following commands to install MoinMoin 1.9.9, the latest stable release of MoinMoin at the time I wrote this article:

cd
wget http://static.moinmo.in/files/moin-1.9.9.tar.gz
tar -zxvf moin-1.9.9.tar.gz
cd moin-1.9.9
sudo python setup.py install --force --record=install.log --prefix='/opt/moin' --install-data=/srv

After running commands above, the MoinMoin executable and all library files will be installed in the /opt/moin directory, and data used for building your own single MoinMoin wiki will be installed in the /srv/share/moin directory.

2) Create a config file named moin.wsgi in the MoinMoin data directory using a template file of the same name:

cd /srv/share/moin/
sudo cp server/moin.wsgi moin.wsgi

Open the newly created config file using the vi text editor:

sudo vi /srv/share/moin/moin.wsgi

Find the following line:

import sys, os

Append the following two lines beneath:

sys.path.insert(0, '/opt/moin/lib/python2.7/site-packages/')
sys.path.insert(0, '/srv/share/moin/')

Save and quit:

:wq!

3) Create another MoinMoin wiki config file which will be used to customize your own wiki:

cd /srv/share/moin
sudo cp config/wikiconfig.py wikiconfig.py

You can configure many features for your MoinMoin wiki in this file, but for now, you just need to setup several features as below.

Define the site name (Say it is My First Wiki):

sudo sed -i 's/Untitled Wiki/My First Wiki/' /srv/share/moin/wikiconfig.py

Define a superuser (Say it is admin):

sudo sed -i '/#superuser/a/    superuser = [u/"admin/", ]' /srv/share/moin/wikiconfig.py

Note: You still need to register this user from the MoinMoin web interface later.

Disable reverse DNS lookups for acceleration:

sudo sed -i '$a/    log_reverse_dns_lookups = False' /srv/share/moin/wikiconfig.py

4) Change the ownership of installed MoinMoin files:

sudo chown -R nginx:nginx /srv/share/moin
sudo chown -R nginx:nginx /opt/moin

Step 3: Install and configure uWSGI

Acting as a hub between the Nginx web server and a Python application, uWSGI is designed to produce best performance using the high-performance uWSGI protocol. Next, let’s take a look at how to install and configure uWSGI for running MoinMoin.

1) Use pip to install uWSGI as follows:

sudo yum install -y python-devel python-setuptools python-pip gcc
sudo pip install --upgrade pip
sudo pip install uwsgi

If everything goes well, you should see the output similar to:

...
Successfully installed uwsgi-2.0.15

2) Having uWSGI installed, you need to create a directory to store uWSGI log files:

sudo mkdir /var/log/uwsgi
sudo chown nginx:nginx /var/log/uwsgi

3) In addition, you need to create a directory to store the MoinMoin socket file:

sudo mkdir /run/moin
sudo chown nginx:nginx /run/moin

4) Create a uWSGI config file uwsgi.ini in the MoinMoin wiki data directory and populate it as follows:

cat <<EOF | sudo tee -a /srv/share/moin/uwsgi.ini
[uwsgi]
uid = nginx
gid = nginx
socket = /run/moin/moin.sock
chmod-socket = 660
logto = /var/log/uwsgi/uwsgi.log

chdir = /srv/share/moin
wsgi-file = /srv/share/moin/moin.wsgi

master = true
processes = 3
max-requests = 200
harakiri = 30
vacuum = true
enable-threads = true
EOF

5) In order to use systemd to manage uWSGI, you need to setup a systemd unit file for uWSGI:

cat <<EOF | sudo tee -a /etc/systemd/system/uwsgi.service
[Unit]
Description=uWSGI instance to serve MoinMoin
After=syslog.target

[Service]
ExecStart=/usr/bin/uwsgi --ini /srv/share/moin/uwsgi.ini
RuntimeDirectory=uwsgi
Restart=always
KillSignal=SIGQUIT
Type=notify
StandardError=syslog
NotifyAccess=all

[Install]
WantedBy=multi-user.target
EOF

6) Start the uWSGI service and make it automatically start on system boot:

sudo systemctl start uwsgi.service
sudo systemctl enable uwsgi.service

Step 4: Allow web access

Configure firewall rules as follows so that users can visit your MoinMoin wiki site using a web browser:

sudo firewall-cmd --zone=public --permanent --add-service=http
sudo firewall-cmd --reload

Step 5: Access MoinMoin from a web browser

Now, a single MoinMoin wiki site has been up and running on your CentOS 7 server instance.

Point your favorite web browser to http://203.0.113.1, and then you will get into the MoinMoin web interface. Sign up and log in as the superuser admin we mentioned earlier, and then you are able to manage your wiki site as you wish.

If necessary, you can make more customization by editing the /srv/share/moin/wikiconfig.py file.

This concludes the tutorial. Thanks for reading.

Want to contribute?

You could earn up to $300 by adding new articles

Submit your article
Suggest an update
Request an article
Previous Post

How To Install Cherokee Web Server on CentOS

Next Post

Boost Productivity with Tmux on Ubuntu and CentOS

Next Post

Boost Productivity with Tmux on Ubuntu and CentOS

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

No Result
View All Result

Recent Post

Install Imagemagick on CentOS
CentOS

Install Imagemagick on CentOS

by How VPS
June 28, 2023
0

This is how I installed Imagemagick on a vanilla CentOS server Start off by installing the prerequisites yum install php-pear...

Read more
how to Check phpinfo

How to Check phpinfo of Hosting or VPS?

June 28, 2023
Failed to download metadata for repo 'appstream' on Centos 8

How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8

February 25, 2022
How to Fix MySQL Error "Plugin 'InnoDB' registration as a STORAGE ENGINE failed"?

How to Fix MySQL Error “Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed”?

November 17, 2020
How to optimize Mysql or MariaDB

How to optimize Mysql or MariaDB

November 3, 2020

Recent News

  • Install Imagemagick on CentOS
  • How to Check phpinfo of Hosting or VPS?
  • How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8

Category

  • Arch
  • Authentication
  • Backups
  • BSD
  • Centmin Mod
  • CentOS
  • Control Panels
  • CoreOS
  • CWP
  • Debian
  • Directadmin
  • Encryption
  • Fedora
  • Firewalls
  • Hocvps Script
  • Hosting providers
  • Kloxo-MR
  • Linux
  • Mitigations
  • Operating System
  • Plesk
  • Reviews
  • Securing VPS/Servers
  • Security Patches
  • SSL Certificates
  • Uncategorized
  • Upgrading
  • VPS/Servers management guides
  • Vulnerability Detection
  • Web servers software
  • Webhosting Control Panel
  • About
  • Advertise
  • Careers
  • Contact

© 2025 JNews - Premium WordPress news & magazine theme by Jegtheme.

No Result
View All Result
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon

© 2025 JNews - Premium WordPress news & magazine theme by Jegtheme.

Welcome Back!

Login to your account below

Forgotten Password?

Retrieve your password

Please enter your username or email address to reset your password.

Log In
Thabet