Difference between revisions of "How to: Host your own copy of this wiki"
Line 22: | Line 22: | ||
<code> | <code> | ||
create database if not exists ipasuswiki; | create database if not exists ipasuswiki; | ||
+ | |||
create user 'testuser'@'localhost' identified by 'testpw'; | create user 'testuser'@'localhost' identified by 'testpw'; | ||
+ | |||
grant usage on *.* to 'testuser'@'localhost' identified by 'testpw'; | grant usage on *.* to 'testuser'@'localhost' identified by 'testpw'; | ||
+ | |||
grant all privileges on ipasuswiki.* to 'testuser'@'localhost'; | grant all privileges on ipasuswiki.* to 'testuser'@'localhost'; | ||
+ | |||
flush privileges; | flush privileges; | ||
</code> | </code> |
Revision as of 20:06, 22 September 2019
Feel encouraged to host your own copy of this wiki, as I'm a big fan of decentralization and redundancy! You need:
- basic admin skills
- your own webserver with
- python
- apache
- php
- mysql
- ten minutes:
Contents
Set up a lamp
Set up apache, mysql and php. See [1]
Prepare the database
For example, if you want your database name ipasuswiki, the user name testuser with password testpw:
create database if not exists ipasuswiki;
create user 'testuser'@'localhost' identified by 'testpw';
grant usage on *.* to 'testuser'@'localhost' identified by 'testpw';
grant all privileges on ipasuswiki.* to 'testuser'@'localhost';
flush privileges;
Install media wiki
Download mediawiki. I tested this process with version 1.33.0. Extract it and move it to your webroot:
wget https://releases.wikimedia.org/mediawiki/1.33/mediawiki-1.33.0.tar.gz
tar xzf mediawiki-1.33.0.tar.gz
mv mediawiki-1.33.0 ipasuswiki; mv ipasuswiki /var/www/html/
After that, open in your browser localhost/ipasuswiki and follow the instructions.
See https://www.mediawiki.org/wiki/Manual:Installation_guide
Get a dump of this wiki
Download the official dumpgenerator script, get the dump and replace the hardcoded domain links (let's say, your domain is https://ipasusfan.org/wiki):
wget https://raw.githubusercontent.com/WikiTeam/wikiteam/master/dumpgenerator.py
python dumpgenerator.py --api=https://www.marcus-ipasus.com/woeihwiki/api.php --xml --images
(if the script complains about missing packages, let's say kitchen, simply install them: pip install kitchen)
sed -i 's/https\:\/\/www.marcus-ipasus.com\/woeihwiki/https\:\/\/ipasusfan.org\/wiki/g' *
Import the dump
Import the dump by running the import script under maintenance, see [2]:
php importDump.php ~/wikidump/marcus_ipasuscom_woeihwiki-20190922-wikidump/marcus_ipasuscom_woeihwiki-20190922-history.xml
Do yourself a favor and switch the look of user interface from the default vector to monobook. .