eZ Platform version 1 – deprecated
1.Inslallation Server & requirement Information
System Information:
Ubuntu 14.04 LTS
Php 5.6
Apache 2.4
MYSQL 5.5
System Requirement:
Take it from here: https://doc.ez.no/display/TECHDOC/Requirements
2.Inslallation of eZPlatform clean
2.1. Download from share.ez.no the latest ezpublish version
2.2. create Database & User
2.3.Creating the “app/config/parameters.yml” file (database & e-mail access)
1 2 3 |
cd // curl -sS https://getcomposer.org/installer | php php -d memory_limit=-1 composer.phar run-script post-install-cmd |
2.4.Run installation command:
This will install an eZPlatform Clean (No content) Installation.
1 |
sudo php -d memory_limit=-1 app/console ezplatform:install --env prod clean |
PS: eZ Studio can also a good descision at this Step, so that you can quickly and easily create content with drag and drop. the clean Installation require some KnowHow for creating content. See below if you want first to trust your self with a demo installation.
OR (Optional) Install eZ Plattform Demo (Demo Content):
PS: Maybe it is better to install a second eZ Plattform instance on your server to see how some content is used and do the same in your clean Installation.
At this step we get the demo throw the composer
1 2 |
composer create-project --prefer-dist --no-dev --keep-vcs ezsystems/ezplatform-demo (ezplatform-demo : is the folder name installation , in our case htdocs) php app/console ezplatform:install --env=prod demo |
2.5. Setup folder rights
1 2 3 |
sudo chown -R www-data:www-data app/cache app/logs web sudo find {app/{cache,logs},web} -type d | xargs sudo chmod -R 775 sudo find {app/{cache,logs},web} -type f | xargs sudo chmod -R 664 |
More infos: https://doc.ez.no/display/TECHDOC/Installation
3.DEV VirtualHost
Change paths and ServerName
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
DocumentRoot /srv/www/tests/ezplatform2016.04/htdocs/web Options FollowSymLinks AllowOverride None Require all granted ##see below Include /etc/apache2/sites-enabled/ez6_rewrite/ez6_rewrite_dev LogLevel error ErrorLog /srv/www/tests/ezplatform2016.04/logs/error.log CustomLog /srv/www/tests/ezplatform2016.04/logs/access.log combined ServerName dev.ez201604.de |
/etc/apache2/sites-enabled/ez6_rewrite/ez6_rewrite_dev
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
DirectoryIndex app.php # Set default timeout to 90s, and max upload to 48mb TimeOut 90 LimitRequestBody 49152 # Enabled for Dev environment LogLevel debug RewriteEngine On # Environment. # Possible values: "prod" and "dev" out-of-the-box, other values possible with proper configuration # Defaults to "prod" if omitted (uses SetEnvIf so value can be used in rewrite rules SetEnvIf Request_URI ".*" SYMFONY_ENV=dev # Optional: Whether to use custom ClassLoader (autoloader) file # Needs to be a valid path relative to root web/ directory # Defaults to bootstrap.php.cache, or autoload.php in debug if env value is omitted or empty #SetEnv SYMFONY_CLASSLOADER_FILE "%SYMFONY_CLASSLOADER_FILE%" # Optional: Whether to use debugging. # Possible values: 0, 1 or "" # Defaults to enabled if SYMFONY_ENV is set to "dev" if env value is omitted or empty SetEnv SYMFONY_DEBUG 1 # Optional: Whether to use Symfony's HTTP Caching. # Disable it if you are using an external reverse proxy (e.g. Varnish) # Possible values: 0, 1 or "" # Defaults to disabled if SYMFONY_ENV is set to "dev" or SYMFONY_TRUSTED_PROXIES is set, # and if this env value is omitted or empty SetEnv SYMFONY_HTTP_CACHE 0 # Optional: Whether to use custom HTTP Cache class if SYMFONY_HTTP_CACHE is enabled # Value must be a autoloadable cache class # Defaults to to use provided "AppCache" if env value is omitted or empty #SetEnv SYMFONY_HTTP_CACHE_CLASS "%SYMFONY_HTTP_CACHE_CLASS%" # Optional: Defines the proxies to trust # Needed when using Varnish as proxy, if so disable SYMFONY_HTTP_CACHE. # Separate entries by a comma, example: "proxy1.example.com,proxy2.example.org" # Defaults to not be set if env value is omitted or empty SetEnv SYMFONY_TRUSTED_PROXIES 127.0.0.1 RewriteEngine On # For FastCGI mode or when using PHP-FPM, to get basic auth working. RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] # Needed for ci testing, you can optionally remove this. RewriteCond %{ENV:SYMFONY_ENV} "behat" RewriteCond %{REQUEST_URI} ^/php5-fcgi(.*) RewriteRule . - [L] # Cluster/streamed files rewrite rules. Enable on cluster with DFS as a binary data handler #RewriteRule ^/var/([^/]+/)?storage/images(-versioned)?/.* /app.php [L] RewriteRule ^/var/([^/]+/)?storage/images(-versioned)?/.* - [L] # Makes it possible to place your favicon at the root of your eZ Platform instance. # It will then be served directly. RewriteRule ^/favicon\.ico - [L] # Give direct access to robots.txt for use by crawlers (Google, Bing, Spammers...) RewriteRule ^/robots\.txt - [L] # Platform for Privacy Preferences Project ( P3P ) related files for Internet Explorer # More info here : http://en.wikipedia.org/wiki/P3p RewriteRule ^/w3c/p3p\.xml - [L] # The following rule is needed to correctly display assets from eZ Platform / Symfony bundles RewriteRule ^/bundles/ - [L] # Access to repository images in single server setup RewriteRule ^var/([^/]+/)?storage/images(-versioned)?/.* - [L] # Additional Assetic rules for environments different from dev, # remember to run php app/console assetic:dump --env=prod #RewriteCond %{ENV:SYMFONY_ENV} !^(dev) #RewriteRule ^/(css|js|font)/.*\.(css|js|otf|eot|ttf|svg|woff) - [L] RewriteRule .* /app.php # Everything below is optional to improve performance by forcing # clients to cache image and design files, change the expires time # to suite project needs. <LocationMatch "^/var/[^/]+/storage/images/.*"> # eZ Platform appends the version number to image URL (ezimage # datatype) so when an image is updated, its URL changes too ExpiresActive on ExpiresDefault "now plus 10 years" |
4.Prod VirtualHost
Change paths and ServerName
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
DocumentRoot /srv/www/tests/ezplatform2016.04/htdocs/web Options FollowSymLinks AllowOverride None Require all granted Include /etc/apache2/sites-enabled/ez6_rewrite/ez6_rewrite_prod LogLevel error ErrorLog /srv/www/tests/ezplatform2016.04/logs/error.log CustomLog /srv/www/tests/ezplatform2016.04/logs/access.log combined ServerName prod.ez201604.de |
/etc/apache2/sites-enabled/ez6_rewrite/ez6_rewrite_prod
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 |
DirectoryIndex app.php # Set default timeout to 90s, and max upload to 48mb TimeOut 90 LimitRequestBody 49152 # Enabled for Dev environment LogLevel debug RewriteEngine On # Environment. # Possible values: "prod" and "dev" out-of-the-box, other values possible with proper configuration # Defaults to "prod" if omitted (uses SetEnvIf so value can be used in rewrite rules SetEnvIf Request_URI ".*" SYMFONY_ENV=prod # Optional: Whether to use custom ClassLoader (autoloader) file # Needs to be a valid path relative to root web/ directory # Defaults to bootstrap.php.cache, or autoload.php in debug if env value is omitted or empty #SetEnv SYMFONY_CLASSLOADER_FILE "%SYMFONY_CLASSLOADER_FILE%" # Optional: Whether to use debugging. # Possible values: 0, 1 or "" # Defaults to enabled if SYMFONY_ENV is set to "dev" if env value is omitted or empty #SetEnv SYMFONY_DEBUG 1 # Optional: Whether to use Symfony's HTTP Caching. # Disable it if you are using an external reverse proxy (e.g. Varnish) # Possible values: 0, 1 or "" # Defaults to disabled if SYMFONY_ENV is set to "dev" or SYMFONY_TRUSTED_PROXIES is set, # and if this env value is omitted or empty SetEnv SYMFONY_HTTP_CACHE 1 # Optional: Whether to use custom HTTP Cache class if SYMFONY_HTTP_CACHE is enabled # Value must be a autoloadable cache class # Defaults to to use provided "AppCache" if env value is omitted or empty #SetEnv SYMFONY_HTTP_CACHE_CLASS "%SYMFONY_HTTP_CACHE_CLASS%" # Optional: Defines the proxies to trust # Needed when using Varnish as proxy, if so disable SYMFONY_HTTP_CACHE. # Separate entries by a comma, example: "proxy1.example.com,proxy2.example.org" # Defaults to not be set if env value is omitted or empty SetEnv SYMFONY_TRUSTED_PROXIES 127.0.0.1 RewriteEngine On # For FastCGI mode or when using PHP-FPM, to get basic auth working. RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] # Needed for ci testing, you can optionally remove this. RewriteCond %{ENV:SYMFONY_ENV} "behat" RewriteCond %{REQUEST_URI} ^/php5-fcgi(.*) RewriteRule . - [L] # Cluster/streamed files rewrite rules. Enable on cluster with DFS as a binary data handler #RewriteRule ^/var/([^/]+/)?storage/images(-versioned)?/.* /app.php [L] RewriteRule ^/var/([^/]+/)?storage/images(-versioned)?/.* - [L] # Makes it possible to place your favicon at the root of your eZ Platform instance. # It will then be served directly. RewriteRule ^/favicon\.ico - [L] # Give direct access to robots.txt for use by crawlers (Google, Bing, Spammers...) RewriteRule ^/robots\.txt - [L] # Platform for Privacy Preferences Project ( P3P ) related files for Internet Explorer # More info here : http://en.wikipedia.org/wiki/P3p RewriteRule ^/w3c/p3p\.xml - [L] # The following rule is needed to correctly display assets from eZ Platform / Symfony bundles RewriteRule ^/bundles/ - [L] # Access to repository images in single server setup RewriteRule ^var/([^/]+/)?storage/images(-versioned)?/.* - [L] # Additional Assetic rules for environments different from dev, # remember to run php app/console assetic:dump --env=prod RewriteCond %{ENV:SYMFONY_ENV} !^(dev) RewriteRule ^/(css|js|font)/.*\.(css|js|otf|eot|ttf|svg|woff) - [L] RewriteRule .* /app.php # Everything below is optional to improve performance by forcing # clients to cache image and design files, change the expires time # to suite project needs. <LocationMatch "^/var/[^/]+/storage/images/.*"> # eZ Platform appends the version number to image URL (ezimage # datatype) so when an image is updated, its URL changes too ExpiresActive on ExpiresDefault "now plus 10 years" |
4.Access your installtion
PS: Don’t forget to use your ServerName
frontend dev : http://dev.ez201604.de/
backend dev : http://dev.ez201604.de/ez
frontend prod : http://prod.ez201604.de/
backend prod : http://prod.ez201604.de/ez
User:admin
password:publish
Good luck!