Installation
This section installs Exponential 6 (the 6.0 line, current release 6.0.15) from an empty server to a working site. It covers the requirements, the quick install with Composer, the setup wizard in the browser, the kickstarter, the web server, permissions and cron, the first sign-in and how to check the result. Every command here was checked against the 6.0.15 console.
The earlier pages of this section were written for eZ Publish, the predecessor of Exponential, which its creator discontinued. They remain in each page's version history. Exponential 6 installs differently: with Composer, one console command or the setup wizard, on SQLite by default, served by Exponential Velocity or by Apache or nginx with PHP-FPM.
Run every command from the installation root, the directory that holds index.php, autoload.php, bin/ and settings/. ./console is a shortcut for php bin/php/console that many installations add (ln -s bin/php/console console). When you run a script as root, add --allow-root-user; the script tells you when it is needed.
Requirements at a glance
| Need | Exponential 6.0.15 |
|---|---|
| PHP | 8.0 to 8.5 supported; 7.4 usable without support. Use the newest PHP your system offers. |
| PHP extensions | dom, libxml, simplexml, xsl, mbstring, iconv, intl, pcre, json, session, zlib, one database extension, and gd or ImageMagick. Recommended: curl, openssl, pcntl, opcache; sockets for Velocity. |
| Database, in order of preference | 1. SQLite 3 (the default, no server) 2. PostgreSQL 3. MongoDB 4. MariaDB 5. Oracle (through the ezoracle extension) 6. MySQL |
| Web server | Exponential Velocity (recommended, installed with Exponential), or Apache or nginx with PHP-FPM, or any server that can rewrite a URL to index.php |
| Composer | 2.x, the current release |
The details, with the php.ini settings and the packages per Linux distribution: Requirements.
Quick install with Composer
With PHP and Composer, these commands install a working site on SQLite, without a database server, and serve it with PHP's built-in server for a first look:
composer create-project se7enxweb/exponential exponential cd exponential php bin/php/console exp:install --apply --random-password --url=http://localhost:8087 php bin/php/console exp:velocity start --engine=php
Open http://localhost:8087/site/ for the site and http://localhost:8087/admin/user/login for the administration. The user is admin; the password is printed once at the end of the install and written to var/log/initial-admin-password. Stop the server with php bin/php/console exp:velocity stop --engine=php.
Without --apply, exp:install is a dry run: it checks the database and the packages and installs nothing. Add a version to pin a release, for example composer create-project se7enxweb/exponential:v6.0.14 exponential. The php engine is for development only; a real site uses Velocity or a web server (below). The full walk-through, with every option: Normal installation.
Three ways to install
All three run the same setup steps and produce the same installation.
| Console install | Setup wizard | Kickstarter | |
|---|---|---|---|
| Started by | php bin/php/console exp:install --apply | opening the site in a browser | php bin/php/console exp:kickstarter run --apply |
| Answers come from | command-line options, each with a default | forms, one page per step | kickstart.ini in the installation root |
| Web server needed during the install | no | yes | no |
| Dry run | the default; --print shows the configuration | no | the default (run without --apply) |
| Best for | the fastest install, scripts and CI | a first install, trying Exponential | repeatable and unattended installs |
| Read more | Normal installation | The setup wizard | Automated installation |
To build websites rather than only run one, get the code as Git clones with their history first: Manual installation.
Serve the site
The document root is always the installation root.
- Exponential Velocity (recommended for every stage): an application server installed with Exponential that serves HTTP and HTTPS itself, with no Apache, nginx or PHP-FPM.
- Apache with PHP-FPM: the rewrite rules ship in .htaccess_root; ./console exp:setup:htaccess --apply copies them to .htaccess.
- nginx with PHP-FPM, and LiteSpeed, Caddy or IIS: the same rules as server configuration.
Commands and complete examples: Virtual host setup, Virtual host example and htaccess example.
Permissions and cron
The user the web server or the Velocity workers run as must be able to write design, extension, settings (with settings/override and settings/siteaccess) and var with everything below it. The setup wizard's system check prints the exact commands for your machine, of this form:
sudo chmod -R ug+rwx design extension settings var sudo chown -R <web user>:<web group> design extension settings var
When the command line (cronjobs, the console, Composer) and the web server run as different users, give them a common group that can write the same files.
The cronjobs publish scheduled content, send notifications and newsletters and clean up. Since 6.0.15 every installer (the setup wizard, the kickstarter and exp:install) writes them in its last step into the crontab of the user that owns the installation directory (exp:install --no-crontab prints the lines instead). Show, add or remove that block at any time:
php bin/php/console exp:installcrontab --show php bin/php/console exp:installcrontab --add --apply
When the installer could not write the crontab, add the block with the second command, or the lines by hand (use your public siteaccess and the same PHP binary as the web server):
*/5 * * * * cd /path/to/installation && php runcronjobs.php -q -s site frequent >> var/log/cron-frequent.log 2>&1 17 * * * * cd /path/to/installation && php runcronjobs.php -q -s site infrequent >> var/log/cron-infrequent.log 2>&1
First sign-in and the administrator password
- Open the admin address the installer printed (with the default URL access, /admin/user/login below the site address) and sign in as admin with the password from the install summary or from var/log/initial-admin-password. The setup wizard uses the password you entered on its Site administrator page.
- Change the password at once: Change password in the user menu, or /admin/user/password. It must have at least 10 characters and must not be a well-known password.
- Delete the password file: rm var/log/initial-admin-password.
- Give the administrator a real e-mail address, so a password reset by mail reaches someone.
A lost password is reset on the command line; as root no other sign-in is needed, and -g generates and prints a new password:
php bin/php/resetuserpassword.php -u admin -g --allow-root-user
Check the installation
php bin/php/console --version # console (Exponential) 6.0.15...
php bin/php/console exp:setup:status # where .htaccess and config.php come from
php bin/php/console exp:installcrontab --show
curl -s -o /dev/null -w '%{http_code}\n' https://www.example.com/site/ # 200
curl -s -o /dev/null -w '%{http_code}\n' https://www.example.com/.git/config # 404
tail var/log/error.log
On SQLite, also make sure the database file is never served; this must answer anything but 200:
curl -sI https://www.example.com/var/storage/sqlite3/exponential.db
When a step fails, see Troubleshooting.
The pages in this section
- Requirements: PHP, extensions, databases, web servers, operating systems.
- Virtual host setup: Velocity, Apache and nginx, HTTPS.
- Normal installation: Composer and exp:install, on Linux and on Windows.
- Manual installation: Git clones, Composer and the settings files by hand.
- Automated installation: the kickstarter and kickstart.ini.
- The setup wizard: the browser installer page by page.
- Removing Exponential: export everything, then remove the installation.
- Extensions: install, order and activate extensions.
- Troubleshooting: symptoms, causes and fixes.
Next steps
- The installation book in the help center: every step in depth, from requirements to security hardening, upgrading and migrating.
- After installing: mail, caches, backups, logs, monitoring and performance.
- Security hardening for production.
- Updating Exponential 6.0 and Upgrading from older versions.
- Installing Exponential 6.0: the short guide on one page.
In this section
- Requirements Requirements of Exponential 6: PHP 8.0 to 8.5, PHP extensions, php.ini settings, databases in order of preference, Composer, web servers and operating systems.
- Virtual host setup Serving Exponential 6: Exponential Velocity with HTTPS, Apache with .htaccess or virtual host rules, nginx with PHP-FPM, other servers and reverse proxies.
- Normal installation The normal installation of Exponential 6: composer create-project and exp:install, with every option.
- Manual installation The manual installation of Exponential 6 with Git clones and composer install, followed by the installer of your choice.
- Automated installation Automated installation of Exponential 6 with the kickstarter and kickstart.ini.
- The setup wizard The setup wizard of Exponential 6 in the browser: how it starts, its pages, failures and restarting it.
- Removing Exponential Removing an Exponential 6 installation: export the data, stop the cron job and the services, remove the virtual host, the database and the files.
- Extensions Adding an extension to Exponential 6: getting it into extension/, activating it and its loading order.
- Troubleshooting Troubleshooting an Exponential 6 installation: the logs, debug output, and symptom, cause and fix for each stage.
- Exponential 5.0 known Issues Historical: known issues of eZ Publish 5.0. Where the known issues of Exponential 6 are documented.
Contributors
- Graham Brookins Updated Maintainer
- Geir Arne Waaler Maintainer
- Ricardo Correia Maintainer
Comments
Add a comment