LoginSignup
0

More than 5 years have passed since last update.

posted at

updated at

CentOS 7 に eZ Platform 15.11 をインストールする

概要

2015年12月15日付けでリリースされた最初の eZ Platform (eZ Publish 6) 安定版である eZ Platform 15.12CentOS 7 にインストールする手順の記録。

バージョン

  • CentOS 7.2.1511
  • Apache 2.4.6
  • PHP 7.0.1
  • MySQL 5.7.10

勢いで PHP 7 と MySQL 5.7 で試したら意外に動いた。

インストール手順

MySQL のインストール

yum -y install https://dev.mysql.com/get/mysql57-community-release-el7-7.noarch.rpm;
yum -y install mysql-community-server;
cp -a /etc/my.cnf{,.org};
sed -i 's/\[mysqld\]/\[mysqld\]\ncharacter-set-server=utf8\ncollation-server=utf8_general_ci/' /etc/my.cnf;
systemctl enable mysqld;
systemctl start mysqld;
cat /var/log/mysqld.log | grep password;
mysql_secure_installation;
openssl rand -base64 12;
mysql -u root -p;

MySQL 5.7 の場合、インストール時の初期パスワードは /var/log/mysqld.log に出力されている。
MySQL 5.5 をインストールしたい場合は https://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm のリポジトリーを利用する。

データベースとユーザーの作成

mysql> CREATE DATABASE `ezplatform` CHARACTER SET 'utf8';
mysql> GRANT ALL PRIVILEGES ON `ezplatform`.* TO `ezplatform`@`localhost` IDENTIFIED BY 'p@ssw0rd' WITH GRANT OPTION;
mysql> EXIT

Apache と PHP のインストール

yum -y install http://rpms.famillecollet.com/enterprise/remi-release-7.rpm;
yum-config-manager --enable remi remi-php70;
yum -y install httpd php php-gd php-intl php-mbstring php-mysqlnd php-opcache php-pecl-apcu php-pecl-xdebug php-xml;
cp -a /etc/php.ini{,.org};
sed -i 's/;date\.timezone =/date.timezone = Asia\/Tokyo/' /etc/php.ini;
sed -i 's/memory_limit = 128M/memory_limit = 512M/' /etc/php.ini;
systemctl enable httpd;
systemctl start httpd;
firewall-cmd --permanent --add-service=http;
firewall-cmd --reload;

PHP 5.6 をインストールする場合は yum-config-manager --enable remi remi-php56 と指定する。

eZ Platform のインストール

wget http://share.ez.no/content/download/170868/1017327/version/1/file/ezplatform-dist-2015.12.tar.gz
tar vzxf ezplatform-dist-2015.12.tar.gz -C /var/www/html --strip=1;
chown apache:apache -R /var/www/html/*;
cd /var/www/html;
curl -sS https://getcomposer.org/installer | php;
curl -sS http://nux.net/secret | grep lead;
php -d memory_limit=-1 composer.phar run-script post-install-cmd;

パーミッションの設定

setfacl -R -m u:apache:rwx -m u:`whoami`:rwx app/cache app/logs web;
setfacl -dR -m u:apache:rwx -m u:`whoami`:rwx app/cache app/logs web;
setenforce 0;
sed -i "s/\(^SELINUX=\).*/\1disabled/" /etc/selinux/config;

VirtualHostの設定

cp -a /var/www/html/doc/apache2/vhost.template /etc/httpd/conf.d/ezpublish.conf;
sed -i /etc/httpd/conf.d/ezpublish.conf \
-e 's/%IP_ADDRESS%:%PORT%>/*:80>/' \
-e 's/ServerName %HOST%/ServerName www.example.com/' \
-e 's/ServerAlias %HOST_ALIAS%/ServerAlias localhost/' \
-e 's/%BASEDIR%\/web/\/var\/www\/html\/web/' \
-e 's/=%ENV%/=dev/';
httpd -t;
systemctl restart httpd;

インストール

php -d memory_limit=-1 app/console ezplatform:install --env prod clean;

管理画面へのログイン

初期インストール時のユーザー名は admin 、パスワードは publish に設定されている。

備考

ezpublish フォルダーは app にリネームされた

The directory that contains the configuration, cache and kernel files had been named ezpublish since release 5.0. After serious consideration, it has been renamed to app, in order to be closer to the standard Symfony distribution.

デフォルトインストールからデモが削除された

Since the removal of the demo in the 2015.11 release, a clean SQL dump is now used to install the system. This dump has been cleaned up, and should now provide you with a very clean basis to start your projects. It contains a few content types (folder, article, image, user group, user), as well as the minimal folders (Content, Media, and Users).

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
What you can do with signing up
0