How to Run MediaWiki on Ubuntu
MediaWiki is a free software wiki package written in PHP, and it is currently used by several projects of non-profit Wikimedia Foundation and by several other projects like that of wikiHow . This guide may help you to run Mediawiki on...
Method 1 of 3:
Configure MySQL
- Note: You may skip this step if you were prompted to create a mysql root password during MySQL installation
- Set up a mysql root password. When you set it up, remember not to use the same password for mysql root and system root. Also note this password somewhere safe so that you could use it later when in need. For setting up a mysql password run the following command:
mysqladmin -u root password ""
history -c
Method 2 of 3:
Configure PHP
- Mediawiki is completely based on PHP and therefore we have to configure it in order to run mediawiki. But these steps are optional. You can skip them entirely (or do them later) and MediaWiki should still work.
- Begin by editing your configuration file. They are located somewhere like, /etc/php5/apache2/php.ini or /etc/php5/php.ini or maybe /etc/apache2/php/php.ini .
sudo nano /etc/php5/apache2/php.ini
- Set or Adjust the Maximum Upload File size. Assuming that various files are going to uploaded to Wiki, upload limit should be maximized or adjusted .About one-half way down is the File Uploads section. Change
1=upload_max_filesize = 2M
at least 10 MB with1=upload_max_filesize = 10M
. You can adjust it again in the future if you wish . - Increase the memory limit of the script. Memory Limit . Some PHP scripts usually require a lot of memory to run. If it is already 12 or more , leave as it is .To increase the memory limit of a script, change the following entry
1=memory_limit = 8M
to1=memory_limit = 12M
- Uncomment the line about extensions. Extensions. PHP MySQL support has to be enabled first . To do so , scroll down a little further and make sure to uncomment the following line
1=extension=mysql.so
- Save and exist gedit and restart the Apache web server
sudo apache2ctl restart
.
Method 3 of 3:
Configure Mediawiki
- Edit the apache.conf file at /etc/mediawiki/apache.conf. Use
sudo gedit /etc/mediawiki/apache.conf
- Uncomment the following line.
Alias /mediawiki /var/lib/mediawiki
- Replace /mediawiki with the name you want it to appear in the URL.
- Save and exit out of the editor and restart Apache. Use
sudo apache2ctl restart
- Navigate to http://localhost/mediawiki or to http://wiki.hostname.com/ (if you own a domain pointing to that server) and continue with the setup . If everything goes right, you would be prompted to complete a form . Make sure you fill in all the essentials.
- Choose a name for your wiki and also choose a language and license
- Choose a suitable username and set a good password . You could also setup a contact mail
- Under Database Config, you may change the database name and DB username to new values, but you must turn on "Use superuser account", name root, giving the mysql root password you configured earlier .
- Under MySQL specific options, you can also configure-Data Table Prefix ,Storage Engine,Database character set .
- Click on Install Mediawiki. Well what are you waiting for , just click the install or the parent director button! Once configurations are done, you need to move LocalSettings.php to complete the installation .The configuration page will have the exact directory/filename that must be moved. Use
sudo chmod a+rwx /var/lib/mediawiki/config
sudo mv /var/lib/mediawiki/config/LocalSettings.php /etc/mediawiki
- Remove the config subdirectly entirely for securing your site. Change
sudo mv config/LocalSettings.php
tosudo rm -rf config
- Navigate your browser to your wiki(ie http://server_ip_address/wiki or to http://server_ip_address/wiki/index.php . Possibly server_ip_address = localhost, so http://localhost/wiki may work.
- Invite everyone to your project and enjoy .
4.5 ★ | 2 Vote
You should read it
- Backup and restore MySQL with mysql-zrm on Debian Sarge
- How to Send Sql Queries to Mysql from the Command Line
- How to install MySQL on Ubuntu 20.04
- How to install and configure MySQL server on Pi
- How to Connect to MySQL Using PHP
- Instructions for installing MySQL on Windows and remote access
- How to create a database in MySQL
- How to Check Database Size in MySQL
- How to install MySQL Workbench Community Edition on Windows 10
- Instructions on how to connect to MySQL Database in Eclipse
- How to Learn PHP and MySQL
- MySQL vulnerabilities allow malicious servers to steal data from customers