DĂ©ployer Mediawiki sur Debian (c'est trĂšs simple)

Si vous avez besoin de votre propre wiki mais ne savez pas par oĂč commencer, bienvenue. Je suis nouveau sur Linux, cela m'aidera pas Ă  pas en particulier. Pris en considĂ©ration:


  1. installer Debian
  2. Pile LAMP
  3. lancer sur cette base Wiki sur le moteur Mediawiki populaire

Choix des distributions


  • OS - choisissez Debian. Je ne sais pas pourquoi. Plus prĂ©cisĂ©ment, debian-10.2.0-amd64-netinst.iso. La distribution, bien sĂ»r, vaut toujours la peine de prendre le dernier de l'Ă©curie, regardez debian.org .
  • Mediawiki - car ce projet est bien soutenu Ă  ce jour. J'ai regardĂ© attentivement DokuWiki, mais la derniĂšre distribution remonte Ă  2018, et les manuels ne sont clairement pas conçus pour les dĂ©butants.
  • Apache, MariaDB et php73 - comme recommandĂ© par Mediawiki .

Un mémo pour ceux qui ne connaissent pas trÚs bien Linux
  1. Linux et tout ce qui fonctionne dessus sont trĂšs sensibles Ă  la casse.
  2. root, – , , su. (, ), exit.
  3. , , , ssh su .
  4. ssh PuTTY. .

Équipement


  • cela n'a pas d'importance du tout. Ça peut ĂȘtre une machine virtuelle, ça peut ĂȘtre un morceau de fer.
    Si vous avez trĂšs peu de ressources, consultez les exigences d'installation .

Installer 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