Manual:Installing MediaWiki

From mediawiki.org
This page is a translated version of the page Manual:Installing MediaWiki and the translation is 16% complete.
Outdated translations are marked like this.

This page covers steps to manually install MediaWiki, with additional configuration steps found at Manual:System_administration#Configuration.

MediaWiki installation requires basic familiarity with using a web host. It is easier if you have some experience with Apache (web server software), PHP and MySQL/MariaDB (database). Additional help is available at Project: Support desk.

The Appendices section below offers alternatives to manual installation. It also provides installation notes for specific system configurations.

If you are already running MediaWiki, see the Upgrade guide.

Check the installation requirements

Check that your system meets the installation requirements.

Make sure to also check the Produktbemærkninger (Release Notes) of the MediaWiki version that you plan to install.

Download MediaWiki-softwaren

Download the MediaWiki tar file from the official download page.

Generally, if you're using a production environment, you want to be running the latest stable release, which is MediaWiki 1.41.0.

Extract the MediaWiki software

Download-filerne er i .tar.gz format og skal udpakkes før brug. You need to uncompress this archive file before use. Dette kan gøres lokalt (og så oploades via FTP) eller direkte på serveren.

Dette gøres normalt med software såsom 7-Zip (gratis), WinZip, WinRAR eller IZArc (gratis) på Windows.

På Linux og Mac OS X kan du udpakke filen med kommandoen: tar -xzvf mediawiki-*.tar.gz

If you uncompress the archive file while being the root/admin user, you may want to change file ownership afterwards, depending on your setup. On Linux systems, the command would be using chown as the following: chown -R <new_owner_user> <mediawiki_folder> More info: Manual:Security#File_permissions


Oploadede filer

Hvis du ikke allerede har uploadet filerne til din webserver, så gør det nu.

Overføre filerne til din webservers web-mappe enten ved at:

  1. direkte kopiering af den udpakkede mappe eller
  1. ved brug af en FTP client såsom FileZilla (Open Source Software, Windows, OSX og Linux) eller Cyberduck (OSX).
  1. by using software already provided by your hosting service, such as the cPanel File Manager

Sørg for, at "ændre filnavne til små bogstaver"-indstillingen for upload er deaktiveret.

Hvis du har installeret Apache er den korrekte mappe specificeret i din httpd.conf fil (den normale <apache-folder>/htdocs). By default, this is /var/www/ or <apache-folder>/htdocs.

The exact location of the Apache server settings and directories file httpd.conf depends on your operating system. Hvis du bruger Linux eller Unix server kan du kopiere filerne til enhver mappe på serveren og så lave et symbolsk link til mappen fra serverens web-mappe. In Red Hat and Fedora, the file is /etc/httpd/conf/httpd.conf.

Omdøb den oploadede mappe til et hvilket som helst navn, som du vil have i URL'en. Hvis webserveren for eks. kører som http://localhost betyder omdøbning til /w/ mappen, at adgang wikien fås på http://localhost/w/index.php.

Do not use /wiki/ if you want to set it up as a Short URL after running the installation script.

Opret en database

MediaWiki spørger dig om database- og brugernavn og forsøger at oprette dem, hvis de ikke allerede findes.

Hvis du allerede har en database og kender rod-password til den, kan MediaWiki installationsscriptet oprette en ny database til dig.

Hvis du ikke kender rod-passwordet, for eksempel hvis du er på en hosted server, bliver du nødt til at oprette en ny database nu.

MariaDB/MySQL are the recommended databases. PostgreSQL and SQLite have limited support and should not be used unless there is a reason to. If you're unsure which database to choose, use MariaDB.

After finishing the database setup, continue with #Run the installation script below.

SQLite

No further setup is required for SQLite if the pdo-sqlite module for PHP is installed on the system.

På installationssiden er du nød til at vælge et database-navn (hvad som helst) og SQLite database-mappen. Til database-mappe vil installations-programmet forsøge at anvende en undermappe uden for dokumentroden og om nødvendig oprette den. Hvis mappen ikke er sikker (for eks. web-læsbar), skift navnet manuelt for at undgå den bliver tilgængelig for alle på internettet.

MariaDB/MySQL

Create the MariaDB/MySQL database and database user. There are several ways:

  • Use a control panel software offered by your Hosting service (example: PhpMyAdmin)
  • Use ssh to log into your host and type the commands below into a MySQL prompt. Se den tilhørende dokumentation. Alternativt kan du kontakte din vært udbyder, for at få dem til at oprette en konto til dig.

The following commands create a database named my_wiki, a user named wikiuser, and set permissions for the user on that database.

CREATE DATABASE my_wiki;
CREATE USER 'wikiuser'@'localhost' IDENTIFIED BY 'database_password';
GRANT ALL PRIVILEGES ON my_wiki.* TO 'wikiuser'@'localhost' WITH GRANT OPTION;

Hvis din database ikke kører på samme server som din webserver, skal du give den rette web-server værtnavn - eksempelvis mediawiki.example.com - som følger:

GRANT ALL PRIVILEGES ON my_wiki.* TO 'wikiuser'@'mediawiki.example.com' IDENTIFIED BY 'database_password';
Advarsel Advarsel: MySQL/MariaDB logs all queries in a history file. It will include the database password for the user account. If this concerns you, delete and disable the .mysql_history file after running these queries by following the MySQL documentation.

PostgreSQL

Hvis du bruger Postgres, skal du enten have en database og bruger oprettet til dig, eller blot levere navnet på en Postgres bruger med 'superbruger'-privilegier til konfigurations-skemaet. Dette er ofte database-brugeren med navnet postgres.

The following commands on a Linux command-line, as the postgres user, create a database user named wikiuser, and a database named my_wiki owned by the user named wikiuser.

 createuser -S -D -R -P -E wikiuser (then enter the database password)
 createdb -O wikiuser my_wiki

eller som superbruger (standandnavn: postgres) udfør følgende forespørgsler i database-prompten:

CREATE USER wikiuser WITH NOCREATEDB NOCREATEROLE NOSUPERUSER ENCRYPTED PASSWORD 'database_password';
CREATE DATABASE my_wiki WITH OWNER wikiuser;

Run the installation script

Når alle ovenstående trin er fuldført, kan du fuldføre installationen gennem en webbrowser ved at gå til index.php URI i din browser - læs instruktionen nævnt i Manual:Config script .

Further configuration

Opdater!

Efter installationen skal du sørge for at holde dig ajour med opdateringer, for at holde din server sikker!

https://lists.wikimedia.org/postorius/lists/mediawiki-announce.lists.wikimedia.org/

Appendices

Alternatives to manual installation

Manual installation is often the preferred method because it gives the user more control and insight into how their wiki is installed, making troubleshooting and maintenance easier. Automated processes, packages, bundles, and services all come with their own idiosyncrasies.

Instead of manually installing MediaWiki, alternative options might be easier:

Ved oprettelse af rod-kontoen, brug en adgangskode, som du er i stand til at huske.

System-specific instructions

The pages listed on Manual:OS specific help give more detailed installation instructions aimed at specific systems.

However, by and large these per-system docs are less maintained and might not always be up to date. First consult Installing MediaWiki (this page) before looking at per-system installation documentation.

Running multiple wikis

Importing an existing wiki database

Se også