Mediawiki git installation guide: Difference between revisions

No edit summary
No edit summary
 
(6 intermediate revisions by the same user not shown)
Line 10: Line 10:
git pull --recurse-submodules
git pull --recurse-submodules
git submodule update --init --recursive # 20250507 submodule 更新了 977 - 255 = 722 MB
git submodule update --init --recursive # 20250507 submodule 更新了 977 - 255 = 722 MB
sudo apt-get install apache2 mariadb-server php php-mysql libapache2-mod-php php-xml php-mbstring php-apcu php-intl imagemagick inkscape php-gd php-cli php-curl php-bcmath # 安装依赖
去官网安装最新版本的 composer
sudo composer update --no-dev
sudo composer update --no-dev
</syntaxhighlight>
</syntaxhighlight>
Line 31: Line 33:
第二步,配置 数据库
第二步,配置 数据库
<syntaxhighlight lang="sql" line>
<syntaxhighlight lang="sql" line>
sudo mariadb root -p
sudo mariadb -u root -p
CREATE DATABASE my_wiki;
CREATE DATABASE my_wiki;
CREATE USER 'wikiuser'@'localhost' IDENTIFIED BY 'database_password';
CREATE USER 'dbuser'@'localhost' IDENTIFIED BY 'database_password';
GRANT ALL PRIVILEGES ON my_wiki.* TO 'wikiuser'@'localhost' WITH GRANT OPTION;
或 SET PASSWORD FOR 'dbuser'@'localhost' = PASSWORD('database_password');
GRANT ALL PRIVILEGES ON my_wiki.* TO 'dbuser'@'localhost' WITH GRANT OPTION;
-- 注:数据库名,用户名,密码,均自行更改为自己能记住的
-- 注:数据库名,用户名,密码,均自行更改为自己能记住的
</syntaxhighlight>
</syntaxhighlight>
Line 53: Line 56:
</syntaxhighlight>
</syntaxhighlight>


第七步,更新文件索引:<code>php maintenance/update.php</code>
[[Category: MediaWiki]]
[[Category: MediaWiki]]