Skip to content

Sådan Installerer du MediaWiki på Ubuntu 24.04

Netcloud24
Cloud Infrastructure Expert
NetCloud24 Expert Guides Open the dedicated video page

Video transcript: NetCloud24 Expert Guides. Practical knowledge for a reliable cloud. Cloud and VPS expertise, security, performance, and step-by-step tutorials. Learn, deploy, and keep building with NetCloud24.

 

 

Installation af MediaWiki på din VPS-server, der kører Ubuntu 24.04, er en enkel proces. Følg disse trin for hurtigt at få det sat op.

Trin 1: Opdater dit system

        sudo apt update && sudo apt upgrade -y
    

Trin 2: Installer de nødvendige pakker

Installer de nødvendige pakker til MediaWiki:

        sudo apt install apache2 mysql-server php php-mysql php-xml php-mbstring php-zip -y
    

Trin 3: Download MediaWiki

Skift til webmappen og download den nyeste version af MediaWiki:

        cd /var/www/html
        sudo wget https://releases.wikimedia.org/mediawiki/1.38/mediawiki-1.38.0.tar.gz
        sudo tar -xvzf mediawiki-1.38.0.tar.gz
        sudo mv mediawiki-1.38.0 mediawiki
    

Trin 4: Konfigurer Apache

Opret en ny Apache-konfigurationsfil til MediaWiki:

        sudo nano /etc/apache2/sites-available/mediawiki.conf
    

Indsæt følgende konfiguration:

<VirtualHost *:80>
            DocumentRoot /var/www/html/mediawiki

Aktivér den nye side og omskrivningsmodulet:

        sudo a2ensite mediawiki
        sudo a2enmod rewrite
        sudo systemctl restart apache2
    

Trin 5: Opret databasen

Log ind på MySQL for at oprette en database til MediaWiki:

Visual overview of Sådan Installerer du MediaWiki på Ubuntu 24.04
Visual overview: Sådan Installerer du MediaWiki på Ubuntu 24.04
        sudo mysql -u root -p
    

Udfør derefter følgende kommandoer:

        CREATE DATABASE wikidb;
        CREATE USER 'wikiuser'@'localhost' IDENTIFIED BY 'dit_password';
        GRANT ALL PRIVILEGES ON wikidb.* TO 'wikiuser'@'localhost';
        FLUSH PRIVILEGES;
        EXIT;
    

Trin 6: Konfigurer MediaWiki

Gå til MediaWiki-kataloget og start installationen:

        cd /var/www/html/mediawiki
        sudo php maintenance/install.php --dbtype=mysql --dbserver=localhost --dbname=wikidb --dbuser=wikiuser --dbpass=dit_password --installdb
    

Trin 7: Afslut installationen

Åbn din webbrowser og gå til:

        http://din_server_ip
    

Følg instruktionerne på skærmen for at afslutte installationen.

Konklusion

Ved at følge disse trin har du succesfuldt installeret MediaWiki på din VPS-server, der kører Ubuntu 24.04. Nyd din nye wiki!

Windows VPS Deutschland

Windows VPS España

Windows VPS Nederland

Windows VPS Italia

Key topics covered in Sådan Installerer du MediaWiki på Ubuntu 24.04
Key topics covered in this NetCloud24 guide.

Windows VPS Portugal

VPS Windows Italia

Windows VPS

Windows VPS

Windows VPS Sverige

Windows VPS Norge

Windows VPS

Windows VPS Türkiye

Practical checklist for Sådan Installerer du MediaWiki på Ubuntu 24.04
Practical checklist for applying the guidance in this article.

Windows RDS (Remote Desktop Services)

Windows VPS

Sådan Installerer du MediaWiki på Ubuntu 24.04
Sådan Installerer du MediaWiki på Ubuntu 24.04
Explore more

More on this topic

Netcloud24
Netcloud24
Cloud Infrastructure Expert · NetCloud24

Comments are closed.