Bereitstellen von Mediawiki unter Debian (sehr einfach)

Wenn Sie ein eigenes Wiki benötigen, aber nicht wissen, wo Sie anfangen sollen, heißen wir Sie willkommen. Ich bin neu in Linux, dies wird mir insbesondere Schritt für Schritt helfen. Berücksichtigt:


  1. Debian installieren
  2. LAMPENstapel
  3. Starten Sie auf dieser Basis Wiki auf der beliebten Mediawiki-Engine

Verteilungen auswählen


  • OS - wählen Sie Debian. Ich weiß nicht warum. Insbesondere debian-10.2.0-amd64-netinst.iso. Die Distribution lohnt sich natürlich immer, den letzten Stall zu nehmen, siehe debian.org .
  • Mediawiki - weil dieses Projekt bis heute gut unterstützt wird. Ich habe mir DokuWiki genau angesehen, aber die neueste Distribution stammt aus dem Jahr 2018, und die Handbücher sind eindeutig nicht für Anfänger gedacht.
  • Apache, MariaDB und php73 - wie von Mediawiki empfohlen .

Ein Memo für diejenigen, die mit Linux nicht sehr vertraut sind
  1. Linux , , .
  2. root, – , , su. (, ), exit.
  3. , , , ssh su .
  4. ssh PuTTY. .

Ausrüstung


  • es spielt überhaupt keine Rolle Es kann eine virtuelle Maschine sein, es kann ein Stück Eisen sein.
    Wenn Sie nur über sehr wenige Ressourcen verfügen, lesen Sie die Installationsanforderungen .

Installieren Sie Debian OS


– Linux, , , . , «»-«», SSH, . , , .. " Mediawiki" .
.


. Language, Location, Keymap, Network

.



– English



Location – Russian Federation (other – Europe – Russian Federation)





Locales – United States



Keymap to use – American English




, , DHCP-, .


Hostname for this system.


, wiki02. : , wiki mediawiki – . , .


Domain name


DNS-.


Users, Clock, Partitions

. Root password



User for non-administrative activities


  • Full name of the user – , aslan. , , , , , , etc.
  • Username – aslan



— Moscow



  • Partitioning method – Guided – use entire disk
  • Select disk to partition –
  • Partitioning scheme – All files in one partition,
  • Finish partitioning and write changes to disk
  • Write changes to disks – Yes

Package manager, HTTP Proxy, Usage Survey, Software Selection

Configure the package manager


  • Scan another CD or DVD – No
  • Debian archive mirror country – Russian Federation
  • Debian archive mirror – deb.debian.org

HTTP proxy


- ,


Configuring popularity-contest


Participate in the package usage survey – .


Software selection


Choose software to install: SSH . … , .


GRUB, Finish, ,

Install the GRUB


  • Install the GRUB boot loader to the master boot record? – , Yes.
  • Device for boot loader installation – ( Enter device manually)

Finish the installation


  • , / .

  • SSH -root .
    su #   root
    apt-get update && apt-get upgrade


" Debian"


, , , , LAMP (PHP, MariaDB Apache). , .


LAMP Stack


, SSH su. , , mysql Debian “buster” (10.3):


apt-get install apache2 mariadb-server php php-mysql libapache2-mod-php php-xml php-mbstring # sudo,   -y,     .


apt-get install php-apcu php-intl imagemagick inkscape php-gd php-cli php-curl git -y
systemctl restart apache2

MySQL


mysql -u root -p
CREATE USER 'new_mysql_user'@'localhost' IDENTIFIED BY 'THISpasswordSHOULDbeCHANGED';
CREATE DATABASE my_wiki;
use my_wiki;
GRANT ALL ON my_wiki.* TO 'new_mysql_user'@'localhost';
quit;
#    ,   THISpasswordSHOULDbeCHANGED       .

PHP


, , :


  • /etc/php/7.3/apache2/php.ini ( nano /etc/php/7.3/apache2/php.ini), , - ( su, )

    • upload_max_fileseze = 2M # 50. , – , , - , .
    • memory_limit = 128M # 128, –

    • Ctrl+O, Ctrl+X nano
    • :wq vi

« LAMP»


, ( Hyper-V) , .


MediaWiki


– .


, :


cd /tmp/
wget https://releases.wikimedia.org/mediawiki/1.34/mediawiki-1.34.0.tar.gz
tar -xvzf /tmp/mediawiki-*.tar.gz
mkdir /var/lib/mediawiki
mv mediawiki-*/* /var/lib/mediawiki

– .


. .


apt-get install mediawiki -y

(1.34 vs 1.31), apt-get update . , , .


« Mediawiki»


- , . , (. ), , .


MediaWiki


http:// /mediawiki . , , . #, wiki02.aslan.local, . , FQDN. , , .



: ru – . , : ru —


,




  • MySQL , . , – , , .
  • - .


  • – , .
  • : , .

    • – «», , . , portal02admin
    • . , .
    • .
  • .



LocalSettings.php


, MediaWiki ( ). , .. , – ‘LocalSettings (3).php’. , «3» . , ( LocalSettings.php, ).


  • .
  • . Windows, pscp. Windows, . , , , /etc/mediawiki/LocalSettings.php, mv .


    • , pscp.exe . Downloads . powershell (Shift+ «» , , powershell, cd)


    • powershell:


      .\pscp.exe '.\LocalSettings (wiki02_20200225).php' aslan@wiki02.aslan.local:/home/aslan/LocalSettings.php #   :
      #.\pscp.exe –   
      # '.\LocalSettings (wiki02_20200225).php' – ,  
      #aslan@wiki02.aslan.local – @__
      #:/home/aslan/ -   ,  .    , ..              Access Denied
      #LocalSettings.php –      


  • « »
    mv /home/aslan/LocalSettings.php /etc/mediawiki/LocalSettings.php#   !

    .



All Articles