Setting up a mediawiki instance on the sandbox: Difference between revisions
No edit summary |
No edit summary |
||
(6 intermediate revisions by one other user not shown) | |||
Line 28: | Line 28: | ||
Now go to the wiki setup script: https://hub.xpub.nl/sandbox/~USERNAME/wiki/mw-config/index.php | Now go to the wiki setup script: https://hub.xpub.nl/sandbox/~USERNAME/wiki/mw-config/index.php | ||
In Step 2 (database: | In Step 2 (database): | ||
Database name (no hyphens): Enter USERNAMEwiki | Database name (no hyphens): Enter USERNAMEwiki | ||
Line 36: | Line 36: | ||
Database name (no hyphens): Enter the password you used above | Database name (no hyphens): Enter the password you used above | ||
Give the wiki a name and fill in the administrator account info. When in doubt, leave things at the default values. | |||
At the end, download the "LocalSettings.php" file. | |||
Normally you just upload this file unchanged to the wiki to finish your install. However for the sandbox you have to tweak one line in this file, open the file with a text editor and look for: | |||
$wgScriptPath = "/wiki"; | |||
and change it to: | |||
$wgScriptPath = "/sandbox/~USERNAME/wiki"; | |||
Upload it to the sandbox (use filezilla) and place it in the wiki folder in your public_html. Visit: https://hub.xpub.nl/sandbox/~USERNAME/wiki/ | |||
=== Uploads === | |||
Enable uploads in your LocalSettings.php, | |||
$wgEnableUploads = true; # Enable uploads | |||
and change permissions on the images folder | |||
sudo chgrp www-data images | |||
sudo chmod 775 images | |||
== See also == | == See also == | ||
Line 41: | Line 65: | ||
* https://www.raspberrypi.org/documentation/remote-access/web-server/nginx.md | * https://www.raspberrypi.org/documentation/remote-access/web-server/nginx.md | ||
* [[User:Rita_Graca/trimester6/technicaldocumentation#Installing_Mediawiki_on_the_pi | Rita's Notes]] | * [[User:Rita_Graca/trimester6/technicaldocumentation#Installing_Mediawiki_on_the_pi | Rita's Notes]] | ||
[[Category:MediaWiki]] |
Latest revision as of 13:26, 20 September 2024
Instructions
ssh to the sandbox
cd public_html
Download the latest mediawiki (copy link location from mediawiki download page)...
wget https://releases.wikimedia.org/mediawiki/1.35/mediawiki-1.35.1.tar.gz
tar xf mediawiki-1.35.1.tar.gz
Rename the wiki folder something short like "wiki"
mv mediawiki-1.35.1 wiki
Setup the database: SEE Rita's Notes PART 6!
NB: REPLACE USERNAME with your user name!
sudo mysql -u root -p CREATE DATABASE USERNAMEwiki; CREATE USER 'USERNAMEwiki'@'localhost' IDENTIFIED BY 'SOMEPASSWORD'; GRANT ALL PRIVILEGES ON USERNAMEwiki.* TO 'USERNAMEwiki'@'localhost'; FLUSH PRIVILEGES; quit
Now go to the wiki setup script: https://hub.xpub.nl/sandbox/~USERNAME/wiki/mw-config/index.php
In Step 2 (database):
Database name (no hyphens): Enter USERNAMEwiki Database table prefix (no hyphens): (leave blank)
Database username: Enter USERNAMEwiki Database name (no hyphens): Enter the password you used above
Give the wiki a name and fill in the administrator account info. When in doubt, leave things at the default values.
At the end, download the "LocalSettings.php" file.
Normally you just upload this file unchanged to the wiki to finish your install. However for the sandbox you have to tweak one line in this file, open the file with a text editor and look for:
$wgScriptPath = "/wiki";
and change it to:
$wgScriptPath = "/sandbox/~USERNAME/wiki";
Upload it to the sandbox (use filezilla) and place it in the wiki folder in your public_html. Visit: https://hub.xpub.nl/sandbox/~USERNAME/wiki/
Uploads
Enable uploads in your LocalSettings.php,
$wgEnableUploads = true; # Enable uploads
and change permissions on the images folder
sudo chgrp www-data images sudo chmod 775 images