install / install_manually  

Install Exponential 3 manually

Exponential 3 requirements

You need to have Apache, MySQL, ImageMagick and PHP installed to run Exponential 3. PHP needs to have compiled-in support for either MySQL (--with-mysql) or PostgreSQL (--with-pgsql) For image conversion support you need to have GD compiled in PHP or ImageMagick installed on your system.

The installation processes for the above programs are very well documented on their respective home pages, so we will not include that here.

Installation on Linux, FreeBSD and Mac OS X

  1. Unpack ezpublish-xxx.tar.gz into the <httproot> folder
     $ tar xvfz ezpublish-xxx.tar.gz -C <httproot>
  2. Now go to the extracted Exponential directory
     $ cd <httproot>/ezpublish-xxx/
  3. Run the modfix.sh script
     $ bin/modfix.sh

Database setup

MySQL

We need to login, create a new database, grant permissions to a user and insert a database.

  1.  $ mysql -u root -p <password>
  2. You should now have a "mysql>" prompt, create a new database
     mysql> create database <name_of_database>
  3. Grant permissions (This will also create the user)
     mysql> grant all on <name_of_database>.* to <user>@localhost
    	identified by '<password>';
  4. If you don't want to install demodata:
     $ mysql -u <user> -p<password> <name_of_database>
    	< <httproot>/ezpublish-xxx/kernel/sql/mysql/kernel_schema.sql
     $ mysql -u <user> -p<password> <name_of_database>
        < <httproot>/ezpublish-xxx/kernel/sql/mysql/cleandata.sql
    If you want the demodata:
     $ mysql -u <user> -p<password> <name_of_database>
        < <httproot>/ezpublish-xxx/kernel/sql/mysql/kernel_schema.sql
     $ mysql -u <user> -p<password> <name_of_database>
    	< <httproot>/ezpublish-xxx/kernel/sql/mysql/demodata.sql 

PostgreSQL

We need to login, create a new database, grant permissions to a user and insert a database.

  1. Become the PostgreSQL super user (normally called postgres)
    $ su <postgres_super_user>
  2. Create a postgresql user
    $ createuser <user>
  3. Create a database
    $ createdb <name_of_database>
  4. Demodata is not available for PostgreSQL at the moment, so we have to install the kernel_clean.sql file
    $ psql -U <ezpublish_user>  <name_of_database>
    	< <httproot>/ezpublish-xxx/kernel/sql/postgresql/kernel_schema.sql
    $ psql -U <ezpublish_user>  <name_of_database>
        < <httproot>/ezpublish-xxx/kernel/sql/postgresql/cleandata.sql

Demo data

Demodata is only available for MySQL. Before you proceed make sure you installed the demokernel.sql file and NOT the kernel_clean.sql file.

To install the demodata all you have to do is unpack the var.tgz file

  1. Go to <httproot>\ezpublish-xxx
     $ cd <httproot>/ezpublish-xxx
  2. Unpack var.tgz
     $ tar xvfz var.tgz

Configure Exponential

Open <httproot>/ezpublish-xxx/settings/site.ini with your favourite editor and set the correct setting in the [Database Settings] section. You need to select what database implementation you would like to use, hostname of the database server to connect to, username, password and database name. (Instead of using this file, you can create a file called <httproot>/ezpublish-xxx/settings/override.site.ini.append Here you can override settings in site.ini. Add only the parts you need.)

Non-virtual host security issue: If you use a non-virtualhost setup, all .ini-files should be renamed to .ini.php (the filename must end with dot ini dot php), and all .ini.append-files should be renamed to .ini.append.php (the filename must end with dot ini dot append dot php). Also, the content of the files must be enclosed within PHP comments, like this:
/* #?ini charset="iso-8859-1"?
[DatabaseSettings]
Password=mypassword
*/
If you don't do this, then the content of .ini-files, including the database password, may be read by an attacker. This kind of attack is not possible if you use a virtualhost setup

[Database Settings]
# Use either ezmysql or ezpostgresql
Database Implementation=ezpostgresql
# Name of server to connect to
Server=localhost
# DB user name
User=<user>
# DB Password
Password=<password>
# database name you have created in the previous step
Database=<name_of_database>

Virtualhost setup

You can use Exponential with a virtualhost setup. When using a virtualhost you don't need to specify the index.php in the URL. Below is a sample configuration for virtualhost setup. Include this in your apache config file and restart apache when you are done.

<Virtualhost <you_ip_address>>
  <Directory <httproot>/ezpublish-xxx/>
    Options FollowSymLinks Indexes ExecCGI
    AllowOverride None
  </Directory>

  RewriteEngine On
  RewriteRule !\.(gif|css|jpg|png|js)$ <httproot>/ezpublish-xxx/index.php

  ServerAdmin root@localhost
  DocumentRoot <httproot>/ezpublish-xxx/
  ServerName <you_ip_address>
</VirtualHost>

Siteaccess settings

For help on how to configure site access, head over to the site access section

Installation on Windows

  1. Unpack ezpublish-xxx.tar.gz into the <httproot> folder. Use a program that supports .tar.gz files, like WinZip.
  2. Go to <httproot>\ezpublish-xxx
  3. Make sure the directory var\cache\ini exists, if not, create it.

Database setup

MySQL

We need to login, create a new database, grant permissions to a user and insert a database.

  1. Open a console window (start->run->cmd.exe or start->run->command.exe depending on the Windows version)
  2. Go to your the location of mysql and find the mysql.exe file (should be under bin\)
  3. Run
    mysql.exe -u root -p <your_mysql_password>
  4. You should now have have a mysql> prompt. Type these mysql statements
    mysql> create database <name_of_database>;
  5. Grant permissions (This will also create the user)
     mysql> grant all on .* to <user>@localhost identified
    	by '<password>';
  6. If you don't want demodata
    $ mysql.exe -u <user> -p<password> <name_of_database>
    	< <httproot>\ezpublish-xxx\kernel\sql\mysql\kernel_schema.sql
    $ mysql.exe -u <user> -p<password> <name_of_database>
        < <httproot>\ezpublish-xxx\kernel\sql\mysql\cleandata.sql
  7. If you do want demodata
     $ mysql.exe -u<user> -p<password> <name_of_database>
    	< <httproot>\ezpublish-xxx\kernel\sql\mysql\kernel_schema.sql
     $ mysql.exe -u<user> -p<password> <name_of_database>
        < <httproot>\ezpublish-xxx\kernel\sql\mysql\demodata.sql

Demo data

Demodata is only available for MySQL. Before you proceed make sure you installed the demokernel.sql file and NOT the kernel_clean.sql file.

To install the demodata all you have to do is unpack the var.tgz file

  1. Go to <httproot>\ezpublish-xxx
  2. Unpack var.tgz into <httproot>\ezpublish-xxx

Configure Exponential

Open <httproot>/ezpublish-xxx/settings/site.ini in notepad and set the correct settings in the [Database Settings] section. You need to set what database implementation you use, hostname of database server to connect to, user name, password, database name. (Instead of using this file, you can create a file called <httproot>/ezpublish-xxx/settings/override.site.ini.append Here you can override settings in site.ini. Add only the parts you need.)

Non-virtual host security issue: If you use a non-virtualhost setup, all .ini-files should be renamed to .ini.php (the filename must end with dot ini dot php), and all .ini.append-files should be renamed to .ini.append.php (the filename must end with dot ini dot append dot php). Also, the content of the files must be enclosed within PHP comments, like this:
/* #?ini charset="iso-8859-1"?
[DatabaseSettings]
Password=mypassword
*/
If you don't do this, then the content of .ini-files, including the database password, may be read by an attacker. This kind of attack is not possible if you use a virtualhost setup

[Database Settings]
# Use either ezmysql or ezpostgresql
DatabaseImplementation=ezpostgresql
# Name of server to connect to
Server=localhost
# DB user name
User=<user>
# DB Password
Password=<password>
# database name you have created on previous step
Database=<name_of_database>

Virtualhost setup

You can use Exponential with a virtualhost setup. When using a virtualhost you don't need to specify the index.php in the URL.

Make sure these lines exists in your apache config file and are not commented out:

LoadModule rewrite_module modules/mod_rewrite.so
AddModule mod_rewrite.c

Below is a sample configuration for virtualhost setup. Include this in your apache config file and restart apache when you are done.

<VirtualHost <your_ip_adress>>
  <Directory <httproot>/ezpublish-xxx/>
    Options FollowSymLinks Indexes ExecCGI
    AllowOverride None
  </Directory>

  RewriteEngine On
  RewriteRule !\.(gif|css|jpg|png|jar|js)$ /index.php

  ServerAdmin root@localhost
  DocumentRoot <httproot>/ezpublish-xxx
  ServerName <your_ip_adress>
</VirtualHost>

Note:The rewrite rule is relative to the http root and uses '/' (slash) not '\' (backslash)

Siteaccess settings

For help on how to configure site access, head over to the site access section

Security

It's important that steps are taken to secure the site, more information on this can be read at Securing the site

Exponential