MediaWiki/Deployment: Difference between revisions
Antonizoon (talk | contribs) (Created page with "Now, the MediaWiki code itself can be set up. Download the MediaWiki code using the following command, then unzip and move to : {{bc| curl -O https://releases.wikimedia.org/m...") |
Antonizoon (talk | contribs) No edit summary |
||
Line 28: | Line 28: | ||
And: | And: | ||
{{bc| | {{bc|<nowiki> | ||
# Uncomment after installation! | # Uncomment after installation! | ||
location / { | location / { | ||
Line 34: | Line 34: | ||
rewrite ^/([^?]*)(?:\?(.*))? /index.php?title=$1&$2 last; | rewrite ^/([^?]*)(?:\?(.*))? /index.php?title=$1&$2 last; | ||
} | } | ||
}} | </nowiki>}} | ||
Restart the nginx server to load the new configuration. Your MediaWiki site is ready to use. | Restart the nginx server to load the new configuration. Your MediaWiki site is ready to use. | ||
{{bc|sudo systemctl restart nginx}} | {{bc|sudo systemctl restart nginx}} |
Revision as of 14:16, 9 April 2017
Now, the MediaWiki code itself can be set up. Download the MediaWiki code using the following command, then unzip and move to :
curl -O https://releases.wikimedia.org/mediawiki/1.28/mediawiki-1.28.1.tar.gz
tar xvzf mediawiki-1.28.1.tar.gz
sudo mv mediawiki-1.28.1 /var/www/
sudo ln -s /var/www/mediawiki-1.28.1 /var/www/mediawiki
Configuration
Start the MediaWiki configuration by going to http://your-server-ip.org/mw-config/:
The installation will prompt you for your MySQL/MariaDB username and password, as well as the database name. Default extensions can then be enabled and disabled.
After the configuration is complete, you will receive a LocalSettings.php file with the configurations created. Upload this file to the server using sftp, replacing the placeholders with your username and your server domain:
sftp <em>[email protected]</em> (your-username at your-server dot org)
Then move the LocalSettings.php file to the /var/www/mediawiki/ directory.
Finally, uncomment these two sections of LocalSettings.php:
location ^~ /mw-config/ { internal; } #Uncomment after installation
And:
# Uncomment after installation!
location / {
index index.php;
rewrite ^/([^?]*)(?:\?(.*))? /index.php?title=$1&$2 last;
}
Restart the nginx server to load the new configuration. Your MediaWiki site is ready to use.
sudo systemctl restart nginx