如果您需要自己的Wiki,但不知道从哪里开始,欢迎您。我是Linux的新手,这将特别有助于我的循序渐进。考虑:
- 安装Debian
- 灯栈
- 在此基础上启动流行的Mediawiki引擎上的Wiki
选择分布
- 操作系统-选择Debian。我不知道为什么。更具体地说,是debian-10.2.0-amd64-netinst.iso。当然,该发行版始终值得一看,请访问debian.org。
- Mediawiki-因为迄今为止该项目得到了很好的支持。我仔细查看了DokuWiki,但最新发行版可以追溯到2018年,并且手册显然不是为初学者设计的。
- Apache,MariaDB和php73- 由Mediawiki推荐。
给那些不太熟悉Linux的人的备忘录- Linux , , .
- root, – , , su. (, ), exit.
- , , , ssh su .
- ssh PuTTY. .
设备
- 没关系。它可以是虚拟机,也可以是一块铁。
如果资源很少,请查看安装要求。
安装Debian OS
– Linux, , , . , «»-«», SSH, . , , .. " Mediawiki" .
.
. Language, Location, Keymap, Network.
![](https://habrastorage.org/webt/i1/jf/ye/i1jfyeqxzmrkxjsu_xzdsbdalwq.png)
– English
![](https://habrastorage.org/webt/qs/yn/yf/qsynyfq1tf4103bj5xlxoy9tqlw.png)
Location – Russian Federation (other – Europe – Russian Federation)
![](https://habrastorage.org/webt/et/68/vd/et68vdhd6bntqpbgeekovsbh5u4.png)
![](https://habrastorage.org/webt/oc/67/mp/oc67mphdjhaqy5ihhvltd_4tpwc.png)
![](https://habrastorage.org/webt/jv/zc/cp/jvzccpbgj5dazn9lldvf9spsnve.png)
Locales – United States
![](https://habrastorage.org/webt/xq/zr/zj/xqzrzjmvee7eq7ogdpvihqkvxgq.png)
Keymap to use – American English
![](https://habrastorage.org/webt/gm/b1/mz/gmb1mzbklxil9tlglleqbw7dpwg.png)
, , DHCP-, .
Hostname for this system.
, wiki02. : , wiki mediawiki – . , .
![](https://habrastorage.org/webt/wp/d-/xh/wpd-xhnpmrwiv7iqqkmzuize40y.png)
Domain name
DNS-.
![](https://habrastorage.org/webt/kb/8o/wx/kb8owxexrs4r3sagxkmxjdaimny.png)
Package manager, HTTP Proxy, Usage Survey, Software Selection 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
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;
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) , .
– .
, :
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 . , , .
- , . , (. ), , .
http:// /mediawiki . , , . #, wiki02.aslan.local, . , FQDN. , , .
: ru – . , : ru —
![](https://habrastorage.org/webt/ms/ox/kx/msoxkxmjomvyrv4xh48xn4pgvvw.png)
,
![](https://habrastorage.org/webt/cy/8_/2t/cy8_2tgepqykg7wcxkpeugjrllo.png)
- MySQL , . , – , , .
![](https://habrastorage.org/webt/hc/hz/wu/hchzwusxqyrbcrshrkdr7fq9r70.png)
- - .
![](https://habrastorage.org/webt/of/kj/uk/ofkjukgyrl-7vxcngwms8hso2xq.png)
- – , .
- : , .
- – «», , . , portal02admin
- . , .
- .
- .
![](https://habrastorage.org/webt/fj/kf/iw/fjkfiwoav4gfu6hh18oz_wc6vji.png)
LocalSettings.php
, MediaWiki ( ). , .. , – ‘LocalSettings (3).php’. , «3» . , ( LocalSettings.php, ).
![](https://habrastorage.org/webt/fy/vh/ik/fyvhikpcd04gykkbpdb5fx2pcs8.png)
- .
. 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
- « »
mv /home/aslan/LocalSettings.php /etc/mediawiki/LocalSettings.php
.