How to Run MediaWiki on Ubuntu
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
- 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
May be interested
- Tips and tricks after installing Ubuntuubuntu is one of the completely free open source operating systems. this is a distribution (distro) of linux with the second highest amount of traffic after linux mint.
- What is Ubuntu? Why should you use Ubuntu to replace Windows?what is ubuntu? why should you use ubuntu to replace windows? currently, ubuntu is much more popular than before and is strongly developed. in this article, the software tips will help you learn about ubuntu and why ubuntu should be used instead of windows.
- How to run Ubuntu 18.04 or 18.10 on Raspberry Piraspberry pi and ubuntu seem like an ideal combination, but don't have an official standard ubuntu image for single-board computers.
- How to Install Ubuntu 13.10ubuntu is a kind of linux operating system designed to run on desktop and laptop computers. ubuntu is an open-source program, meaning its code can be accessed and modified by end users. and because it's free, ubuntu is said to be the most...
- What's new in Ubuntu 18.04? Should updatethe ubuntu 18.04 lts 'bionic beaver' update promises to bring a host of new features to linux computers. if you're wondering what's new in ubuntu 18.04? should i update ubuntu 18.04 or not? the answer will be given to you in tipsmake's article below
- 5 things to do when installing Ubuntu on PCubuntu is a powerful linux distribution suitable for a wide variety of use cases, ideal for both beginners and seasoned linux users.
- How to install Ubuntu 22.04 LTS on PC or laptopwhether you are trying linux for the first time or simply want a reliable alternative to windows, ubuntu is always a great choice.
- How to Customize Ubuntu 23.04 to Look Like macOSubuntu 23.04 lunar lobster, released in april 2023, brings many interesting features. despite stiff competition from operating systems like macos and windows, ubuntu still manages to create a niche for itself in the market.
- Ubuntu 22.10 Kinetic Kudu will end support on July 20, users should upgrade nowcanonical officially released ubuntu 22.10 'kinetic kudu' version last october.
- Ways to install Ubuntu on Windows, run in parallel or run separatelythere are many ways to install ubuntu on your computer, such as installing ubuntu from usb, cd, installing ubuntu running in parallel with windows, installing it