LoginSignup
0

More than 5 years have passed since last update.

posted at

updated at

eZ Platform 1.9.0 インストール手順

eZ Platform

インストール

CentOS

CentOS 7.3.1611 minimal

yum clean all && yum -y update && reboot

MySQL

yum -y install https://dev.mysql.com/get/mysql57-community-release-el7-11.noarch.rpm && yum -y install mysql-community-server
echo -e '\ncharacter-set-server = utf8mb4' >> /etc/my.cnf
systemctl start mysqld && systemctl enable $_
grep "temporary password" /var/log/mysqld.log | awk '{print $11}'
mysql_secure_installation --use-default

DB 作成

mysqladmin --user=root --password create ezplatform

DB ユーザー作成

cat << "_EOQ_" | mysql -u root -p
CREATE USER 'ezplatform'@'localhost' IDENTIFIED BY 'P@ssw0rd';
GRANT ALL PRIVILEGES ON ezplatform.* TO 'ezplatform'@'localhost';
_EOQ_

PHP / Apache / Memcached

yum -y install http://p80.jp/remi-release-7.rpm
yum -y install yum-utils && yum-config-manager --enable remi --enable remi-php71
yum -y install php php-{gd,intl,mbstring,mysqlnd,opcache,pecl-{apcu,memcached},process,xml} memcached
sed -i.org 's|;date.timezone =|date.timezone = Asia/Tokyo|' /etc/php.ini

firewalld

firewall-cmd --permanent --add-service=http{,s} && firewall-cmd --reload

Composer

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

eZ Platform

mkdir /var/www/ezplatform && curl -LO https://ezplatform.com/content/download/158/file/ezplatform-1.9.0.tar.gz | tar zx --strip=1 -C /var/www/ezplatform

Apache の VirtualHost の設定

cp /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 '/#Require all granted/ s/#//';
systemctl start httpd memcached && systemctl enable $_

eZ Platform

yum -y install git unzip && cd /var/www/ezplatform && composer install
secret (ThisEzPlatformTokenIsNotSoSecretChangeIt): $(curl -sS http://nux.net/secret | grep lead | cut -c17-56)
php app/console ezplatform:install clean
chown -R root. /var/www/ezplatform && chown -R apache. $_/{app/{config,logs,cache},web} && chmod -R 664 $_ && chcon -R -t httpd_sys_script_rw_t $_
find {app/{cache,logs},web} -type d | xargs chmod -R 775

日本語化

composer require ezplatform-i18n/ezplatform-i18n-ja_jp

Vim の Twig シンタックス追加

yum -y install vim-enhanced
curl -o twig.vim.tar.gz -L https://github.com/nelsyeung/twig.vim/archive/master.tar.gz
mkdir ~/.vim
tar xf twig.vim.tar.gz --strip=1 -C ~/.vim

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