LoginSignup
6
4

More than 3 years have passed since last update.

movable type のローカル環境を作る

Posted at

movable typeの環境構築が難しく4989していましたところ、sixapartから簡単に環境作れるよという記事を発見しました。
https://www.movabletype.jp/blog/mt-dev.html

設定について
https://github.com/movabletype/mt-dev/blob/master/README.ja.md

環境

  • mac/ macOs Mojave ver.10.14.6
  • github
  • Docker (Docker for Mac)

構築準備

構築

READMEの手順に進めていく。

  • githubからクローンする
    *クローンする場所は任意で決めてください。
$ git clone git@github.com:movabletype/mt-dev.git mt-dev
$ cd mt-dev
  • 用意した無償版のMTをクローンしたファイルにコピーする
$ cp /path/to/MT7-R0000.zip archive/
  • mt-config.cgi.originalからmt-config.cgi.localを作成してlocalhostに変更
CGIPath    http://192.168.7.25/cgi-bin/mt/
↓
CGIPath    http://localhost/cgi-bin/mt/
StaticWebPath    http://192.168.7.25/mt-static
↓
StaticWebPath    http://localhost/mt-static
  • 起動 セットアップのコマンドを実行してMTを起動させます READMEに記載してあるRECIPE=mt-plugin-My-AwsomePluginは独自で作成したプラグインを起動する場合のオプションで、dockerで起動する場合はRECIPEではなくREPOオプションがいいらしい。
$ make up ARCHIVE=MT7-R0000.zip  MT_CONFIG_CGI=mt-config.cgi-local
  • データベース作成
$ make exec-mysql SQL='CREATE DATABASE mt /*!40100 DEFAULT CHARACTER SET utf8mb4 */'
  • ブラウザで設定画面にアクセス


http://localhost/cgi-bin/mt/mt.cgi

スクリーンショット 2021-01-25 9.33.40.png

参考

@noritakaIzumiさんのMovable Type 公式の開発環境を Docker で構築してみた
すごく参考にさせてもらいました。

6
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
4