Message-ID: <42098406.3652.1485854659898.JavaMail.confluence@ip-10-127-227-164> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_3651_115616708.1485854659898" ------=_Part_3651_115616708.1485854659898 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html Installation Guide for OS X

Installation Guide for OS X

=20
=20
=20
=20

Preparation:


1. Install MySQL = ;

Download from the official MySQL webpage is strongly recommended.

2. Set up PHP

This step requires the modification of two files: Apache2 configuration = file and php.ini.
These files can be edited using a termina= l editor like vi or nano, or a simple text editor such as TextEdit or Atom.=

a. Edit Apache2 configuration file:

=20
sudo vi /private/etc/apache2/httpd.conf
=20

b. Uncomment the following line:

=20
LoadModule php5_module libexec/apache2/libphp5.so
=20

c. If you can't locate the php.ini file on your machine, it= 's probably under php.ini.default. Create a new php.ini<= /code> file based on defaults:

=20
sudo cp /private/etc/php.ini.default /private/etc/php.ini
=20

d. Open the file in a text editor (in this example, in vi):

=20
sudo vi /private/etc/php.ini
=20

e. Locate date.timezone and pdo_mysql.default_socket<= /code> and provide them with values as in the example below:

=20
date.timezone =3D "Europe/Warsaw"
pdo_mysql.default_socket =3D /tmp/mysql.sock
=20

f. Increase memory_limit value for eZ Platform:

=20
memory_limit =3D 4G
=20

3. Set= up virtual host and start Apache2

a. Edit Apache2 configuration file:

=20
sudo vi /private/etc/apache2/httpd.conf
=20

b. Uncomment and modify the following lines:

=20
LoadModule vhost_alias_module libexec/apache2/mod_vhost_alias.so
LoadModule rewrite_module libexec/apache2/mod_rewrite.so
=20

c. Comment the following line:

=20
Include /private/etc/apache2/extra/httpd-vhosts.conf
=20

d. Add the following line to the file:

=20
Include /private/etc/apache2/users/*.conf
=20

e. Change permissions for virtual hosts storage directory (775):

=20
sudo chmod -R 775 /private/etc/apache2/users
sudo chmod 775 /private/etc/apache2
=20

4. Sta= rt Apache2 daemon using terminal

=20
sudo apachectl start
=20

5. Install Com= poser globally

Composer is a dependency manager that allows you to install packages dir= ectly in the project. It is also checking all packages' versions on a regul= ar basis to make sure they are up-to-date and to avoid inconsistencies.

=20
curl -sS https://getcomposer.org/installer | php
mkdir -p /usr/local/bin
php -d memory_limit=3D-1 composer.phar
=20

6. Cre= ate a new database for eZ Platform

Create new database (you can substitute ez1 with the d= atabase name you want to use):

=20
/usr/local/mysql/bin/mysql -u root -e 'create database ez1;'
= =20

7. Install B= rew package manager

Brew is a package manager for OS X, if you haven't used it already you a= re going to love what it does!

=20
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/i=
nstall/master/install)"
=20

8. Install additional requirements for eZ Platform

a. Install PEAR/PECL extension:

=20
cd /usr/lib/php
curl -O https://pear.php.net/go-pear.phar
php -d detect_unicode=3D0 go-pear.phar
sudo php install-pear-nozlib.phar
sudo pear channel-update pear.php.net
sudo pecl channel-update pecl.php.net
sudo pear upgrade-all
sudo pear config-set auto_discover 1
=20

b. Install autoconf:

=20
brew install autoconf
=20

c. Install intl:

=20
brew install icu4c
sudo pecl install intl
=20

d. The path to the ICU libraries and headers is: /usr/local/opt/ic= u4c/.

Edit /private/etc/php.ini and add following line:

=20
extension=3Dintl.so
=20

e. Enable opcache extension for PHP (suggested, but not required) by add= ing:

=20
zend_extension=3Dopcache.so
=20

Installation:


9. Install eZ Pl= atform

a. Go to the folder with your installation and set up directory permissi= ons:

=20
chmod 775 ../ez1.lh
chmod 775 ../../workspace
chmod 775 ../../../Documents
=20

 

b. Download archive from share.ez.no/download= s. Extract the eZ Platform archive to a directory, then execu= te post install scripts.

=20
cd /<directory>/
php -d memory_limit=3D-1 composer.phar run-script post-install-cmd
=20

 

c. Copy the virtual host template:

=20
sudo cp doc/apache2/vhost.template /private/etc/apache2/users/ez1.=
lh.conf
=20

d. Edit the new virtual host:

=20
sudo vi /private/etc/apache2/users/ez1.lh.conf
=20

e. Modify virtual host file vhost.template. 

Replace the ---USER_ID--- variable (used in lines 10 and 17= ) with your current user ID. Use whoami command to get effecti= ve user ID of the currently logged user. If you want to use the default vir= tual host template (delivered with eZ Platform package) all you have to do = is set up lines 7, 8, 9, 10, 17, 25 and 33:

f. Restart Apache 2 server:

=20
sudo apachectl restart
=20

g. Install required dependencies using Composer:

=20
composer install
=20

When Composer asks you for the token you must log in to your GitHub acco= unt and edit your profile. Go to the Personal access tokens link and Genera= te new token with default settings. Be aware that the token will be shown o= nly once, so do not refresh the page until you paste the token into Compose= r prompt. This operation is performed only once when you install eZ Platfor= m for the first time.

h. Change directory permissions:

=20
rm -rf app/cache/* app/logs/*
sudo chmod +a "_www allow delete,write,append,file_inherit,directory_inheri=
t" app/{cache,logs,config} web
sudo chmod +a "`whoami` allow delete,write,append,file_inherit,directory_in=
herit" app/{cache,logs,config} web
=20

i. Install eZ Platform:

=20
php app/console ezplatform:install clean
=20


You will be able to see your page under http://ez1.lh (or the address yo= u chose in preparation). Please note that a clean install of eZ Platform do= esn=E2=80=99t include DemoBundle anymore.

10. Optional

a. Install PHP 5.6 with opcache extension:

=20
brew install -v homebrew/php/php56
chmod -R ug+w $(brew --prefix php56)/lib/php
brew install -v php56-opcache
=20

b. Add proper date.timezone settings:

=20
sudo vi /usr/local/etc/php/5.6/php.ini
=20

c. Uncomment and modify:

=20
date.timezone =3D "Europe/Warsaw"
(=E2=80=A6)
Increase memory_limit value for eZ Platform:
memory_limit =3D 4G
(=E2=80=A6)
=20

d. Disable errors showing:

=20
display_errors =3D Off
=20

e. Change default PHP parser used by Apache:

=20
sudo vi /private/etc/apache2/httpd.conf
=20

f. Find and comment the following line:

=20
# LoadModule php5_module libexec/apache2/libphp5.so
=20

g. Add below:

=20
LoadModule php5_module /usr/local/opt/php56/libexec/apache2/libphp=
5.so
=20

e. Install intl extension for PHP 5.6:

=20
brew install php56-intl
=20

f. Restart Apache:

=20
sudo apachectl restart
=20
=20
=20
=20
=20

In this topic:

=20
=20
=20
------=_Part_3651_115616708.1485854659898--