Message-ID: <851438709.3654.1485854665012.JavaMail.confluence@ip-10-127-227-164> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_3653_1971599805.1485854665012" ------=_Part_3653_1971599805.1485854665012 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
Depending on your selected *NIX distribution, you may need to install pa= rt or all of the LAMP stack required to run eZ Platform or eZ Enterprise. B= efore getting started, make sure you review our requirements page to see the systems we support and use for testing. You can try using= an unsupported configuration, but your results may vary.
Please not that, while OS X is a *NIX-based system, it has its = own unique requirements listed in our Installation Guide for OS X. Developer-maint= ained installation notes are kept in our GitHub repository at this location= as well: https://github.com/= ezsystems/ezplatform/blob/master/INSTALL.md
You may use your system's package manager (yum, apt-get, etc.) to obtain= a copy of Apache, MySQL, and PHP, or download the latest versions from the= official websites and install manually:
For Debian 8.5, for example, we'd recommend using apt-get
t=
o install apache2
, mysql-server
, mysql-clie=
nt
, and php5-*
(all the packages listed in the requirements), as well as git
for version control. If=
the system on which you're doing the install has only 1 or 2 GB of RAM, be=
sure to set up swap so you don't run out of RAM when r=
unning the composer scripts later on.
You'll need Composer, the PHP command line dependency manager.
a. Install Composer by running the following command on the terminal of = the machine upon which you're installing eZ Platform:
php -r "readfile('https://getcomposer.org/installer');" | php=20
b. Move the downloaded composer.phar file to a globally-available path:<= /p>
mv composer.phar /usr/local/bin/composer=20
Expand the archive into /var/www/ezplatform
or the folder n=
ame or your choosing.
For developers interested in working with the latest version of eZ Platf= orm, you may also clone the latest from our GitHub repository:
cd /var/www git clone https://github.com/ezsystems/ezplatform.git /var/www/ezplatform= pre>=20
You can rename the destination folder to whatever you like. This is wher= e eZ Platform will live, and you'll point your virtual host to this folder = to use as its root. You may choose to download an archive file from&nb= sp;share.ez.no/downloads instead of cloning from = GitHub, and extract the eZ Platform archive to a similar director= y. The subsequent steps are identical, regardless of the method you choose = to obtain eZ Platform.
Create new database (you can substitute ezplatform
&nbs=
p;with the database name you want to use, but keep it in mind as you run th=
e installation script):
/usr/bin/mysql -u root -e 'create database ezplatform;'=20
Composer will look inside the composer.json file and install all of the = required packages to run eZ Platform. There's a script in the app folder ca= lled console that will install eZ Platform for your desired environment as = well (dev/prod).
This is the step where you want to make sure you have sw= ap configured for your machine if it does not have an abundance of RAM.=
cd /var/www/ezplatform php -d memory_limit=3D-1 /usr/local/bin/composer install=20
Once the installer gets to the point that it creates app/config/pa=
rameters.yml
, you will be presented with a few decisions. The first =
asks you to choose a secret; choose any random string you like, made up of characters, numb=
ers, and symbols, up to around 32 characters. This is used by Symfony when =
generating CSRF tokens, encrypting cookies, and for creating s=
igned URIs when using ESI =
(Edge Side Includes).
Next, you'll be asked to specify a database driver. You may press return=
to accept the default for this option, as well as the next several (=
database_host, database_port, database_name, database_user
) unless y=
ou have customized those values and need to enter them as configured on you=
r installation. If you set a password for your database user, enter it when=
prompted for database_password
. The installer should continue=
once you've completed this manual portion of the installation process.
php -d memory_limit=3D-1 /var/www/ezplatform/app/console ezplatform= :install --env prod clean=20
Don't forget to substitute any custom folder name you may have chosen in=
place of ezplatform/
after /var/www/
in the exam=
ples above. As you can see, this example shows a clean production installat=
ion. We're telling PHP to run Symfony's console to execute the ezplatform i=
nstall script. You can get an informative output to learn more about the co=
nsole script's capabilities by swapping in these parameters: co=
nfig:dump-reference ezpublish
If Composer asks you for your 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 the Com= poser prompt. This operation is performed only once when you install eZ Pla= tform for the first time.
Please note that a clean install of eZ Platform doesn=E2=80=99t include = the DemoBundle anymore.
Like most things, Symfony documentation applies here, mean=
ing app/cache
and app/logs
need to be writable by=
cli and web server user.
Furthermore, future files and directories created by these two users wil= l need to inherit those access rights. For security reasons, there is n= o need for web server to have access to write to other directories.
For our example, we'll demonstrate using Apache2 as part of the traditio= nal LAMP stack.
Instead of manually editing the vhost.tem=
plate file, you may instead use the included shell script: /var/w=
ww/ezplatform/bin/vhost.sh to generate a configured .conf file. Check =
out the source of vhost.sh
to see the options provid=
ed. Additional information is included in our Web Server documentation here as well.
a. Copy the vhost template file from its = home in the doc folder:
cp /var/www/ezplatform/doc/apache2/vhost.template /etc/apache2/sit= es-available/ezplatform.conf=20
b. Edit the file, substituting the %place= holders% with the appropriate values for your desired config:
vi /etc/apache2/sites-available/ezplatform.conf=20
For a DEV environment, you can change
<VirtualHost %IP_ADDRESS%:%PORT%>
to&=
lt;VirtualHost *:80>
ServerName %HOST_NAME%
to
ServerName localhost
ServerAlias %HOST_ALIAS%
...that can simply be deleted.
=
DocumentRoot %BASEDIR%/web
to
DocumentRoot /var/www/ezplatf=
orm/web
LimitRequestBody %BODY_SIZE_LIMIT%
to
LimitRequestBody 0
TimeOut %TIMEOUT%
to
TimeOut 42
to avoid waiting longer =
than 42 seconds for all the things.
Be sure to specify /var/www/ezplatform/web
as the DocumentRoot
and Directory
. Uncomment the line that starts with #if[SYMFONY_ENV] =
and set the value, something like this:
# Environment. # Possible values: "prod" and "dev" out-of-the-box, other values possible w= ith proper configuration # Defaults to "prod" if omitted (uses SetEnvIf so value can be used in rewr= ite rules) SetEnvIf Request_URI ".*" SYMFONY_ENV=3Ddev=20
Make sure you've got the libapache2-mod-php5
module install=
ed for Apache2 to use PHP5.x, and have the rewrite module enabled:
apt-get -y install libapache2-mod-php5 a2enmod rewrite=20
a. You'll need the web user set as the owner/group on all your files to = avoid a 500 error:
chown -R www-data:www-data /var/www/ezplatform=20
b. With your vhost file properly prepared and located in /etc/apache2/si= tes-available/ezplatform.conf, enable the VirtualHost and disable the defau= lt:
a2ensite ezplatform a2dissite 000-default.conf=20
service apache2 restart=20