123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- <!DOCTYPE html>
- <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title>Self-hosted Wikipedia Style Wiki with MediaWiki on Debian</title>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- <meta charset="UTF-8">
- <meta name="keywords" content="Debian,Home Lab,Home Lab Ideas,Install Guide,Self-Hosted,Browser Based,Web Based,Web Based Tools,FOSS,Linux,Open Source,Open Source Software,PHP Based Wiki,WikiMedia,Self-Hosted Wikipedia,PHP,MariaDB,Apache HTTPD,MySQL,LAMP,Web Server,How To Install WikiMedia On Debian,How To Self-Host Wikipedia,How To Run WikiMedia On Linux,How To,Tutorial,i12bretro">
- <meta name="author" content="i12bretro">
- <meta name="description" content="Self-hosted Wikipedia Style Wiki with MediaWiki on Debian">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <meta name="revised" content="08/24/2023 08:19:52 PM" />
- <link rel="icon" type="image/x-icon" href="includes/favicon.ico">
- <script type="text/javascript" src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
- <script type="text/javascript" src="includes/js/steps.js"></script>
- <link href="css/steps.css" rel="stylesheet" type="text/css" />
- </head>
- <body>
- <div id="gridContainer">
- <div class="topMargin"></div>
- <div id="listName" class="topMargin">
- <h1>Self-hosted Wikipedia Style Wiki with MediaWiki on Debian</h1>
- </div>
- <div></div>
- <div id="content">
- <ol>
- <li>Log into the Debian device</li>
- <li>Run the following commands in a terminal:
- <div class="codeBlock"># update repositories and install any available software updates<br />
- sudo apt update<br />
- sudo apt upgrade -y<br />
- # install Apache HTTPD and MySQL<br />
- sudo apt-get install apache2 mariadb-server mariadb-client curl<br />
- # install PHP components<br />
- sudo apt install php php-common php-mysql php-cli php-json php-opcache php-gd php-curl php-gd php-mbstring php-xml php-xmlrpc php-soap php-intl php-zip<br />
- # configure the MySQL database<br />
- sudo su<br />
- mysql_secure_installation</div>
- </li>
- <li>Press Enter to login as root</li>
- <li>Type Y and press Enter to set a root password, type the password twice to confirm</li>
- <li>Type Y and press Enter to remove anonymous users</li>
- <li>Type Y and press Enter to disallow root login remotely</li>
- <li>Type Y and press Enter to remove the test database</li>
- <li>Type Y and press Enter to reload privilege tables</li>
- <li>Run the following command to login into MySQL:
- <div class="codeBlock">mysql -u root -p</div>
- </li>
- <li>Authenticate with the root password set earlier</li>
- <li>Run the following commands to create the MediaWiki database and database user
- <div class="codeBlock">CREATE DATABASE wikidb;<br />
- GRANT ALL ON wikidb.* TO 'wikiuser'@'localhost' IDENTIFIED BY 'WikiW1k1Wh@t!!';<br />
- FLUSH PRIVILEGES;<br />
- EXIT;<br />
- exit</div>
- </li>
- <li>Continue with the following commands to download and extract MediaWiki in the Apache webroot
- <div class="codeBlock"># download latest MediaWiki version<br />
- sudo wget -O mediawiki.tar.gz https://releases.wikimedia.org/mediawiki/1.35/mediawiki-1.35.1.tar.gz<br />
- # extract mediawiki.tar.gz<br />
- sudo tar xzvf mediawiki.tar.gz --directory /var/www/html<br />
- # rename mediawiki folder<br />
- sudo mv /var/www/html/mediawiki* /var/www/html/wiki<br />
- # set the owner of the new wiki directory to www-data<br />
- sudo chown -R www-data:www-data /var/www/html/wiki<br />
- # restart apache2 service<br />
- sudo systemctl restart apache2</div>
- </li>
- <li>Open a web browser and navigate to http://DNSorIP/wiki</li>
- <li>Click the set up the wiki first link</li>
- <li>Select a language > Click Continue</li>
- <li>Scroll to the bottom of the page and click Continue</li>
- <li>Enter the database host, name, username and password > Click Continue
- <p>Host: localhost<br />
- Name: wikidb<br />
- Username: wikiuser<br />
- Password: WikiW1k1Wh@t!!</p>
- </li>
- <li>Leave Use the same account as for installation checked and click Continue</li>
- <li>Give the Wiki a name and create an administrator username and password</li>
- <li>Uncheck the Share data about this installation with MediaWiki developers box</li>
- <li>Check the I'm bored already, just install the wiki box</li>
- <li>Click Continue and the Continue again to begin the installation</li>
- <li>After the installation completes click Continue</li>
- <li>Download the generated LocalSettings.php to the Downloads directory</li>
- <li>Run the following command in terminal to place the LocalSettings.php in the correct location
- <div class="codeBlock">sudo mv ~/Downloads/LocalSettings.php /var/www/html/wiki</div>
- </li>
- <li>Back in the browser click the enter your wiki link</li>
- <li>Click the Log In link at the top right</li>
- <li>Log in with the administrator account created during the installation </li>
- <li>Welcome to WikiMedia</li>
- </ol> </div>
- </div>
- </body>
- </html>
-
|