<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://qingliezhiquan.com/mediawiki/index.php?action=history&amp;feed=atom&amp;title=%E6%80%8E%E4%B9%88%E5%9C%A8_ArchLinux_%E4%B8%AD%E4%BD%BF%E7%94%A8_MediaWiki</id>
	<title>怎么在 ArchLinux 中使用 MediaWiki - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://qingliezhiquan.com/mediawiki/index.php?action=history&amp;feed=atom&amp;title=%E6%80%8E%E4%B9%88%E5%9C%A8_ArchLinux_%E4%B8%AD%E4%BD%BF%E7%94%A8_MediaWiki"/>
	<link rel="alternate" type="text/html" href="https://qingliezhiquan.com/mediawiki/index.php?title=%E6%80%8E%E4%B9%88%E5%9C%A8_ArchLinux_%E4%B8%AD%E4%BD%BF%E7%94%A8_MediaWiki&amp;action=history"/>
	<updated>2026-08-11T01:39:40Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.46.0</generator>
	<entry>
		<id>https://qingliezhiquan.com/mediawiki/index.php?title=%E6%80%8E%E4%B9%88%E5%9C%A8_ArchLinux_%E4%B8%AD%E4%BD%BF%E7%94%A8_MediaWiki&amp;diff=8358&amp;oldid=prev</id>
		<title>Mwroot at 00:50, 30 September 2025</title>
		<link rel="alternate" type="text/html" href="https://qingliezhiquan.com/mediawiki/index.php?title=%E6%80%8E%E4%B9%88%E5%9C%A8_ArchLinux_%E4%B8%AD%E4%BD%BF%E7%94%A8_MediaWiki&amp;diff=8358&amp;oldid=prev"/>
		<updated>2025-09-30T00:50:59Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw-interface=&quot;&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 08:50, 30 September 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;《怎么在 ArchLinux 中使用 MediaWiki》&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;以下只为尝试。真用，我还是推荐用 Debian，或 WSL2，或云服务器。ArchLinux 只适合年轻人，有精力去试错。&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;以下只为尝试。真用，我还是推荐用 Debian，或 WSL2，或云服务器。ArchLinux 只适合年轻人，有精力去试错。&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key selfmoney_wiki:diff:1.41:old-7974:rev-8358:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Mwroot</name></author>
	</entry>
	<entry>
		<id>https://qingliezhiquan.com/mediawiki/index.php?title=%E6%80%8E%E4%B9%88%E5%9C%A8_ArchLinux_%E4%B8%AD%E4%BD%BF%E7%94%A8_MediaWiki&amp;diff=7974&amp;oldid=prev</id>
		<title>Mwroot: Created page with &quot;《怎么在 ArchLinux 中使用 MediaWiki》  以下只为尝试。真用，我还是推荐用 Debian，或 WSL2，或云服务器。ArchLinux 只适合年轻人，有精力去试错。  == MediaWiki 本体 == &lt;syntaxhighlight lang=&quot;bash&quot; line&gt; # 在 archlinux，redis 已经被 valkey 取代了。valkey 兼容 redis 的协议。原本的 redis 在 LocalSettings.php 中的配置方式依然有效 sudo pacman -S mediawiki mariadb php apache php-apache php-intl imagemagick...&quot;</title>
		<link rel="alternate" type="text/html" href="https://qingliezhiquan.com/mediawiki/index.php?title=%E6%80%8E%E4%B9%88%E5%9C%A8_ArchLinux_%E4%B8%AD%E4%BD%BF%E7%94%A8_MediaWiki&amp;diff=7974&amp;oldid=prev"/>
		<updated>2025-09-29T02:28:14Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;《怎么在 ArchLinux 中使用 MediaWiki》  以下只为尝试。真用，我还是推荐用 Debian，或 WSL2，或云服务器。ArchLinux 只适合年轻人，有精力去试错。  == MediaWiki 本体 == &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line&amp;gt; # 在 archlinux，redis 已经被 valkey 取代了。valkey 兼容 redis 的协议。原本的 redis 在 LocalSettings.php 中的配置方式依然有效 sudo pacman -S mediawiki mariadb php apache php-apache php-intl imagemagick...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;《怎么在 ArchLinux 中使用 MediaWiki》&lt;br /&gt;
&lt;br /&gt;
以下只为尝试。真用，我还是推荐用 Debian，或 WSL2，或云服务器。ArchLinux 只适合年轻人，有精力去试错。&lt;br /&gt;
&lt;br /&gt;
== MediaWiki 本体 ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line&amp;gt;&lt;br /&gt;
# 在 archlinux，redis 已经被 valkey 取代了。valkey 兼容 redis 的协议。原本的 redis 在 LocalSettings.php 中的配置方式依然有效&lt;br /&gt;
sudo pacman -S mediawiki mariadb php apache php-apache php-intl imagemagick php-imagick php-gd git diffutils valkey php-redis&lt;br /&gt;
&lt;br /&gt;
sudo systemctl start valkeyservice&lt;br /&gt;
sudo systemctl enable valkey.service&lt;br /&gt;
sudo systemctl status valkey.service&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line&amp;gt;&lt;br /&gt;
# /etc/php/conf.d/ 下的 igbinary.ini 关了 igbinary 拓展，需要打开它&lt;br /&gt;
[igbinary]&lt;br /&gt;
extension=igbinary.so&lt;br /&gt;
&lt;br /&gt;
# /etc/php/conf.d/ 下的 redis.ini 关了 redis 拓展，需要打开它&lt;br /&gt;
extension=redis&lt;br /&gt;
&lt;br /&gt;
# 不打开，MediaWiki 是不可能找到 redis.so 及 valkey.services 的&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== MariaDB 数据库 ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line&amp;gt;&lt;br /&gt;
sudo chown -R mysql:mysql /var/lib/mysql&lt;br /&gt;
&lt;br /&gt;
# 创建 root@localhost mysql@localhost，两个账号都无密码&lt;br /&gt;
# 这里其实创建了数据库类型为 mysql&lt;br /&gt;
sudo mariadb-install-db --user=mysql --basedir=/usr/ --ldata=/var/lib/mysql/&lt;br /&gt;
&lt;br /&gt;
sudo systemctl start mysqld&lt;br /&gt;
sudo systemctl enable mysqld&lt;br /&gt;
sudo systemctl status mysqld&lt;br /&gt;
&lt;br /&gt;
# 设置一下 root 密码&lt;br /&gt;
# 这里其实创建了 mediawiki 后边使用的数据库用户名设为 root&lt;br /&gt;
sudo mariadb-admin -u root password YOURPASSWD&lt;br /&gt;
history -c&lt;br /&gt;
&lt;br /&gt;
# 或，可选，用脚本设置 root 密码&lt;br /&gt;
sudo mariadb_secure_installation&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Apache 服务器 ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line&amp;gt;&lt;br /&gt;
cd /etc/webapps/mediawiki&lt;br /&gt;
sudo touch httpd-mediawiki.conf&lt;br /&gt;
# 内容如下：&lt;br /&gt;
Alias /mediawiki &amp;quot;/usr/share/webapps/mediawiki&amp;quot;&lt;br /&gt;
open_basedir = &amp;quot;/tmp:/usr/share/webapps/:/var/lib/mediawiki&amp;quot;&lt;br /&gt;
&amp;lt;Directory &amp;quot;/usr/share/webapps/mediawiki&amp;quot;&amp;gt;&lt;br /&gt;
    AllowOverride All&lt;br /&gt;
    Options FollowSymlinks&lt;br /&gt;
    Require all granted&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line&amp;gt;&lt;br /&gt;
sudo touch /usr/share/webapps/mediawiki/.htaccess&lt;br /&gt;
# 内容如下：&lt;br /&gt;
order allow,deny&lt;br /&gt;
allow from all&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line&amp;gt;&lt;br /&gt;
sudo emacs /etc/httpd/conf/httpd.conf&lt;br /&gt;
# 添加以下：&lt;br /&gt;
LoadModule php_module modules/libphp.so&lt;br /&gt;
Include conf/extra/php_module.conf&lt;br /&gt;
Include /etc/webapps/mediawiki/httpd-mediawiki.conf&lt;br /&gt;
&lt;br /&gt;
# 注释掉 mpm_event_module 这一行，启用 mpm_prefork_module 这一行&lt;br /&gt;
#LoadModule mpm_event_module modules/mod_mpm_event.so&lt;br /&gt;
LoadModule mpm_prefork_module modules/mod_mpm_prefork.so&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line&amp;gt;&lt;br /&gt;
sudo emacs /etc/php/php.ini&lt;br /&gt;
# C-s 在合适位置设置如下：&lt;br /&gt;
open_basedir = &amp;quot;/tmp:/usr/share/webapps/:/var/lib/mediawiki&amp;quot;&lt;br /&gt;
# extension=gd.so php-gd php-imagick 二选一就行&lt;br /&gt;
extension=intl.so&lt;br /&gt;
extension=iconv.so&lt;br /&gt;
extension=mysqli.so&lt;br /&gt;
extension=redis.so&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line&amp;gt;&lt;br /&gt;
sudo systemctl start httpd&lt;br /&gt;
sudo systemctl enable httpd&lt;br /&gt;
sudo systemctl status httpd&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 调优 ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line&amp;gt;&lt;br /&gt;
sudo emacs /usr/share/webapps/mediawiki/LocalSettings.php&lt;br /&gt;
$wgUseImageMagick = true;&lt;br /&gt;
$wgImageMagickConvertCommand = &amp;quot;/usr/bin/convert&amp;quot;;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mwroot</name></author>
	</entry>
</feed>