MediaWiki Install Warning

1 views

実現する機能

CentOS 7.7 に MediaWiki を Install しようとしたら、下記画面が表示されました。警告(Warning)が3個あるので潰して(Resolve)みました。
(画像はクリックすると拡大表示します。以下同)
以下、解決策の手順を記した備忘録です。

1.SQLight –> MariaDB

MariaDB構築手順

2.APCu、intl、ImageMagick、gitのInstall

#APCu,php-intl,ImageMagick,gitのInstall
[root@ufuso ~]# yum install -y –enablerepo=epel,remi,remi-php72 php-intl php-devel php-pecl-apcu
インストール:
php-intl.x86_64 0:7.2.30-1.el7.remi
php-pecl-apcu.x86_64 0:5.1.18-1.el7.remi.7.2

依存性関連をインストールしました:
libicu62.x86_64 0:62.1-3.el7.remi

完了しました!

#ImageMagickのInstall

[root@ufuso ~]# yum -y install ImageMagick ImageMagick-devel
インストール:
ImageMagick.x86_64 0:6.7.8.9-18.el7 ImageMagick-devel.x86_64 0:6.7.8.9-18.el7

依存性関連をインストールしました:
OpenEXR-libs.x86_64 0:1.7.1-7.el7
bzip2-devel.x86_64 0:1.0.6-13.el7
freetype-devel.x86_64 0:2.8-14.el7
ilmbase.x86_64 0:1.0.3-7.el7
jasper-devel.x86_64 0:1.900.1-33.el7
libICE-devel.x86_64 0:1.0.9-9.el7
libSM-devel.x86_64 0:1.2.2-2.el7
libXext-devel.x86_64 0:1.3.3-3.el7
libXt-devel.x86_64 0:1.1.5-3.el7
libgs-devel.x86_64 0:9.25-2.el7_7.3
libjpeg-turbo-devel.x86_64 0:1.2.90-8.el7
libpng-devel.x86_64 2:1.5.13-7.el7_2
libtiff-devel.x86_64 0:4.0.3-32.el7
libwmf-lite.x86_64 0:0.2.8.4-41.el7_1

完了しました!

#gitのInstall
[root@ufuso ~]# yum -y install git
インストール:
git.x86_64 0:1.8.3.1-21.el7_7

依存性関連をインストールしました:
perl-Error.noarch 1:0.17020-2.el7 perl-Git.noarch 0:1.8.3.1-21.el7_7
perl-TermReadKey.x86_64 0:2.30-20.el7

完了しました!

#脆弱性回避のために.htaccessファイルの編集
[root@ufuso ~]# vi /usr/share/nginx/html/mwiki/images/.htaccess
# Protect against bug T30235

RewriteEngine On
RewriteOptions inherit
RewriteCond %{QUERY_STRING} \.[^\\/:*?\x22<>|%]+(#|\?|$) [nocase]
RewriteRule . – [forbidden]
# Fix for bug T64289
Options +FollowSymLinks

#以下を追記(add)

<Directory>
# Ignore .htaccess files
AllowOverride None
# Serve HTML as plaintext, don’t execute SHTML
AddType text/plain .html .htm .shtml .php
# Don’t run arbitrary PHP code.
php_admin_flag engine off
# If you’ve other scripting languages, disable them too.
</Directory>

#restart nginx php-fpm
[root@ufuso ~]# systemctl restart nginx php-fpm

以上