Menyebarkan Mediawiki di Debian (sangat mudah)

Jika Anda membutuhkan Wiki Anda sendiri, tetapi tidak tahu harus mulai dari mana, selamat datang. Saya baru mengenal Linux, ini akan membantu langkah demi langkah saya khususnya. Dianggap:


  1. menginstal Debian
  2. LAMP stack
  3. luncurkan atas dasar ini Wiki pada mesin Mediawiki yang populer

Memilih Distribusi


  • OS - pilih Debian. Saya tidak tahu kenapa. Lebih khusus lagi, debian-10.2.0-amd64-netinst.iso. Distribusi, tentu saja, selalu layak untuk diambil dari stabil terakhir, lihat debian.org .
  • Mediawiki - karena proyek ini didukung dengan baik hingga hari ini. Saya melihat dari dekat ke DokuWiki, tetapi tanggal distribusi terakhir kembali ke tahun 2018, dan manualnya jelas tidak dirancang untuk pemula.
  • Apache, MariaDB dan php73 - seperti yang direkomendasikan oleh Mediawiki .

Memo untuk mereka yang tidak terlalu mengenal Linux
  1. Linux dan semua yang berfungsi di dalamnya sangat sensitif terhadap huruf besar / kecil.
  2. root, – , , su. (, ), exit.
  3. , , , ssh su .
  4. ssh PuTTY. .

Peralatan


  • itu tidak masalah sama sekali. Ini bisa berupa mesin virtual, bisa berupa sepotong besi.
    Jika Anda memiliki sumber daya yang sangat sedikit, lihat persyaratan Instalasi .

Instal 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