LoginSignup
7
8

More than 5 years have passed since last update.

PHP製CMS Boltのインストール

Last updated at Posted at 2016-11-12

Bolt

Bolt は GitHub で Pagekit の次にスター数を獲得している PHP 製の CMS である。
フレームワークに Silex を、標準テーマに Foundation を採用している。

2016 CMS Critic Award

2016 CMS Critic Award の Best Blogging Software 部門で1位に選ばれた模様。

印象

設定はすべて YAML でテキスト記述するようで、手軽に使うにはしんどいイメージ。コンテンツタイプやタクソノミーもすべて YAML で記述する。
テンプレートは WordPress のように管理画面から編集してもよいらしい。(リンクがどこにあるのか謎だが /bolt/file/edit/theme にアクセスすれば編集できる。)
Symfony プロファイラーが付いているので解析等には便利。
全体的に WordPress を Symfony(Silex) でちゃんと作ったらこうなった、的な印象。

システム要件

  • PHP 5.5.9 以上
  • SQLite、MySQL または PostgreSQL へのアクセス
  • mod_rewrite (.htaccess ファイル) が有効な Apache または Nginx (virtual host configuration covered below)
  • 最小 32MB 以上の PHP へのメモリー割り当て
  • 以下の PHP 拡張:
    • pdo
    • mysqlnd (to use MySQL as a database)
    • pgsql (to use PostgreSQL as a database)
    • curl
    • gd
    • gmp
    • json
    • mbstring
    • opcache (optional)
    • posix
    • xml
    • fileinfo
    • exif

インストール

Apache / PHP

yum -y install yum-utils http://rpms.famillecollet.com/enterprise/remi-release-7.rpm && yum -y update
yum-config-manager --enable remi remi-php70
yum -y install httpd php php-gd php-mbstring php-pdo php-process php-xml
sed -i.org 's|;date.timezone =|date.timezone = Asia/Tokyo|' /etc/php.ini

Bolt

curl -O https://bolt.cm/distribution/bolt-latest.tar.gz
tar vzxf bolt-latest.tar.gz --strip=1 -C /var/www/html

所有者とコンテクスト

chown -R apache:apache /var/www/html/*
chcon -R -t httpd_sys_script_rw_t /var/www/html/app/{cache,config,database} /var/www/html/extensions /var/www/html/public/{thumbs,extensions,files,theme}

上記を設定したら、いったんトップページをリクエストして app/config/config.xml を自動生成してから以下を実行する。

cookies_domain

sed -i '/cookies_domain:/ s/:/: 192.168.56.101/' /var/www/html/app/config/config.yml

cookies_domain を指定しないと The CSRF token is invalid. Please try to resubmit the form. と怒られてユーザーが作成できない。

日本語化

sed -i 's/locale: en_GB/locale: ja_JP/' /var/www/html/app/config/config.yml

ドキュメントルート

cat << _EOF_ > /etc/httpd/conf.d/bolt.conf
ServerName localhost
DocumentRoot "/var/www/html/public"
<Directory "/var/www/html/public">
    AllowOverride All
</Directory>
_EOF_
systemctl enable httpd
systemctl start httpd

firewalld

firewall-cmd --permanent --add-service=http
firewall-cmd --reload

画面

初期ユーザー作成

Create the first user – Bolt.png

ダッシュボード

ダッシュボード – Bolt.png

ページ一覧

一覧 » ページ – Bolt.png

ページ編集

ページ を編集 » Sed ille  ut dixi  vitiose. – Bolt.png

メタ情報

ページ を編集 meta » Sed ille  ut dixi  vitiose. – Bolt.png

CMS 関連記事

7
8
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
7
8