20201217在mediawiki安裝並啟用SimpleMathJax

出自金門農工維基館II
跳至導覽 跳至搜尋
(1) [root@lfwiki ~]# cd /var/www/html/lftree/
[root@lfwiki lftree]# wget https://github.com/jmnote/SimpleMathJax/archive/master.zip
:
2020-12-17 01:10:32 (4.40 MB/s) - ‘master.zip’ saved [6579]
[root@lfwiki lftree]#

(2)[root@lfwiki lftree]# unzip -l master.zip
Archive:  master.zip
387be3210336d88780d78356088029c2892c24b2
  Length      Date    Time    Name
---------  ---------- -----   ----
        0  11-15-2020 23:18   SimpleMathJax-master/
      186  11-15-2020 23:18   SimpleMathJax-master/.editorconfig
      104  11-15-2020 23:18   SimpleMathJax-master/.gitmodules
     1063  11-15-2020 23:18   SimpleMathJax-master/LICENSE
     3166  11-15-2020 23:18   SimpleMathJax-master/README.md
      391  11-15-2020 23:18   SimpleMathJax-master/SimpleMathJax.php
     1770  11-15-2020 23:18   SimpleMathJax-master/SimpleMathJaxHooks.php
     1332  11-15-2020 23:18   SimpleMathJax-master/extension.json
        0  11-15-2020 23:18   SimpleMathJax-master/resources/
        0  11-15-2020 23:18   SimpleMathJax-master/resources/MathJax/
     3996  11-15-2020 23:18   SimpleMathJax-master/resources/ext.SimpleMathJax.js
---------                     -------
    12008                     11 files
[root@lfwiki lftree]#

(3)
# mv lftree/master.zip kmvswiki2/extensions/
[root@lfwiki html]# ls kmvswiki2/extensions/
CategoryTree  ImageMap            Nuke             README           SyntaxHighlight_GeSHi
Cite          InputBox            OATHAuth         Renameuser       TemplateData
CiteThisPage  Interwiki           PageImages       ReplaceText      TextExtracts
CodeEditor    LocalisationUpdate  ParserFunctions  Scribunto        TitleBlacklist
ConfirmEdit   master.zip          PdfHandler       SecureLinkFixer  VisualEditor
Gadgets       MultimediaViewer    Poem             SpamBlacklist    WikiEditor
[root@lfwiki html]#

[root@lfwiki html]# cd kmvswiki2/extensions/
[root@lfwiki extensions]# unzip master.zip
Archive:  master.zip
387be3210336d88780d78356088029c2892c24b2
   creating: SimpleMathJax-master/
  inflating: SimpleMathJax-master/.editorconfig
  inflating: SimpleMathJax-master/.gitmodules
  inflating: SimpleMathJax-master/LICENSE
  inflating: SimpleMathJax-master/README.md
  inflating: SimpleMathJax-master/SimpleMathJax.php
  inflating: SimpleMathJax-master/SimpleMathJaxHooks.php
  inflating: SimpleMathJax-master/extension.json
   creating: SimpleMathJax-master/resources/
   creating: SimpleMathJax-master/resources/MathJax/
  inflating: SimpleMathJax-master/resources/ext.SimpleMathJax.js
[root@lfwiki extensions]#

(4)
[root@lfwiki extensions]# vi ../LocalSettings.php
[root@lfwiki extensions]# cat ../LocalSettings.php |grep MathJ
# wfLoadExtension( 'SimpleMathJax' );
[root@lfwiki extensions]#

(5)
Fatal error: Uncaught Exception: Unable to open file /var/www/html/kmvswiki2/extensions/SimpleMathJax/extension.json: filemtime(): stat failed for /var/www/html/kmvswiki2/extensions/SimpleMathJax/extension.json in /var/www/html/kmvswiki2/includes/registration/ExtensionRegistry.php:177 Stack trace: #0 /var/www/html/kmvswiki2/includes/GlobalFunctions.php(51): ExtensionRegistry->queue() #1 /var/www/html/kmvswiki2/LocalSettings.php(142): wfLoadExtension() #2 /var/www/html/kmvswiki2/includes/Setup.php(143): require_once('/var/www/html/k...') #3 /var/www/html/kmvswiki2/includes/WebStart.php(89): require_once('/var/www/html/k...') #4 /var/www/html/kmvswiki2/index.php(48): require('/var/www/html/k...') #5 {main} thrown in /var/www/html/kmvswiki2/includes/registration/ExtensionRegistry.php on line 177