You may also read this page at:
- http://wiki.4intra.net/Mediawiki4Intranet (Russian)
- http://wiki.4intra.net/Mediawiki4Intranet/en (English)
Mediawiki4Intranet is a MediaWiki distribution containing many extensions and patches useful for intranet (and not only for intranet) usage. It is also important that mostly all of these extensions are improved and tested to work together — integration bugs are fixed and some new features are added.
Mediawiki4Intranet requires a lot of additional system software, so the simplest way to install it is by using a Docker script.
Take it from here: https://github.com/mediawiki4intranet/docker
There is a README
Minimal requirements:
- PHP 5.3 or later (PHP 7 is supported).
- Web server: nginx + php_fpm is the best. You may use Apache if you want.
- MySQL/MariaDB >= 5.1 or PostgreSQL >= 9.0.
- Debian Linux is preferred.
- You may use any other Linux distro or FreeBSD, but it's harder to install all required software there.
- Other UNIX-like OSes or Windows may also work, but with problems.
- php-mysqlnd / php-pgsql for interaction with the database (mysql / postgresql)
- php-gd
- php-curl for uploading files via URL.
- PHP opcode cacher (APC, XCache, ZendOpCache) is highly recommended
- Under PHP < 5.6, php5-fss for faster string operations
- Mail and Net_SMTP PEAR packages for e-mail.
- post_max_size, upload_max_filesize = 128M or more
- If your PHP is < 5.3: short_open_tag = Off
- If your PHP is < 5.4: magic_quotes_gpc = Off
- PDF: GhostScript, Poppler — former Xpdf (windows)
- DJVU: djvulibre, netpbm (windows).
- LaTeX (for <m>…</m>): a TeX distribution, TeXLive in Debian, usually MiKTeX on Windows.
- dvisvgm for vector (SVG) display of math formulas.
- ffmpeg for FLV/MP4-video (windows builds).
- Graphviz, preferably 2.27 or later.
- GNUPlot.
- UMLGraph.
- UMLet.
- Java for UMLGraph, UMLet, PlantUML.
- Sphinx search: Sphinx.
- zip and unzip utilities for importing and exporting file uploads (windows: zip, unzip)
- Modified Apache Tika (http://tika.apache.org/) for indexing binary file contents.
apt-get install zip unzip poppler-utils \ netpbm librsvg2-bin djvulibre-bin texlive-base texlive-extra-utils ffmpeg \ dia graphviz gnuplot plotutils umlet default-jre diffutils imagemagick sphinxsearch \ nginx php7.0-fpm php7.0-cli php7.0-json php7.0-opcache php7.0-mbstring php7.0-curl php7.0-gd \ php7.0-intl php7.0-mysql php7.0-xml php7.0-zip php-imagick php-apcu php-apcu-bc php-mail php-net-smtp
After running this command, the only software which must be installed manually will be:
Downloaded tika-app.jar should be put to system auto-start (for example /etc/rc.local), with the following arguments:java -jar tika-app-1.2-fix-TIKA709-TIKA964.jar -p 127.0.0.1:8072 -t -eutf-8
First of all, you need to install the software listed in System Requirements.
Then, clone index repository:
git clone --depth=1 https://github.com/mediawiki4intranet/configs.git mediawiki/configs
Run repo.php to fetch the code with all extensions:
php mediawiki/configs/repo.php install mediawiki4intranet ro
Create images subdirectory and grant web-server read-write access into it:
mkdir mediawiki/images chown www-data:www-data mediawiki/images
Create an empty MySQL database and user for MediaWiki:
mysql -u root -p <<EOF CREATE DATABASE mediawiki; GRANT ALL PRIVILEGES ON mediawiki.* TO mediawiki@localhost IDENTIFIED BY 'mediawiki'; FLUSH PRIVILEGES; EOF
Create minimal mediawiki/LocalSettings.php including predefined configuration:
<?php require_once 'configs/ServerSettings.php'; # use this under UNIX, or BaseSettings.php under Windows $wgDBname = 'mediawiki'; # database name $wgDBuser = 'mediawiki'; # login and password for database user $wgDBpassword = 'mediawiki'; $wgDBadminuser = $wgDBuser; $wgDBadminpassword = $wgDBpassword; $wgScriptPath = '/mediawiki';
Initialise database:
cd mediawiki php maintenance/patchSql.php maintenance/tables.sql php maintenance/update.php
Optionally configure Sphinx search (careful, do not overwrite your existing config if you have one):
cd mediawiki php configs/maintenance/configure-sphinx.php --localsettings LocalSettings.php mv sphinx.conf /etc/sphinxsearch service sphinxsearch restart cat >> LocalSettings.php <<EOF require_once "$IP/extensions/SphinxSearchEngine/SphinxSearchEngine.php"; $wgSphinxQL_index = 'wiki'; EOF php extensions/SphinxSearchEngine/rebuild-sphinx.php
At this point you're done and have a working Mediawiki4Intranet installation, with all included extensions and patches.
If you have commit access and want to participate in development, use read-write installation instead of read-only:
git clone https://github.com/mediawiki4intranet/configs.git mediawiki/configs php mediawiki/configs/repo.php install mediawiki4intranet rw
Then develop as usual, and after push'ing to any extension or core, just run the following inside your 'configs' working copy:
php repo.php update git push
CAUTION: Since recently, repo.php doesn't use different URLs for read-only and read-write clones. So, to push to github via ssh, use the built-in Git feature:
git config --global url.ssh://[email protected] https://github.com
To create your own bundle, fork this repository, clone it or switch your existing 'configs' working copy to it (it must be cloned as read-write), and then use the inclusion feature of repo.php:
Create your own 'my-super-bundle.ini' in your 'configs' working copy using the following template:
[_params] include[] = mediawiki4intranet ;; Optionally add your own repository url prefixes: ;prefix.my-server = git:http://my.site/git/$REPO.git ; And add some extensions like this: [extensions/MyExtension] repo = my-server:MyExtension ;; You may override the checked out branch using: ;branch = master ;; Or remove extensions like this: ;[extensions/Wikilog] ;repo =
Then run:
php repo.php install my-super-bundle rw git add my-super-bundle.ini my-super-bundle-index.ini git commit -m "Created a fork of MediaWiki4Intranet bundle with my own extension!" git push
As you already may have noticed, this doesn't change any files of our distribution, so the resulting repository will be very easy to merge with newer versions of ours.
There is an older Windows bundle of Mediawiki4Intranet which is rarely updated and does not include all the latest features, but you can also try it under Windows.
Just download it, unpack to D:\wiki4intranet\, run D:\wiki4intranet\xampp-control.exe, start Apache and MySQL via clicking "Start" buttons, and point your browser to http://localhost/wiki/, and login with WikiSysop/Wiki4IntraNet login/password.
Warning: do NOT use this bundle for production. Consider Docker image instead.
MAYBE:
- Setup remotes for additional repositories of the same module (i.e. wikimedia for our forks)
- Support automatic calling maintenance/update.php for DB updates
- Support 'soft update' for the case of added extensions:
- First update configs dir except *Settings.php
- Then update the code, then update *Settings.php so missing extension files do not crash the live site.
- But maybe it's a bad idea just because updating the live site is a bad idea itself.