0
Help us understand the problem. What are the problem?

More than 5 years have passed since last update.

posted at

updated at

CraftCMS をインストールする

Craft CMS

Craft CMS Advent Calendar 2016 - Adventar

システム要件

サーバー要件

  • PHP 5.3.0 以上
  • MySQL 5.1.0 以上 (InnoDB ストレージエンジン)
  • Web サーバー (Apache, Nginx, IIS)
  • 32MB以上の PHP へのメモリ割り当て
  • 20MB以上の空き容量
  • 1MB以上のデータベース容量

必須 PHP エクステンション

  • Reflection Extension
  • PCRE Extension
  • SPL Extension
  • PDO Extension
  • PDO MySQL Extension
  • Mcrypt Extension
  • GD Extension with FreeType Support (unless ImageMagick Extension is installed)
  • OpenSSL Extension
  • Multibyte String Extension
  • JSON Extension
  • cURL
  • crypt() with BLOWFISH_CRYPT enabled

構成例

  • CentOS 7.3.1611 (minimal)
  • Apache 2.4.6 (base)
  • PHP 5.4.16 (base)
  • MariaDB 5.5.52 (base)

インストール

yum -y install epel-release
yum install httpd php php-{gd,mbstring,mcrypt,mysql,xml} mariadb-server unzip
curl -LO https://download.craftcdn.com/craft/2.6/2.6.2989/Craft-2.6.2989.zip
unzip Craft-2.6.2958.zip -d /var/www
mv /var/www/public/{index.php,robots.txt} /var/www/html
mv /var/www/public/htaccess /var/www/html/.htaccess
cat << "_EOF_" > /etc/httpd/conf.d/craft.conf
<Directory "/var/www/html">
    AllowOverride All
</Directory>
_EOF_
systemctl start httpd mariadb && systemctl enable httpd mariadb
firewall-cmd --permanent --add-service=http && firewall-cmd --reload
chmod -R 744 /var/www/craft/{app,config,storage}
setenforce 0
cat << "_EOQ_" | mysql -u root -p
CREATE DATABASE `craft` CHARACTER SET 'utf8';
CREATE USER 'craft'@'localhost' IDENTIFIED BY 'craft';
GRANT ALL ON craft.* TO 'craft'@'localhost';
_EOQ_
sed -i.org "/'database'/s/''/'craft'/" /var/www/craft/config/db.php

http://192.168.56.101/admin にアクセス

craft1.png

craft2.png

craft3.png

craft4.png

管理画面

ダッシュボード

craft5.png

エントリ一覧

craft6.png

編集画面

craft7.png

ライブプレビュー

craft8.png

設定画面

craft9.png

Register as a new user and use Qiita more conveniently

  1. You can follow users and tags
  2. you can stock useful information
  3. You can make editorial suggestions for articles
What you can do with signing up
0
Help us understand the problem. What are the problem?