Tips & Tricks : Apache2 autostart on openSUSE 13.1
In order to have Apache2 started automatically after reboot use:
systemctl enable apache2.service
In order to have Apache2 started automatically after reboot use:
systemctl enable apache2.service
In previous article I described how-to Deploy Parsoid on openSUSE 13.1 (which turns out to be quite a challenging task). Parsoid is component required for VisualEditor. Now it’s time for VisualEditor deployment.
At the moment, when I’m doing deployment, stable version of MediaWiki is 1.24.2. VisualEditor is an extension written for certain version of MediaWiki, hence we can’t just download latest version and use it. It has to be specific release for specific MediaWiki version.
So, first we download VisualEditor for MediaWiki 1.24.2:
git clone -b REL1_24 https://github.com/wikimedia/mediawiki-extensions-VisualEditor.git cd mediawiki-extensions-VisualEditor/ git submodule update --init
Once it’s done we need to place content of mediawiki-extensions-VisualEditor in extensions/VisualEditor folder under MediaWiki folder structure.
Finally, once we have all files in proper places it’s time to inform MediaWiki about VisualEditor.
Changes which have to be applied to LocalSettings.php:
# VISUAL Editor require_once("$IP/extensions/VisualEditor/VisualEditor.php"); $wgDefaultUserOptions['visualeditor-enable'] = 1; $wgHiddenPrefs[] = 'visualeditor-enable'; $wgVisualEditorParsoidURL = 'http://localhost:8000'; $wgVisualEditorParsoidPrefix = 'localhost';
From now on you can enjoy VisualEditor until you decide to upgrade to newer version of MediaWiki.
Prior to that I would suggest to check if there is VisualEditor available for new release and test it prior to live deployments.
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.
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
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
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
This is quite brief description, however saves lot of time and fight with Node.js and npm on openSUSE.
Once Request Tracker 4 is installed on Debian 7, there is one more thing to do.
Small change in Apache configuration to make RT4 website to work.
First edit Apache configuration file:
root@hostname:~# vi /etc/apache2/sites-available/default
Then add to that file (at the end):
Include /etc/request-tracker4/apache2-modperl2.conf RedirectMatch ^/$ /rt </VirtualHost>
If you want to replace string in multiple files name you can simply use PowerShell for that.
Dir -Recurse | Rename-Item -NewName { $_.name -replace "file","name-of-file" }