pages tagged installing http://meng6net.localhost/tag/installing/ <p><small>Copyright © 2005-2020 by <code>Meng Lu &lt;lumeng3@gmail.com&gt;</code></small></p> Meng Lu's home page ikiwiki Tue, 16 May 2017 23:59:39 +0000 Installing and configuring Git-Mediawiki http://meng6net.localhost/computing/installing_and_configuring/installing_and_configuring_git-mediawiki/ http://meng6net.localhost/computing/installing_and_configuring/installing_and_configuring_git-mediawiki/ computing configuration documentation draft installing note software tip Tue, 16 May 2017 23:59:39 +0000 2017-05-16T23:59:39Z <h2>Ubuntu Linux</h2> <pre><code>sudo apt-get install git-mediawiki mediawiki sudo apt-get install mediawiki-extensions-math memcached clamav mysql-server postgresql-contrib </code></pre> <h2>macOS</h2> <h3>Install Perl modules</h3> <p>Update cpan:</p> <pre><code>brew doctor brew update brew install cpanminus </code></pre> <p>Intall Perl modules:</p> <pre><code>sudo cpan install MediaWiki::API sudo cpan install DateTime::Format::ISO8601 </code></pre> <p>Optionally, in particular, if the above cpan installing commands fail, try to re-initliaze cpan configuration:</p> <pre><code>mv ~/.cpan ~/.cpan.bak cpan config </code></pre> <h2>Installing git-media executables</h2> <p>Download the <code>git.git/tree/contrib/mw-to-git</code> subdirectory of the <code>git.git</code> Git repository from kernel.org:</p> <pre> <code>http://git.kernel.org/cgit/git/git.git/tree/contrib/mw-to-git </code></pre> <p>Or clone the <code>git.git</code> repository from http://git.kernel.org/cgit/git/</p> <pre><code>git clone git://git.kernel.org/pub/scm/git/git.git </code></pre> <p>Copy the <code>git-remote-mediawiki.perl</code> executable to git execution path:</p> <pre> <code>sudo cp git/contrib/mw-to-git/git-remote-mediawiki.perl "$(git --exec-path)/git-remote-mediawiki" sudo chmod a+x "$(git --exec-path)/git-remote-mediawiki" sudo cp git/contrib/mw-to-git/git-mw.perl "$(git --exec-path)/git-mw" sudo chmod a+x "$(git --exec-path)/git-mw" </code></pre> <h2><code>PERL5LIB</code> environment variable</h2> <p>Define <code>PERL5LIB</code> environment variable in <code>$HOME/.bashrc</code>:</p> <pre> <code>####################################################################### #+ PERL5LIB environment variable #+ #+ ## References #+ * https://github.com/moy/Git-Mediawiki/wiki/User-manual #+ * ## GIT="$HOME/path/to/repo/git" export PERL5LIB=$GIT/perl:$GIT/contrib/mw-to-git </code></pre> <h2>Set up local mediawiki repository</h2> <pre><code>cd XmydirX git init XmymediawikirepoX chmod 600 .git/config # you're going to put a password there # so don't keep it world-readable! cd XmymediawikirepoX git remote add origin mediawiki::http://XexampleX.XcomX/XwikiX/ # edit .git/config and set the right variables in the [remote "origin"] section # such as # mwLogin = XXX # shallow = true git fetch origin </code></pre> <h2>References</h2> <ul> <li>Git-Mediawiki user manual, <a href= "https://github.com/moy/Git-Mediawiki/wiki/User-manual">https://github.com/moy/Git-Mediawiki/wiki/User-manual</a></li> </ul>