IT/Software/Mediawiki/How to Install MediaWiki: Difference between revisions

From msgwiki
< IT‎ | Software‎ | Mediawiki
Jump to navigation Jump to search
Access restrictions were established for this page. If you see this message, you have no access to this page.
No edit summary
 
(11 intermediate revisions by 2 users not shown)
Line 3: Line 3:
* Ubuntu Server 18.04.3 LTS
* Ubuntu Server 18.04.3 LTS
* In my install I have all additions enabled.
* In my install I have all additions enabled.
* Apache2 Installed
* Apache2 Installed.
* Installing and setting up MariaDB for MediaWiki is also covered on this page.
* Installing and setting up MariaDB for MediaWiki is also covered on this page.


Line 28: Line 28:
===Install PHP Modules===
===Install PHP Modules===
----
----
* <code>sudo apt install php7.2 php7.2-mbstring php7.2-xml </code>
* <code>sudo apt install php7.2 php7.2-mbstring php7.2-xml php7.2-mysql php7.2-gd php7.2-intl</code>


=== Download and Install MediaWiki ===
=== Download and Extract MediaWiki ===
----
----
# Download and extract [https://www.mediawiki.org/wiki/Download Mediawiki] tarball latest stable version 1.34.0 at time of writing
# Navigate to webroot.
#* <code>cd /var/www/html</code>
#* <code>cd /var/www/html</code>
#* Remove default index.html
# Remove default index.html
#** <code>rm index.html</code>
#* <code>rm index.html</code>
# Download and extract [https://www.mediawiki.org/wiki/Download Mediawiki] tarball latest stable version 1.34.0 at time of writing.
#* <code>wget https://releases.wikimedia.org/mediawiki/1.34/mediawiki-1.34.0.tar.gz</code>
#* <code>wget https://releases.wikimedia.org/mediawiki/1.34/mediawiki-1.34.0.tar.gz</code>
#Extract MediaWiki tarball
#* <code>tar -xvf mediawiki-1.34.0.tar.gz</code>
#* <code>tar -xvf mediawiki-1.34.0.tar.gz</code>
#Rename extracted folder to <strong>mediawiki</strong>
#* <code>mv mediawiki-1.34.0 mediawiki</code>
#* <code>mv mediawiki-1.34.0 mediawiki</code>
#* Remove tarball
# Remove tarball
#** <code>rm mediawiki-1.34.0.tar.gz</code>
#* <code>rm mediawiki-1.34.0.tar.gz</code>


=== Web installation ===
----
----
==== THIS PAGE IS NOT COMPLETE ====
*After you get to the "Connect to database" page input the following information
----
#Database Host:<code>localhost</code>
#Database Name:<code>mediawiki</code>
#Database table prefix can be left blank.
#Database Username:<code>mediawikiuser</code>
#Database Password:<code>user_password_here</code>
#Finsh the web instalation and then your wiki is all ready to be used. YAY!

Latest revision as of 11:32, 17 January 2020

Prerequisites


  • Ubuntu Server 18.04.3 LTS
  • In my install I have all additions enabled.
  • Apache2 Installed.
  • Installing and setting up MariaDB for MediaWiki is also covered on this page.

Install MariaDB


  1. sudo apt-get install mariadb-server mariadb-client
  2. sudo mysql_secure_installation
  3. Restart MariaDB
    • sudo systemctl restart mariadb.service

Create MediaWiki Database


  1. sudo mysql -u root -p
  2. Then create a database called mediawiki
    • CREATE DATABASE mediawiki;
  3. Create a database user called mediawikiuser with new password
    • CREATE USER 'mediawikiuser'@'localhost' IDENTIFIED BY 'new_password_here';
  4. Then grant the user full access to the database.
    • GRANT ALL ON mediawiki.* TO 'mediawikiuser'@'localhost' IDENTIFIED BY 'user_password_here' WITH GRANT OPTION;
  5. Save and Exit
    • FLUSH PRIVILEGES;
    • EXIT;

Install PHP Modules


  • sudo apt install php7.2 php7.2-mbstring php7.2-xml php7.2-mysql php7.2-gd php7.2-intl

Download and Extract MediaWiki


  1. Navigate to webroot.
    • cd /var/www/html
  2. Remove default index.html
    • rm index.html
  3. Download and extract Mediawiki tarball latest stable version 1.34.0 at time of writing.
  4. Extract MediaWiki tarball
    • tar -xvf mediawiki-1.34.0.tar.gz
  5. Rename extracted folder to mediawiki
    • mv mediawiki-1.34.0 mediawiki
  6. Remove tarball
    • rm mediawiki-1.34.0.tar.gz

Web installation


  • After you get to the "Connect to database" page input the following information
  1. Database Host:localhost
  2. Database Name:mediawiki
  3. Database table prefix can be left blank.
  4. Database Username:mediawikiuser
  5. Database Password:user_password_here
  6. Finsh the web instalation and then your wiki is all ready to be used. YAY!