Manual configuration of eZ Publish
This section describes how to manually configure eZ Publish instead of using the setup wizard to do all the work. Keep in mind that the manual installation method is for expert users only. It should only be used by people who know what they are doing. The following steps will work on both Linux/UNIX and Windows environments.
Database initialization
A clean eZ publish database is created using two very important SQL scripts: "kernel_schema" and "cleandata" (note that an empty database should be created before launching these scripts). The first of them initializes the necessary database structure and the second one imports the pre-defined data to the database. While the "kernel_schema" script differs for each database engine, the "cleandata" script is the same for all solutions.
MySQL
Use the following command to run the MySQL specific "kernel_schema" script:
$ mysql -u USERNAME -pPASSWORD DATABASE < PATH/kernel/sql/mysql/kernel_schema.sql
Note that the CREATE TABLE statements in the "kernel_schema" script do not specify which storage engine to use (no ENGINE or TYPE option), and thus the default storage engine will be used. Normally, it is MyISAM. If you are running MySQL 4.x or later, it is recommended to use the InnoDB engine instead (if it is available on your server). To do this, set the default storage engine to InnoDB before you run the "kernel_schema" script (refer to the MySQL documentation for information about how to set the default engine).
When installing an eZ Publish version downloaded from a subversion repository, "TYPE=MyISAM" is explicitly specified in "kernel_schema.sql". To make the script use the InnoDB storage engine, replace all occurrences of "TYPE=MyISAM" with "TYPE=InnoDB" before you run the script. In addition, set the default storage engine to InnoDB, otherwise future upgrades might leave you with a mix of table types.
Alternatively, you can run the "kernel_schema" script first and then convert the newly created tables to InnoDB. You can either use the "bin/php/ezconvertmysqltabletype.php" script for database conversion (recommended) or convert the tables individually by using the following SQL query for each table:
ALTER TABLE <name_of_table> TYPE = innodb;
Use the following command to run the generic "cleandata" script:
$ mysql -u USERNAME -pPASSWORD DATABASE < PATH/kernel/sql/common/cleandata.sql
USERNAME |
The MySQL user (if no user is set up, use "root"). |
PASSWORD |
The password that belongs to the username. |
DATABASE |
The name of the database, for example "my_database". |
PATH |
The full path to the root directory of your eZ publish installation, for example "/opt/ezpublish/3.8". |
File permissions
Windows users can skip this part. If eZ publish is installed on a Linux/UNIX based system, some of the file permissions need to be changed. There exists a shell script that takes care of this. This script must be run, or else, eZ publish will not function properly. The script needs to be run from within the eZ publish directory:
$ cd /opt/ezpublish/3.8 $ bin/modfix.sh
Replace the "/opt/ezpublish/3.8" by the full path to the root directory of your eZ publish installation.
The modfix script recursively alters the permission settings of the following directories inside the eZ publish installation:
- var/*
- settings/*
- design/*
If you know the user and group of the webserver it is recommended to use a different set of permissions:
# chown -R user.usergroup var/ settings/ design/ # chmod -R 770 var/ settings/ design/
The "user.usergroup" notation must be changed to user and groupname that the webserver runs as.
Configuring eZ Publish
The "site.ini.append.php" configuration file located in the "settings/override" directory of your eZ Publish installation must be changed, or else eZ Publish will not function properly. This file is the global override for the site.ini configuration file. There are a lot of things that need to be configured (database, mail transport system, var directory, etc.). The following text shows a generic example of a configuration that can be used:
<?php /* #?ini charset="iso-8859-1"? [DatabaseSettings] DatabaseImplementation=ezmysql Server=localhost User=root Password= Database=my_database [FileSettings] VarDir=var/example [Session] SessionNameHandler=custom [SiteSettings] DefaultAccess=example SiteList[] SiteList[]=example [SiteAccessSettings] CheckValidity=false AvailableSiteAccessList[] AvailableSiteAccessList[]=example AvailableSiteAccessList[]=example_admin MatchOrder=host;uri # Host matching HostMatchMapItems[]=www.example.com;example HostMatchMapItems[]=admin.example.com;example_admin [InformationCollectionSettings] EmailReceiver=webmaster@example.com [MailSettings] Transport=sendmail AdminEmail=webmaster@example.com EmailSender=test@example.com [RegionalSettings] Locale=eng-GB ContentObjectLocale=eng-GB TextTranslation=disabled */ ?>
In the example above the "AvailableSiteAccessList[]" array located in the "[SiteAccessSettings]" section of this file determines the available siteaccesses called "example" and "example_admin". The "CheckValidity" setting located in the same section should be set to false, otherwise the setup wizard will be initiated when trying to access the site.
In addition, two siteaccess configurations must be created, a public siteaccess ("example") and an administration siteaccess ("example_admin"). The following subdirectories have to be created in the root of your eZ Publish installation:
- settings/siteaccess/example
- settings/siteaccess/example_admin
Both siteaccesses must have a file called "site.ini.append.php".
The public siteaccess
The following text shows a generic solution for the "example" siteaccess:
<?php /* #?ini charset="iso-8859-1"? [SiteSettings] SiteName=Example SiteURL=www.example.com LoginPage=embedded [SiteAccessSettings] RequireUserLogin=false ShowHiddenNodes=false [DesignSettings] SiteDesign=example [ContentSettings] ViewCaching=disabled [TemplateSettings] TemplateCache=disabled TemplateCompile=disabled #ShowXHTMLCode=enabled #Debug=enabled [DebugSettings] DebugOutput=enabled Debug=inline #DebugRedirection=enabled [RegionalSettings] SiteLanguageList[] SiteLanguageList[]=eng-GB ShowUntranslatedObjects=disabled */ ?>
The admin siteaccess
The following text shows a generic solution for the "example_admin" siteaccess:
<?php /* #?ini charset="iso-8859-1"? [SiteSettings] SiteName=Example SiteURL=admin.example.com LoginPage=custom [SiteAccessSettings] RequireUserLogin=true ShowHiddenNodes=true [DesignSettings] SiteDesign=admin [ContentSettings] CachedViewPreferences[full]=admin_navigation_content=0;admin_navigation_details=0;admin_navigation_languages=0;admin_navigation_locations= 0;admin_navigation_relations=0;admin_navigation_roles=0;admin_navigation_policies=0;admin_navigation_content=0;admin_navigation_translatio ns=0;admin_children_viewmode=list;admin_list_limit=1;admin_edit_show_locations=0;admin_url_list_limit=10;admin_url_view_limit=10;admin_sec tion_list_limit=1;admin_orderlist_sortfield=user_name;admin_orderlist_sortorder=desc;admin_search_stats_limit=1;admin_treemenu=1;admin_boo kmarkmenu=1;admin_left_menu_width=13 [DebugSettings] DebugOutput=disabled Debug=inline [RegionalSettings] SiteLanguageList[] SiteLanguageList[]=eng-GB ShowUntranslatedObjects=enabled */ ?>
Note that database settings, mail settings, regional and other settings defined in "settings/override/site.ini.append.php" will be used for each siteaccess regardless of what is specified in the siteaccess settings. In the example above, the "Database=my_database" is specified under the "[DatabaseSettings]" section of this file so this database will be used for both "example" and "example_admin" siteaccesses. Refer to the "Site management" and "Configuration" sections of the "Concepts and basics" chapter for more information.
Unicode support
If you're using a database which supports Unicode (for example MySQL 4.1.x or later) and PHP is compiled with multibyte string support, create the file called "i18n.ini.append.php" in the "settings/override/" directory of your eZ Publish installation and make sure that it contains the following lines:
<?php /* #?ini charset="iso-8859-1"? [CharacterSettings] Charset=utf-8 MBStringExtension=enabled */ ?>
Languages
In eZ Publish 3.7 and earlier versions, objects had to be created in the primary language before they could be translated to additional languages. Multiple translators could not work simultaneously because the edit process locked the entire version which also contained the translations. In eZ Publish 3.8 and later versions, the primary language concept is gone and thus objects can be created using different languages. This means that you can for example have an article available only in English and another article available only in Norwegian. Multiple translators can work with different translations at the same time on the same object. (Refer to the "Multi-language" section of the "Features" chapter for more information.)
Available languages and their priorities can be controlled per siteaccess using the "SiteLanguageList" configuration setting located under the "[RegionalSettings]" section of the siteaccess "site.ini.append.php" file. If this setting is not specified, the system will use the old "ContentObjectLocale" setting and thus only the default language will be shown. Note that the "ContentObjectLocale" INI setting does not specify the primary language but the default language. This language will be used as the default value in PHP functions that support an optional parameter for language.
The "cleandata.sql" script creates only one language which is the British English (eng-GB). All other languages should be added using "Setup ? Languages" in the administration interface (http://admin.example.com in the example above). The following username and password are set by the "creandata.sql" script and can be used for logging in to the administration interface.
- Username: admin
- Password: publish
Dynamic tree menu
If you have a large site with many nodes, it is strongly recommended to enable the "Dynamic" switch for your administration siteaccess. This will make the left tree menu in the administration interface work much faster and decrease the usage of network bandwidth.
Balazs Halasy (03/05/2005 8:28 am)
Svitlana Shatokhina (20/08/2008 8:11 am)
Comments
Some other INI files
Friday 04 August 2006 7:43:04 am
Kristof Coomans
This documentation page should list them all, especially for the admin site access (toolbar.ini, icon.ini, ...).
conficuration
Tuesday 05 May 2009 10:41:58 am
brandy kingsley
Databases
Tuesday 15 August 2006 3:02:21 pm
Gerald
install probleme
Thursday 17 August 2006 3:39:37 pm
jean martin
Couldn't login
Monday 18 June 2007 3:27:38 pm
Xavier
I've done a manual installation of 3.9.2, trying to setup a multi-sites configuration.
After inserting all cleandata.sql, I never can login using [admin/publish] : "The system could not log you in."
What could be wrong ? Any idea ?
Re: Couldn't login
Monday 25 June 2007 10:50:56 am
Voloshin Vyacheslav
A problem is not in cleandata.sql.
I used him many times in work and no one problem with the login arose up.
MySQL storage engine issue with kernel_schema.sql
Tuesday 06 November 2007 7:06:43 pm
Matthew Carroll
To convert all tables in 3.10 to InnoDB, use the following sql:
ALTER TABLE ezapprove_items TYPE = innodb;
ALTER TABLE ezbasket TYPE = innodb;
ALTER TABLE ezbinaryfile TYPE = innodb;
ALTER TABLE ezcollab_group TYPE = innodb;
ALTER TABLE ezcollab_item TYPE = innodb;
ALTER TABLE ezcollab_item_group_link TYPE = innodb;
ALTER TABLE ezcollab_item_message_link TYPE = innodb;
ALTER TABLE ezcollab_item_participant_link TYPE = innodb;
ALTER TABLE ezcollab_item_status TYPE = innodb;
ALTER TABLE ezcollab_notification_rule TYPE = innodb;
ALTER TABLE ezcollab_profile TYPE = innodb;
ALTER TABLE ezcollab_simple_message TYPE = innodb;
ALTER TABLE ezcontent_language TYPE = innodb;
ALTER TABLE ezcontentbrowsebookmark TYPE = innodb;
ALTER TABLE ezcontentbrowserecent TYPE = innodb;many
ALTER TABLE ezcontentclass TYPE = innodb;
ALTER TABLE ezcontentclass_attribute TYPE = innodb;
ALTER TABLE ezcontentclass_classgroup TYPE = innodb;
ALTER TABLE ezcontentclass_name TYPE = innodb;
ALTER TABLE ezcontentclassgroup TYPE = innodb;
ALTER TABLE ezcontentobject TYPE = innodb;
ALTER TABLE ezcontentobject_attribute TYPE = innodb;
ALTER TABLE ezcontentobject_link TYPE = innodb;
ALTER TABLE ezcontentobject_name TYPE = innodb;
ALTER TABLE ezcontentobject_trash TYPE = innodb;
ALTER TABLE ezcontentobject_tree TYPE = innodb;
ALTER TABLE ezcontentobject_version TYPE = innodb;
ALTER TABLE ezcurrencydata TYPE = innodb;
ALTER TABLE ezdiscountrule TYPE = innodb;
ALTER TABLE ezdiscountsubrule TYPE = innodb;
ALTER TABLE ezdiscountsubrule_value TYPE = innodb;
ALTER TABLE ezenumobjectvalue TYPE = innodb;
ALTER TABLE ezenumvalue TYPE = innodb;
ALTER TABLE ezforgot_password TYPE = innodb;
ALTER TABLE ezgeneral_digest_user_settings TYPE = innodb;
ALTER TABLE ezimage TYPE = innodb;
ALTER TABLE ezimagefile TYPE = innodb;
ALTER TABLE ezimagevariation TYPE = innodb;
ALTER TABLE ezinfocollection TYPE = innodb;
ALTER TABLE ezinfocollection_attribute TYPE = innodb;
ALTER TABLE ezisbn_group TYPE = innodb;
ALTER TABLE ezisbn_group_range TYPE = innodb;
ALTER TABLE ezisbn_registrant_range TYPE = innodb;
ALTER TABLE ezkeyword TYPE = innodb;
ALTER TABLE ezkeyword_attribute_link TYPE = innodb;
ALTER TABLE ezmedia TYPE = innodb;
ALTER TABLE ezmessage TYPE = innodb;
ALTER TABLE ezmodule_run TYPE = innodb;
ALTER TABLE ezmultipricedata TYPE = innodb;
ALTER TABLE eznode_assignment TYPE = innodb;
ALTER TABLE eznotificationcollection TYPE = innodb;
ALTER TABLE eznotificationcollection_item TYPE = innodb;
ALTER TABLE eznotificationevent TYPE = innodb;
ALTER TABLE ezoperation_memento TYPE = innodb;
ALTER TABLE ezorder TYPE = innodb;
ALTER TABLE ezorder_item TYPE = innodb;
ALTER TABLE ezorder_status TYPE = innodb;
ALTER TABLE ezorder_status_history TYPE = innodb;
ALTER TABLE ezpackage TYPE = innodb;
ALTER TABLE ezpaymentobject TYPE = innodb;
ALTER TABLE ezpdf_export TYPE = innodb;
ALTER TABLE ezpending_actions TYPE = innodb;
ALTER TABLE ezpolicy TYPE = innodb;
ALTER TABLE ezpolicy_limitation TYPE = innodb;
ALTER TABLE ezpolicy_limitation_value TYPE = innodb;
ALTER TABLE ezpreferences TYPE = innodb;
ALTER TABLE ezproductcategory TYPE = innodb;
ALTER TABLE ezproductcollection TYPE = innodb;
ALTER TABLE ezproductcollection_item TYPE = innodb;
ALTER TABLE ezproductcollection_item_opt TYPE = innodb;
ALTER TABLE ezrole TYPE = innodb;
ALTER TABLE ezrss_export TYPE = innodb;
ALTER TABLE ezrss_export_item TYPE = innodb;
ALTER TABLE ezrss_import TYPE = innodb;
ALTER TABLE ezsearch_object_word_link TYPE = innodb;
ALTER TABLE ezsearch_return_count TYPE = innodb;
ALTER TABLE ezsearch_search_phrase TYPE = innodb;
ALTER TABLE ezsearch_word TYPE = innodb;
ALTER TABLE ezsection TYPE = innodb;
ALTER TABLE ezsession TYPE = innodb;
ALTER TABLE ezsite_data TYPE = innodb;
ALTER TABLE ezsubtree_notification_rule TYPE = innodb;
ALTER TABLE eztipafriend_counter TYPE = innodb;
ALTER TABLE eztipafriend_request TYPE = innodb;
ALTER TABLE eztrigger TYPE = innodb;
ALTER TABLE ezurl TYPE = innodb;
ALTER TABLE ezurl_object_link TYPE = innodb;
ALTER TABLE ezurlalias TYPE = innodb;
ALTER TABLE ezurlalias_ml TYPE = innodb;
ALTER TABLE ezuser TYPE = innodb;
ALTER TABLE ezuser_accountkey TYPE = innodb;
ALTER TABLE ezuser_discountrule TYPE = innodb;
ALTER TABLE ezuser_role TYPE = innodb;
ALTER TABLE ezuser_setting TYPE = innodb;
ALTER TABLE ezuservisit TYPE = innodb;
ALTER TABLE ezvatrule TYPE = innodb;
ALTER TABLE ezvatrule_product_category TYPE = innodb;
ALTER TABLE ezvattype TYPE = innodb;
ALTER TABLE ezview_counter TYPE = innodb;
ALTER TABLE ezwaituntildatevalue TYPE = innodb;
ALTER TABLE ezwishlist TYPE = innodb;
ALTER TABLE ezworkflow TYPE = innodb;
ALTER TABLE ezworkflow_assign TYPE = innodb;
ALTER TABLE ezworkflow_event TYPE = innodb;
ALTER TABLE ezworkflow_group TYPE = innodb;
ALTER TABLE ezworkflow_group_link TYPE = innodb;
ALTER TABLE ezworkflow_process TYPE = innodb;
or you can use the script "bin/php/ezconvertmysqltabletype.php"
or if you are creating multiple ez publish databases, you may want to modify the kernel_schema.sql before using it, e.g. with sed:
sed s/MyISAM/InnoDB/ kernel_schema.sql > kernel_schema_innodb.sql
(then use kernel_schema_innodb.sql instead)
See also:
http://issues.ez.no/8172