eZ Platform 1.11.0
2017/08/22 にリリースされた eZ Platform 1.11.0 を開発環境モードでインストールする手順。
ezplatform.com ではまだファイル版がリリースされていないため、Composer でのインストールのみになる。
インストール
MariaDB 5.5 / Apache 2.4 / PHP 7.1
yum -y install http://p80.jp/remi-release-7.rpm
yum -y install yum-utils && yum-config-manager --enable {remi,remi-php71}
yum -y install php php-{gd,intl,mbstring,mysqlnd,opcache,pecl-{apcu,xdebug},process,xml} mariadb-server
設定
sed -i.org 's|;date.timezone =|date.timezone = Asia/Tokyo|' /etc/php.ini
sed -i '/\[mysqld\]/a character-set-server = utf8mb4' /etc/my.cnf.d/server.cnf
sed -i '/\[mysql\]/a default-character-set = utf8mb4' /etc/my.cnf.d/mysql-clients.cnf
firewall-cmd --permanent --add-service=http{,s} && firewall-cmd --reload
systemctl start mariadb && systemctl enable $_
Composer / Vim
curl -sS https://getcomposer.org/installer | php && mv composer.phar /usr/local/bin/composer
yum -y install git unzip && composer config -g repos.packagist composer https://packagist.jp && composer global require hirak/prestissimo
yum -y install vim-enhanced && mkdir ~/.vim && curl -LSs https://github.com/nelsyeung/twig.vim/archive/master.tar.gz | tar zx --strip=1 -C ~/.vim
eZ Platform
composer create-project --no-dev ezsystems/ezplatform -d /var/www
curl -sS http://nux.net/secret | grep lead | cut -c17-56
cd /var/www/ezplatform
export SYMFONY_ENV="dev"
php app/console doctrine:database:create
php app/console ezplatform:install clean --env dev
composer require ezplatform-i18n/ezplatform-i18n-ja_jp
設定
chown -R apache. {app/{cache,logs},web}
find {app/{cache,logs},web} -type d | xargs chmod -R 775
find {app/{cache,logs},web} -type f | xargs chmod -R 664
cp -av /var/www/ezplatform/doc/apache2/vhost.template /etc/httpd/conf.d/ezplatform.conf
sed -i /etc/httpd/conf.d/ezplatform.conf \
-e 's/%IP_ADDRESS%:%PORT%/*:80/' -e 's/%HOST_NAME%/localhost/' \
-e '/ServerAlias/d' -e 's|%BASEDIR%|/var/www/ezplatform|' \
-e 's/%BODY_SIZE_LIMIT%/0/' -e 's/%TIMEOUT%/42/' \
-e '/LogLevel/ s/# //' \
-e '/#Require all granted/ s/#//' \
-e '/\[SYMFONY_ENV\]/a \ SetEnvIf Request_URI ".*" SYMFONY_ENV=dev';
systemctl start httpd && systemctl enable $_