I took a challenge of running MediaWiki with Visual Editor extension on openSUSE 13.1 x64. Task sounds maybe easy, but turned out to be little madness, so once I got this working I think it might be nice to share my steps.

Operating system has been deployed from ISO image: openSUSE-13.1-NET-x86_64.iso.

Installing Node.js

Basically Node.js package which is included in distro doesn’t work properly. For that reason first step is to add new repository for Node.js:

sudo zypper ar http://download.opensuse.org/repositories/devel:/languages:/nodejs/openSUSE_13.1/ Node.js
sudo zypper in nodejs nodejs-devel
yast -i nodejs

 

Updating NPM

Once Node.js is installed it’s not quite fully working yet and any attempt of using npm fails. Some symlinks are missing, so to fix it we can just update npm:

curl -L https://npmjs.org/install.sh | sudo sh

 

Parsoid deployment

Now we can download Parsoid and make it work:

cd /srv
git clone https://gerrit.wikimedia.org/r/p/mediawiki/services/parsoid
cd parsoid
npm install
npm test
npm start
Parsoid will be located in /srv/parsoid folder. Do not forget to modify /srv/parsoid/api/localsettings.js for your system.

This is quite brief description, however saves lot of time and fight with Node.js and npm on openSUSE.