Message-ID: <1394217247.4058.1485856501120.JavaMail.confluence@ip-10-127-227-164> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_4057_2072347837.1485856501120" ------=_Part_4057_2072347837.1485856501120 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
This section describes how to manually configure eZ Publish inst= ead of using the setup wizard to do all the work. Keep in mind that the man= ual 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.
A clean eZ Publish database is created using two very important SQL scri=
pts: "kernel_schema
" and "cleandata
" (note that a=
n empty database should be created before launching these scripts). The fir=
st of them initializes the necessary database structure and the second one =
imports the pre-defined data to the database. While the "kernel_schem=
a
" script differs for each database engine, the "cleandata" script is the same for all solutions.
Use the following command to run the MySQL specific "kernel_schema=
" script:
$ mysql -u USERNAME -pPASSWORD DATABASE < PATH/ezpublish_legacy/ker= nel/sql/mysql/kernel_schema.sql=20
In eZ Publish 4.0.1 and later versions, the script will use the InnoDB s= torage engine when creating new tables. This storage engine is recommended = (and will be required in the future) for running eZ Publish on a MySQL data= base. Contact your database administrator if you are unsure about whether I= nnoDB is available on your server.
In eZ Publish 4.0.0, the CREATE TABLE
statements in the "ENGINE
or TYPE
option), and thus the default=
storage engine will be used. Normally, it is MyISAM
. Because =
of this, it is highly recommended to set the default storage engine to kernel_schema
" script (ref=
er to the MySQL documentation for=
information about how to set the default engine). Alternatively, you can r=
un the "kernel_schema
" script first and then convert the newly=
created tables to InnoDB
. You can either use the "bin/p=
hp/ezconvertmysqltabletype.php
" script for database conversion (reco=
mmended) or convert the tables individually by using the following SQL quer=
y for each table:
ALTER TABLE <name_of_table> TYPE =3D innodb;=20
Use the following command to run the generic "cleandata
" sc=
ript:
$ mysql -u USERNAME -pPASSWORD DATABASE < PATH/ezpublish_legacy/ker= nel/sql/common/cleandata.sql=20
USERNAME |
The MySQL user (if no user is set up, use "ro= ot"). |
PASSWORD |
The password that belongs to the username. |
DATABASE |
The name of the database, for example "my_dat= abase". |
PATH |
The full path to the root directory of your e= Z Publish installation, for example "/opt/ezp". |
Windows users can skip this part.
Cache, storage, log and configuration folders must be writable both by t= he web server and the command line user. The easiest way is to give the web= server user ownership of those folders:
$ sudo chown -R www-data:www-data ezpublish/{cache,logs,config} ezpubl= ish_legacy/{design,extension,settings,var} web $ sudo find {ezpublish/{cache,logs,config},ezpublish_legacy/{design,extensi= on,settings,var},web} | xargs sudo chmod -R ug+rwX,o+rX=20
One import thing to keep in mind is that all command line script= s must be run as the webserver user in order not to break permissi= ons.
In a development environment, it is often easi= er to set the server to run as your own user.
To be able to run eZ Publish 5 correctly, assets need to be exposed in t=
he public "web
" folder.
The following commands will first symlink eZ Publish 5 assets in "Bundle= s" and the second will symlink assets (design files like images, scripts an= d css, and files in var folder) from eZ Publish Legacy
cd /<ezp5-root> php ezpublish/console assets:install --symlink web # For 5.1 / 2013.4 and higher, also: php ezpublish/console assetic:dump --env=3Dprod web # For eZ Publish 5.x installs, also execute: php ezpublish/console ezpublish:legacy:assets_install --symlink web= =20
Note: In both cases "web
" is =
the default folder and can be skipped from the command. Further information=
about alternative options is available with -h
just=
like it is with "php ezpublish/console -h
".
Warning regarding APC
If you are planning to use APC to speed up your site, please be sure to = check the available notes here, before entering the setup wizard chapter.
5.X<= /p>
The "site.ini.append.php
" configuration file located in the=
"ezpublish_legacy/settings/override
" directory of your eZ Pub=
lish installation must be changed, or else eZ Publish will not function pro=
perly. This file is the global override for the site.ini configuration file. The=
re are a lot of things that need to be configured (database, mail transport=
system, var directory, etc.). The following text shows a generic example o=
f a configuration that can be used:
<?php /* #?ini charset=3D"utf-8"? =20 [DatabaseSettings] DatabaseImplementation=3Dezmysql Server=3Dlocalhost User=3Droot Password=3D Database=3Dmy_database =20 [FileSettings] VarDir=3Dvar/example =20 [Session] SessionNameHandler=3Dcustom =20 [SiteSettings] DefaultAccess=3Dexample SiteList[] SiteList[]=3Dexample =20 [SiteAccessSettings] CheckValidity=3Dfalse AvailableSiteAccessList[] AvailableSiteAccessList[]=3Dexample AvailableSiteAccessList[]=3Dexample_admin RelatedSiteAccessList[] RelatedSiteAccessList[]=3Dexample RelatedSiteAccessList[]=3Dexample_admin MatchOrder=3Dhost;uri =20 # Host matching HostMatchMapItems[]=3Dwww.example.com;example HostMatchMapItems[]=3Dadmin.example.com;example_admin =20 [InformationCollectionSettings] EmailReceiver=3Dwebmaster@example.com =20 [MailSettings] Transport=3Dsendmail AdminEmail=3Dwebmaster@example.com EmailSender=3Dtest@example.com =20 [RegionalSettings] Locale=3Deng-GB ContentObjectLocale=3Deng-GB TextTranslation=3Ddisabled =20 */ ?>=20
In the example above the "AvailableSiteAccessList[]
" array =
located in the "[SiteAccessSettings]
" section of this file det=
ermines the available siteaccesses called "example
" and =
"example_admin
". The "CheckValidity
" setting loca=
ted 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 sit=
eaccess ("example
") and an administration siteaccess ("e=
xample_admin
"). The following sub-directories have to be created in =
the root of your eZ Publish installation:
ezpublish_legacy/settings/siteaccess/example
ezpublish_legacy/
settings/siteaccess/example_admin
Both siteaccesses must have a file called "site.ini.append.php".
The following text shows a generic solution for the "example
" siteaccess:
<?php /* #?ini charset=3D"utf-8"? =20 [SiteSettings] SiteName=3DExample SiteURL=3Dwww.example.com LoginPage=3Dembedded =20 [SiteAccessSettings] RequireUserLogin=3Dfalse ShowHiddenNodes=3Dfalse =20 [DesignSettings] SiteDesign=3Dexample =20 [ContentSettings] ViewCaching=3Ddisabled =20 [TemplateSettings] TemplateCache=3Ddisabled TemplateCompile=3Ddisabled #ShowXHTMLCode=3Denabled #Debug=3Denabled =20 [DebugSettings] DebugOutput=3Denabled Debug=3Dinline #DebugRedirection=3Denabled =20 [RegionalSettings] SiteLanguageList[] SiteLanguageList[]=3Deng-GB ShowUntranslatedObjects=3Ddisabled =20 */ ?>=20
The following text shows a generic solution for the "example_admin=
" siteaccess:
<?php /* #?ini charset=3D"utf-8"? =20 [SiteSettings] SiteName=3DExample SiteURL=3Dadmin.example.com LoginPage=3Dcustom =20 [SiteAccessSettings] RequireUserLogin=3Dtrue ShowHiddenNodes=3Dtrue =20 [DesignSettings] SiteDesign=3Dadmin =20 [ContentSettings] CachedViewPreferences[full]=3Dadmin_navigation_content=3D0;admin_navigation= _details=3D0;admin_navigation_languages=3D0;admin_navigation_locations=3D0;= admin_navigation_relations=3D0;admin_navigation_roles=3D0;admin_navigation_= policies=3D0admin_navigation_content=3D0;admin_navigation_translations=3D0;= admin_children_viewmode=3Dlist;admin_list_limit=3D1;admin_edit_show_locatio= ns=3D0;admin_url_list_limit=3D10;admin_url_view_limit=3D10;admin_section_li= st_limit=3D1;admin_orderlist_sortfield=3Duser_name;admin_orderlist_sortorde= r=3Ddesc;admin_search_stats_limit=3D1;admin_treemenu=3D1;admin_bookmarkmenu= =3D1;admin_left_menu_width=3D13 =20 [DebugSettings] DebugOutput=3Ddisabled Debug=3Dinline =20 [RegionalSettings] SiteLanguageList[] SiteLanguageList[]=3Deng-GB ShowUntranslatedObjects=3Denabled =20 */ ?>=20
Note that database settings, mail settings, regional and other settings =
defined in "
" will be used for each siteaccess regardless of what is s=
pecified in the siteaccess settings. In the example above, the "ezpublish_legacy/
settings/override/site.ini.=
append.phpDatab=
ase=3Dmy_database
" is specified under the "[DatabaseSettings]<=
/code>" 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" ch=
apter for more information.
5.X<= /p>
There are some legacy extensions that need to be active, as eZ Publish d=
epends on them. This is usually done in the ezpublish_legacy/
settings/override/site.ini.append.php
settings file.
H=
ere's an example of the extensions that you should activate:
[ExtensionSettings] ActiveExtensions[]=3Dezjscore ActiveExtensions[]=3Dezoe ActiveExtensions[]=3Dezformtoken ActiveExtensions[]=3Dezwt ActiveExtensions[]=3Dezie=20
5.X<= /p>
Available languages and their priorities can be controlled per siteacces=
s using the "SiteLanguageList" configuration s=
etting located under the "[RegionalSettings]
" section of the s=
iteaccess "site.ini.append.php
" file. If this setting is not s=
pecified, the system will use the old "Co=
ntentObjectLocale
" setting and thus only the default language wi=
ll be shown. Refer to the "Configuring the site languages" sec=
tion for more information and examples.
The "cleandata.sql
" script creates only one language which =
is the British English (eng-GB). All other languages should be added using =
the "Setup - Languages" part of the administration interface (http://admin.example.com
in the example above=
).
As of eZ Publish 5.2 the maximum number of languages supported for 64 bi= t servers has been improved, allowing up to 6= 2 languages simultaneously. For 32 bit servers the maximum number of simult= aneous languages supported is 30.
5.X<= /p>
If you have a large site with many nodes, it is strongly recommended to = enable the "Dynamic" switch for your administra= tion siteaccess. This will make the left tree menu in the administration in= terface work much faster and decrease the usage of network bandwidth.
The following user name and password are set by the "cleandata.sql=
" script and can be used for logging in to the administration interf=
ace.
admin
publish
It is strongly recommended to change this password as soon as possible. = Note that if you need another user name for site administrator, you can cre= ate a new administrator user, log in as this user and remove the old one.= p>
5.X<= /p>
The autoloads can be generated by running the ezpgenerateautoloads=
.php
as shown in the example below:
cd /<ezpublish-5-root-dir>/ezpublish_legacy/ php bin/php/ezpgenerateautoloads.php=20
5.X<= /p>
To generate yml configuration for the new Symfony stack a console comman= d has been provided to cover single site setups.
Perform the following command where <group>
represent=
s the siteaccess group name which will be created for your configurations i=
n ezpublish.yml
, for instance package name like "ezdemo_=
site
", "ezwebin_site
" or "ezflow_site
". An=
d <admin_siteaccess>
represents your admin siteaccess, f=
or instance, "ezdemo_site_admin
":
cd /<ezpublish-5-root-dir>/ php ezpublish/console ezpublish:configure --env=3Dprod <group> <= ;admin_siteaccess>=20
If you instead would like to manually create your yml config, do the fol= lowing:
ezpublish/config/ezpublish.yml.example
to ezpub=
lish/config/ezpublish_prod.yml
ezpublish/config/ezpublish_prod.yml