This tutorial will guide you on how to install MediaWiki on OpenSUSE Latest.
Update the package repository on your system:
sudo zypper refresh
Install the required packages for running MediaWiki:
sudo zypper install apache2 mysql-community-server php7 php7-mysqlnd php7-apache2 php7-gd php7-xml php7-mbstring php7-json ImageMagick unzip
Once all the packages are installed successfully, create a database for MediaWiki:
mysql -u root -p
Enter the MySQL root password. Then create a new database:
CREATE DATABASE mediawikidb;
GRANT ALL PRIVILEGES ON mediawikidb.* TO 'mediawikiuser'@'localhost' IDENTIFIED BY 'yourpassword';
FLUSH PRIVILEGES;
Replace yourpassword
with a strong password.
Download and extract MediaWiki:
cd /var/www/html/
sudo wget https://releases.wikimedia.org/mediawiki/1.35/mediawiki-1.35.0.tar.gz
sudo tar -zxvf mediawiki-1.35.0.tar.gz
sudo mv mediawiki-1.35.0 mediawiki
Rename the LocalSettings.php
file:
cd /var/www/html/mediawiki/
sudo mv LocalSettings.php LocalSettings.php.bk
Set the ownership and permissions:
sudo chown -R wwwrun:www /var/www/html/mediawiki
sudo chmod -R 755 /var/www/html/mediawiki
Configure Apache for MediaWiki. Create a new configuration file:
sudo vi /etc/apache2/conf.d/mediawiki.conf
And add the following configuration:
<Directory "/var/www/html/mediawiki">
AllowOverride All
Require all granted
</Directory>
Enable the Apache rewrite module:
sudo a2enmod rewrite
Restart Apache and MySQL:
sudo systemctl restart apache2
sudo systemctl restart mysql
Access the MediaWiki web installer via your web browser: http://your_server_ip/mediawiki/
Follow the installation steps, and provide the database name (mediawikidb), the database user (mediawikiuser), and the database password (yourpassword). Use the default settings for the rest of the installation.
When the installation is complete, remove the setup
directory:
sudo rm -rf /var/www/html/mediawiki/mw-config/
Access the MediaWiki homepage via your web browser: http://your_server_ip/mediawiki/
That's it! You've successfully installed MediaWiki on OpenSUSE Latest.
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!