「MediaWikiの設定 - さくらインターネット」の版間の差分

📢 Webサイト閉鎖と移転のお知らせ
このWebサイトは2026年9月に閉鎖いたします。
新しい記事は移転先で追加しております。(旧サイトでは記事を追加しておりません)

Wiki がページ「MochiuWikiの設定 - さくらインターネット」を「MediaWikiの設定 - さくらインターネット」に、リダイレクトを残さずに移動しました
 
25行目: 25行目:
# Python 3のインストール
# Python 3のインストール
#: まず、Python 3のインストールディレクトリを作成する。
#: まず、Python 3のインストールディレクトリを作成する。
#: <code>mkdir -p $HOME/local/python</code>
#: <pre>mkdir -p $HOME/local/python</pre>
#: <br>
#: <br>
#: Python 3.7.9をダウンロードして解凍する。
#: Python 3.7.9をダウンロードして解凍する。
#: <code>wget https://www.python.org/ftp/python/3.7.9/Python-3.7.9.tar.xz</code>
#: <syntaxhighlight lang="text">
#: <code>tar -xf Python-3.7.9.tar.xz</code>
wget https://www.python.org/ftp/python/3.7.9/Python-3.7.9.tar.xz
tar -xf Python-3.7.9.tar.xz
</syntaxhighlight>
#: <br>
#: <br>
#: Python-3.7.9ディレクトリに移動する。
#: Python-3.7.9ディレクトリに移動する。
#: <code>cd Python-3.7.9</code>
#: <pre>cd Python-3.7.9</pre>
#: <br>
#: <br>
#: Python 3をインストールする。
#: Python 3をインストールする。
#: <code>./configure CPPFLAGS="-I/usr/local/ssl/include" LDFLAGS="-L/usr/local/ssl/lib" \</code><br><code>--enable-optimizations --prefix=$HOME/local/python \</code>
#: <syntaxhighlight lang="text">
#: <code>make</code>
./configure \
#: <code>make install</code>
CPPFLAGS="-I/usr/local/ssl/include" LDFLAGS="-L/usr/local/ssl/lib" \
--prefix=$HOME/local/python
--enable-optimizations \
make
make install
</syntaxhighlight>
#: <br>
#: <br>
#: Python 3.7.9ディレクトリを削除する。
#: Python 3.7.9ディレクトリを削除する。
#: <code>rm -rf $HOME/Python-3.7.9</code>
#: <pre>rm -rf $HOME/Python-3.7.9</pre>
#: <br>
#: <br>
#: <u>Pyenvのインストールは不要である。</u>
#: <u>Pyenvのインストールは不要である。</u>
50行目: 58行目:
#: <br>
#: <br>
#: まず、バックアップを作成する。
#: まず、バックアップを作成する。
#: <code>cp create_pygmentize_bundle create_pygmentize_bundle_org</code>
#: <syntaxhighlight lang="text">
#: <code>mv pygmentize pygmentize_org</code> (pygmentizeファイルは再作成するため、mvコマンドを実行している)
cp create_pygmentize_bundle create_pygmentize_bundle_org
mv pygmentize pygmentize_org # pygmentizeファイルは再作成するため、mvコマンドを実行している
</syntaxhighlight>
#: <br>
#: <br>
#: 次に、create_pygmentize_bundleファイルを、以下のように修正する。
#: 次に、create_pygmentize_bundleファイルを、以下のように修正する。
<syntaxhighlight lang="python">
#: <syntaxhighlight lang="python">
  #!/home/<ユーザ名>/local/python/bin/python3  # 変更する箇所
  #!/home/<ユーザ名>/local/python/bin/python3  # 変更する箇所
  # -*- coding: utf-8 -*-
  # -*- coding: utf-8 -*-
123行目: 133行目:
  print('Done. Wrote %s bytes to %s' % (len(data), file_path))
  print('Done. Wrote %s bytes to %s' % (len(data), file_path))
  </syntaxhighlight>
  </syntaxhighlight>
<br>
#: <br>
: 3. 次に、上記で編集したcreate_pygmentize_bundleファイルを使用して、pygmentizeを再作成する。<br>
# 次に、上記で編集したcreate_pygmentize_bundleファイルを使用して、pygmentizeを再作成する。
::: <code>/home/<ユーザ名>/local/python/bin/python3 ./create_pygmentize_bundle</code>
#: <pre>/home/<ユーザ名>/local/python/bin/python3 ./create_pygmentize_bundle</pre>
::: <br>
#: <br>
::: pygmentizeファイルに実行権限を付加する。<br>
# pygmentizeファイルに実行権限を付加する。
::: <code>chmod +x pygmentize</code>
#: <pre>chmod +x pygmentize</pre>
::: <br>
#: <br>
: 4. 最後に、Webブラウザのキャッシュを削除して、Syntaxhighlight Geshiが正常に動作しているか確認する。<br>
# 最後に、Webブラウザのキャッシュを削除して、Syntaxhighlight Geshiが正常に動作しているか確認する。<br>
<br><br>
<br><br>