1 views

実現する機能

CMS(Contents Management System)コンテンツマネジメントシステムといえば「Movable Type」と言う方が少なくありません。私は「WordPress」派ですが、優劣を比較できるほどMovable Typeを使いこなしていないので、自宅サーバーには常に最新のMovable Typeを入れて使うようにしています。ほとんど検証していませんが・・・。
以下ではインストール手順をご紹介します。

事前準備

Webサーバー(Apache)データベースサーバーが構築(MariaDB)されていること

Movable Type 6.0.3 のインストール手順

1.Movable Typeの個人無償ライセンス取得

(1)Movable Typeの個人無償ライセンス取得サイトに移動してライセンスを獲得するため、赤枠の「個人無償ライセンスダウンロード」をクリック
mvl01
(2)Movable Typeの個人無償ライセンス取得サイトのURLとパスワードが記載されたメールが届くので、受け取るためのメールアドレスを赤枠1に登録し、赤枠2で用途を選択し、赤枠3の「上記に同意して申し込む」をクリック
mvl02
(3)数分以内にメールが届くので確認すること。メールを開くと赤枠1にダウンロードサイトのURLがあるのでそれをクリックしてダウンロードサイトに移動する。赤枠2の「ログインキー」はダウンロードサイトの中へログインするために必要なので、あらかじめコピーしておくこと
mvl03
(4)ダウンロードサイトを開いたら、赤枠1にコピーしておいた「ログインキー」を貼り付け、赤枠2の「ログイン」をクリック
mt6-00
(5)表示されるサイトの赤枠「MT-6_0_3.zip」を右クリック
mt6-01
(6)表示されるサイトの赤枠「リンクのURLをコピー」をクリック
mt6-02

2.ダウンロードとインストール
下記文字の黄色は入力するコマンド(コピペでGnome端末に貼り付ける方法が簡単)。入力後は必ず「Enter」キーを押す赤色は入力内容(コピペでGnome端末に貼り付ける方法が簡単)緑は説明書き、白は自動で表示される部分である。GNOME端末でviコマンドを使う方法についてはこちらを参照

[root@ufuso ~]# setenforce 0 ← SELinuxを一時停止してインストールを可能にする

[root@ufuso ~]# getenforce ← SELinuxの一時停止を確認
Permissive ← 一時停止

[root@ufuso ~]# wget https://www.ecbuyers.com/sixapart/catalog/file_download.php/MT-6_0_3.zip?id=8&type=MT6
 ← wget入力後にコピーしておいたURLを貼り付けてダウンロード
`MT-6_0_3.zip?id=8' に保存中

100%[================================>] 18,148,709   783KB/s 時間 23s    

2014-09-03 18:03:29 (785 KB/s) - `MT-6_0_3.zip?id=8' へ保存完了 [18148709/18148709]
 ← ダウンロード完了。「Enter」キーを押す

[root@ufuso ~]# unzip MT-6_0_3.zip?id=8 ← Movable Type 6.0.3の展開(解凍)
Archive:  MT-6_0_3.zip?id=8
   creating: MT-6.0.3/
   creating: MT-6.0.3/tools/
・・・
・・・
  inflating: MT-6.0.3/mt-upgrade.cgi  
  inflating: MT-6.0.3/mt-feed.cgi    
  inflating: MT-6.0.3/readme.html

[root@ufuso ~]# mkdir /var/www/html/mt6 ← MT-6.0.3フォルダの中身を移すための
フォルダ「mt6(例示)」の作成

[root@ufuso ~]# mv MT-6.0.3/* /var/www/html/mt6/ ←  MT-6.0.3フォルダの中身を
/var/www/html/mt6ォルダ内に移動

[root@ufuso ~]# chown -R tu:apache /var/www/html/mt6 ← mt6フォルダの所有者を
「tu(ユーザー名の例示)」、グループを「apache」にする

[root@ufuso ~]# chmod -R 777 /var/www/html/mt6 ← mt6フォルダ内のすべてのファイ
ルとサブフォルダへ書き込み権限を付与

[root@ufuso ~]# which perl ← perlの場所を確認
/usr/local/bin/perl

[root@ufuso ~]# perl -v ← perlのバージョンを確認
This is perl 5, version 16, subversion 3 (v5.16.3) built for x86_64-linux-thread-multi
(with 25 registered patches, see perl -V for more detail)

Copyright 1987-2012, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl".  If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.

[root@ufuso ~]# yum -y install perl-CPAN ← perl-CPANをインストール
インストール:
  perl-CPAN.noarch 0:1.9800-283.el7                                       

依存性関連をインストールしました:
  gdbm-devel.x86_64 0:1.10-8.el7                                          
  glibc-devel.x86_64 0:2.17-55.el7_0.1                                    
  glibc-headers.x86_64 0:2.17-55.el7_0.1                                  
  perl-Digest-SHA.x86_64 1:5.85-3.el7                                     
  perl-ExtUtils-Install.noarch 0:1.58-283.el7                             
  perl-ExtUtils-MakeMaker.noarch 0:6.68-3.el7                             
  perl-ExtUtils-Manifest.noarch 0:1.61-244.el7                            
  perl-ExtUtils-ParseXS.noarch 1:3.18-2.el7                               
  perl-devel.x86_64 4:5.16.3-283.el7                                      
  systemtap-sdt-devel.x86_64 0:2.4-14.el7                                 

完了しました!

[root@ufuso ~]# perl -MCPAN -e shell ← perl-CPANを実行して基本設定
CPAN.pm requires configuration, but most of it can be done automatically.
If you answer 'no' below, you will enter an interactive dialog for each
configuration option instead.

Would you like to configure as much as possible automatically? [yes]  ← 「Enter
」キー押下

 

Warning: You do not have write permission for Perl library directories.

To install modules, you need to configure a local Perl library directory or
escalate your privileges.  CPAN can help you by bootstrapping the local::lib
module or by configuring itself to use 'sudo' (if available).  You may also
resolve this problem manually if you need to customize your setup.

What approach do you want?  (Choose 'local::lib', 'sudo' or 'manual')
 [local::lib]  ← 「Enter」キー押下

Autoconfigured everything but 'urllist'.

Now you need to choose your CPAN mirror sites.  You can let me
pick mirrors for you, you can select them from a list or you
can enter them by hand.

Would you like me to automatically choose some CPAN mirror
sites for you? (This means connecting to the Internet) [yes] no ← noと入力して
「Enter」キー押下

Would you like to pick from the CPAN mirror list? [yes]  ← 「Enter」キー押下
Found a cached mirror list as of Wed Sep  3 18:08:33 2014

If you'd like to just use the cached copy, answer 'yes', below.
If you'd like an updated copy of the mirror list, answer 'no' and
I'll get a fresh one from the Internet.

Shall I use the cached mirror list? [yes]  ← 「Enter」キー押下
First, pick a nearby continent and country by typing in the number(s)
in front of the item(s) you want to select. You can pick several of
each, separated by spaces. Then, you will be presented with a list of
URLs of CPAN mirrors in the countries you selected, along with
previously selected URLs. Select some of those URLs, or just keep the
old list. Finally, you will be prompted for any extra URLs -- file:,
ftp:, or http: -- that host a CPAN mirror.

You should select more than one (just in case the first isn't available).

(1) Africa
(2) Asia
(3) Europe
(4) North America
(5) Oceania
(6) South America
Select your continent (or several nearby continents) [] 2 ← 2と入力して「Enter」
キー押下
(1) China
(2) India
(3) Indonesia
(4) Iran
(5) Israel
(6) Japan
(7) Kazakhstan
(8) Pakistan
(9) Republic of Korea
(10) Russia
(11) Singapore
(12) Taiwan
(13) Thailand
(14) Turkey
(15) Viet Nam
Select your country (or several nearby countries) [] 6 ← 6と入力して「Enter」
キー押下
(1) ftp://ftp.jaist.ac.jp/pub/CPAN/
(2) ftp://ftp.kddilabs.jp/CPAN/
(3) ftp://ftp.nara.wide.ad.jp/pub/CPAN/
(4) ftp://ftp.riken.jp/lang/CPAN/
(5) ftp://ftp.u-aizu.ac.jp/pub/CPAN/
(6) ftp://ftp.yz.yamagata-u.ac.jp/pub/lang/cpan/
(7) ftp://mirror.jre655.com/CPAN/
(8) ftp://mirrors.go-parts.com/cpan/
(9) http://ftp.jaist.ac.jp/pub/CPAN/
(10) http://ftp.nara.wide.ad.jp/pub/CPAN/
(11) http://ftp.riken.jp/lang/CPAN/
(12) http://ftp.yz.yamagata-u.ac.jp/pub/lang/cpan/
(13) http://mirror.jre655.com/CPAN/
(14) http://mirrors.go-parts.com/cpan/
Select as many URLs as you like (by number),
put them on one line, separated by blanks, hyphenated ranges allowed
 e.g. '1 4 5' or '7 1-4 8' [] 11 ← 11と入力して「Enter」キー押下
Now you can enter your own CPAN URLs by hand. A local CPAN mirror can be
listed using a 'file:' URL like 'file:///path/to/cpan/'
Enter another URL or ENTER to quit: []  ← 「Enter」キー押下
New urllist
  http://ftp.riken.jp/lang/CPAN/
  ftp://ftp.riken.jp/lang/CPAN/

Autoconfiguration complete.

Attempting to bootstrap local::lib
...
...
Writing Makefile for local::lib
Writing MYMETA.yml and MYMETA.json
---- Unsatisfied dependencies detected during ----
----      HAARG/local-lib-2.000013.tar.gz     ----
    Test::More [build_requires]
Running make test
  Delayed until after prerequisites
Running make install
  Delayed until after prerequisites
Can't locate local/lib.pm in @INC (@INC contains: /root/perl5/lib/perl5 
/usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl 
/usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 /root)
 at /usr/share/perl5/CPAN/FirstTime.pm line 1300. ← error で終了

3.データベースの作成

[root@ufuso ~]# mysql -u root -p ← データベースへアクセス
Enter password:  ← rootのパスワードを入力のこと(非表示)
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 4503
Server version: 5.5.37-MariaDB MariaDB Server

Copyright (c) 2000, 2014, Oracle, Monty Program Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> create database mt6; ← データベースの作成(mt6は例示)
Query OK, 1 row affected (0.26 sec)

MariaDB [(none)]> grant all privileges on mt6.* to tu@localhost identified by 'password';
 ← mt6に管理者権限を持つtu(例示)の作成とパスワード(passwordは例示)の設定
Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]> exit ← データベースへのアクセス終了
Bye

4.設定
(1)Movable Typeをインストールしたhttp://yoursite/mt6/にアクセスし(「mt6」は例示)、赤枠をクリックして次に進む
mv03
(2)言語が日本語であることを確認して、赤枠の「開始」をクリック
mv04
(3)赤枠1の「必要なPerlモジュールは揃っています」の表示があれば、赤枠2の「次へ」をクリック。オプションモジュールのインストールは5の「オプション及び終了処理」で説明
mv05
(4)上記3で設定したとおりにデータベース項目を赤枠1に入力し、赤枠2の「接続テスト」をクリック
mv07
(5)「データベースの設定を完了しました」と表示されれば、赤枠の「次へ」をクリック
mv08
(6)管理用のメールアドレスが必要になるので、赤枠1にメールアドレスを入力し、赤枠2は分からない場合には「Sendmail」を選択し、赤枠3の「テストメールを送信」をクリック
mv10
(7)赤枠1に送り先のメルアドを入力し、赤枠2の「送信」をクリック
mv11
(8)送り先に下図のようなメールが届いていればOK
mt6-03
(9)「メールの設定が完了しました」と表示される画面が出るので、赤枠の「次へ」をクリック
mv14
(10)下図の画面が出る場合には、赤枠の「サインインしてください」をクリック
mv15
(11)ログインユーザーを作成してください。赤枠1に各項目を入力し、赤枠2の「次へ」をクリック
mv16
(12)赤枠1の「ウェブサイト名」に好きな名称を入力して、赤枠2の「インストール」をクリック
mv17
(13)「インストールを完了しました!」という画面が表示されたら、赤枠の「Movable Type にサインイン」をクリック
mv18
(14)サインインに成功すると下の画面が表示されるので、作成した赤枠のウェブサイト名をクリック
mv19
(15)表示される画面右上のリサイクルマークのような赤枠のアイコンをクリック
mv20
(16)画面が表示されるので「再構築」をクリック
mv22
(17)ウェブサイトが表示されればOK
mv23

5.オプション及び終了処理

[root@ufuso ~]# yum -y install ImageMagick-perl ← サムネイル作成に必要
インストール:
  ImageMagick-perl.x86_64 0:6.7.8.9-10.el7                                

依存性関連をインストールしました:
  ImageMagick.x86_64 0:6.7.8.9-10.el7                                     

完了しました!


[root@ufuso ~]# LANG=C PERL_MM_USE_DEFAULT=1 perl -MCPAN -e "install HTML::Entities"
 ← 特殊な文字をエンコードする場合に必要。「HTML::Entities」の部分だけをインスト
ールしたいオプションもジュールに置き換えて、インストールを続ける
Reading '/root/.cpan/Metadata'
  Database was generated on Thu, 04 Sep 2014 04:53:14 GMT
HTML::Entities is up to date (3.69).

[root@ufuso ~]# semanage fcontext -a -t httpd_sys_content_t "/var/www/html/mt6(/.*)?"
 ← mt6フォルダにアクセス権限を与える

[root@ufuso ~]# restorecon -R -v /var/www/html/mt6
 ← mt6フォルダのアクセス権変更を反映させる

[root@ufuso ~]# setenforce 1 ← SELinuxを有効にする

[root@ufuso ~]# getenforce ← 有効の確認
Enforcing ← 有効を確認

以上

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です

CAPTCHA


このサイトはスパムを低減するために Akismet を使っています。コメントデータの処理方法の詳細はこちらをご覧ください