Installation MediaWiki: Difference between revisions

From ICO wiki
Jump to navigationJump to search
 
(15 intermediate revisions by the same user not shown)
Line 2: Line 2:
Autor: Lauri Vosandi
Autor: Lauri Vosandi


https://github.com/lauriitcollege/wiki


'''REMEMBER:''' all of the installation executed by these command line below need to be under '''ROOT''':
'''REMEMBER:''' all of the installation executed by these command line below need to be under '''ROOT''':
Line 9: Line 8:
You should install apache2, mysql-server and php by root:<br>  
You should install apache2, mysql-server and php by root:<br>  
<pre>
<pre>
lauri@kaka: sudo -i
root@kaka:~# apt-get install apache2 mysql-server php
root@kaka:~# apt-get install apache2 mysql-server php


root@kaka:~# sudo apt-get install php libapache2-mod-php php-mcrypt php-mysql
root@kaka:~# sudo apt-get install php libapache2-mod-php php-mcrypt php-mysql
root@kaka:~# apt install python-minimal
</pre>
</pre>


Line 26: Line 29:
root@kaka:/var/www/html# rm index.html
root@kaka:/var/www/html# rm index.html


root@kaka:/var/www/html# git clone //insert link here.
root@kaka:/var/www/html# git clone https://github.com/lauriitcollege/core.git


root@kaka:/var/www/html# ls
root@kaka:/var/www/html# ls
Line 32: Line 35:
If it shows directory "core", keep following:
If it shows directory "core", keep following:
<pre>
<pre>
root@kaka:/var/www/html# cd /core
root@kaka:/var/www/html# chmod 777 core
 
root@kaka:/var/www/html# cd core


root@kaka:/var/www/html/core# cp -r * /var/www/html/
root@kaka:/var/www/html/core# cp -r * /var/www/html/
Line 38: Line 43:
Check files from core already copied to main folder of html
Check files from core already copied to main folder of html
<pre>
<pre>
root@kaka:/var/www/html/core# ls
root@kaka:/var/www/html/core# cd /var/www/html/
 
root@kaka:/var/www/html/# ls
</pre>
</pre>
Now, try to refresh the page.
Now, try to refresh the page.
Line 48: Line 55:
First you need to add plugins:
First you need to add plugins:
<pre>
<pre>
root@kaka:~# cd /var/www/html


root@kaka:/var/www/html/#: python plugins.py
root@kaka:/var/www/html/#: python plugins.py
Line 64: Line 70:


<pre>
<pre>
lauri@kaka: sudo -i
root@kaka:~# cd /var/www/html
root@kaka:/var/www/html# git clone https://gerrit.wikimedia.org/r/p/mediawiki/vendor.git
root@kaka:/var/www/html# git clone https://gerrit.wikimedia.org/r/p/mediawiki/vendor.git


Line 73: Line 75:
</pre>
</pre>


if it demands '''mbstring''' or something else:
if it demands '''mbstring''' and '''xml''' or something else:


<pre>
<pre>
root@kaka:/var/www/html# apt-get install php-mbstring
root@kaka:/var/www/html# apt-get install php-mbstring
root@kaka:/var/www/html# apt-get install php-xml
root@kaka:/var/www/html# service apache2 restart
</pre>
</pre>


Line 95: Line 101:
After finish your configuration, it will automatically download the '''Localsetting.php''' to your download directory or you should click to download it manually. Follow those command line.
After finish your configuration, it will automatically download the '''Localsetting.php''' to your download directory or you should click to download it manually. Follow those command line.


You need to copy '''Localsetting.php'''  to /html directory  
You need to copy '''Localsetting.php'''  to /var/www/html/ directory  


***NOTE: your user folder is different from mine "lauri"
***NOTE: your user folder is different from mine "lauri"
Line 108: Line 114:
</pre>
</pre>


Refresh the page to see its change.
Refresh the page to see its change Or Click to "if you have install your Localsetting you can enter the wiki"


=== Install skin for wiki  ===
=== Install skin for wiki  ===
Line 128: Line 134:
Here, you have to remove the original skins folder and create the new one. Following:
Here, you have to remove the original skins folder and create the new one. Following:
<pre>
<pre>
root@kaka:/var/www/html/# chmod 777 skins


root@kaka:/var/www/html/# rm -r skins/
root@kaka:/var/www/html/# rm -r skins/
Line 139: Line 143:
Now download the skin package:
Now download the skin package:
<pre>
<pre>
root@kaka:/var/www/html/# git clone //insert link here.
root@kaka:/var/www/html/# git clone https://github.com/lauriitcollege/Vector.git


root@kaka:/var/www/html/# tar -xzf PACKAGE_NAME.tar.gz -C /var/www/html/skins
root@kaka:/var/www/html/# cd Vector/
 
root@kaka:/var/www/html/Vector/# tar -xzf Vector-REL1_27-d11a80a.tar.gz -C /var/www/html/skins
 
root@kaka:/var/www/html/Vector/# cd /var/www/html/skins
 
root@kaka:/var/www/html/skins/# ls      #check if Vector folder has been copied.


</pre>
</pre>
Line 151: Line 161:


<pre>
<pre>
root@kaka:/var/www/html/: nano Localsetting.php
root@kaka:/var/www/html/skins/# cd /var/www/html/
 
root@kaka:/var/www/html/: nano LocalSetting.php
</pre>
</pre>
and Add:
and Add:
<pre>
<pre>
wfLoadSkin( 'Vector' )
wfLoadSkin( 'Vector' );


sudo service apache2 restart  # restart apache2
sudo service apache2 restart  # restart apache2
</pre>
</pre>

Latest revision as of 01:57, 21 September 2016

Mediawiki installation

Autor: Lauri Vosandi


REMEMBER: all of the installation executed by these command line below need to be under ROOT:

Mediawiki Download and Requirements

You should install apache2, mysql-server and php by root:

lauri@kaka: sudo -i

root@kaka:~# apt-get install apache2 mysql-server php

root@kaka:~# sudo apt-get install php libapache2-mod-php php-mcrypt php-mysql

root@kaka:~# apt install python-minimal

Download

I recommend you install the newest version for wiki. Followed these command line below:

lauri@kaka: sudo -i

root@kaka: apt install git

root@kaka:~# cd /var/www/html

root@kaka:/var/www/html# rm index.html

root@kaka:/var/www/html# git clone https://github.com/lauriitcollege/core.git

root@kaka:/var/www/html# ls

If it shows directory "core", keep following:

root@kaka:/var/www/html# chmod 777 core

root@kaka:/var/www/html# cd core

root@kaka:/var/www/html/core# cp -r * /var/www/html/

Check files from core already copied to main folder of html

root@kaka:/var/www/html/core# cd /var/www/html/

root@kaka:/var/www/html/# ls

Now, try to refresh the page.

Solving Problems

After refreshing the page. It could give you some of error which is normal.

First you need to add plugins:


root@kaka:/var/www/html/#: python plugins.py

If it shows you this error related to php:

sudo apt-get install php libapache2-mod-php php-mcrypt php-mysql

sudo service apache2 restart

If it shows you this error: "some external libraries that MediaWiki requires are no longer"

you need to install:

root@kaka:/var/www/html# git clone https://gerrit.wikimedia.org/r/p/mediawiki/vendor.git

root@kaka:/var/www/html# service apache2 restart

if it demands mbstring and xml or something else:

root@kaka:/var/www/html# apt-get install php-mbstring

root@kaka:/var/www/html# apt-get install php-xml

root@kaka:/var/www/html# service apache2 restart

Installation

Now, refresh the page, if it gives no error, you need to click to install your wiki and configure your page:

Keep following the step what wiki page gives.

- Configure Database where you need to put your root account as well as Administrator account for main page.

- Configure wiki's name in which you will define your wiki page's name

- Configure some basic website interface such as language..so forth.

Localsetting.php

After finish your configuration, it will automatically download the Localsetting.php to your download directory or you should click to download it manually. Follow those command line.

You need to copy Localsetting.php to /var/www/html/ directory

      • NOTE: your user folder is different from mine "lauri"

lauri@kaka: sudo -i

root@kaka:~# cd /home/lauri/Downloads/

root@kaka:/home/lauri/Downloads/# cp -r Localsetthing.php /var/www/html/

Refresh the page to see its change Or Click to "if you have install your Localsetting you can enter the wiki"

Install skin for wiki

After copying the Localsetting.php to your own html folder. Refresh the page if nothing changes it will give you the message below:

"Whoops! The default skin for your wiki, defined in $wgDefaultSkin as vector, is not available."

it means you need to install the skin (theme) for wiki. Here I will take Vector ( skin's name ) to install.


lauri@kaka: sudo -i

root@kaka:~# cd /var/www/html/

Here, you have to remove the original skins folder and create the new one. Following:


root@kaka:/var/www/html/# rm -r skins/

root@kaka:/var/www/html/# mkdir skins   # Remember to make a new skins folder, and check if it has created.

Now download the skin package:

root@kaka:/var/www/html/# git clone https://github.com/lauriitcollege/Vector.git

root@kaka:/var/www/html/# cd Vector/

root@kaka:/var/www/html/Vector/# tar -xzf Vector-REL1_27-d11a80a.tar.gz -C /var/www/html/skins

root@kaka:/var/www/html/Vector/# cd /var/www/html/skins

root@kaka:/var/www/html/skins/# ls       #check if Vector folder has been copied.

Check the Vector folder has already in the skins folder. If it does, One more step to finish your Wiki installation.

Now open the Localsetting.php and add the line in the end: ;


root@kaka:/var/www/html/skins/# cd /var/www/html/

root@kaka:/var/www/html/: nano LocalSetting.php

and Add:

wfLoadSkin( 'Vector' );

sudo service apache2 restart  # restart apache2