======= Database installation =======

* Generalities
------------

The configuration file relative to database settings is /config/define_db.ini


By default, the application is set to exchange data in UTF-8 format.

Create a user named 'linea' with 'linea' as password and give him rights on the database previously created (simply name it 'linea' as well), or change the user name and his password in /config/define_db.ini file.

!!! For security reason, imperatively change login/password if your website is on production server !!!


* MySQL Installation
------------------------

- Execute /scripts_sql/buildDB.mysql.sql script
- Execute /scripts_sql/input.mysql.en.sql to populate the DB

* PostGreSQL Installation
------------------------

- see section "installation under PostGreSQL"


======= Set up your installation =======

remark : since version 1.2, Linea21 gives the ability to modify parameters from the back-office under the 'configuration' module.
If you don't want to use the back-office, you can directly make changes in /config/define_release.ini file.
For a basic installation, the following GLOBAL variables should be set : SERVER_SETTINGS, MAIL_INFORMATIONS et MAIL_SETTINGS
Linea21 is released by default with the local authority name 'mylinea'. For your own installation, modify url, mails and local authority parameters sections. 


======= Log-in into the back-office =======

To log-in into the back-office, open linea21 from your web-browser.
The url should be similar to :

http://localhost/linea21/admin/

login : admin
password : linea

!!! Change the admin password if you want to use linea21 in a production server !!!


======= Define the website root =======

Some features call the required globals SITE_CITY_URL, SITE_ROOT_URL and SITE_PATH defined in /config/define_release.ini
Please, be sure these parameters are set.

SITE_CITY_URL = "http://localhost/linea21/public/" // local
SITE_CITY_URL = "http://linea21.monsiteweb.com" //online

SITE_ROOT_URL = "http://localhost/linea21/" // local
SITE_ROOT_URL = "http://www.monsiteweb.com" // online

SITE_PATH = "C:/server/apache/Apache2/htdocs/linea21/" // sample under Windows

Check the value of $_SERVER["DOCUMENT_ROOT"] then concatenate the folder name under Linea21 is deployed to know the path of the application and define SITE_PATH


======= UTF-8 encoding warning =======

All application files are UTF-8 encoded. To edit files, imperatively use a text-editor supporting UTF-8 format and save files keeping the same format.


======= 1.1 to 1.2.x migration =======
   
1 - backup your current webapps : by default, linea21 folder
2 - backup your current database : mysqldump -hlocalhost -ulinea -plinea linea21 > /home/backup_linea21/linea21_1_date.dmp
3 - apply the migration patch (in /scripts_sql/patches) vers linea21 1.2.x : mysql -hlocalhost -ulinea -plinea linea21 < /home/linea21/scripts_sql/patches/patch_1.2.mysql.fr.sql
4 - delete the current webapps : rm -R /home/linea21 Or you can choose to install the new one in a new folder
5 - unzip the new version (should be done if you are reading this!) into apache execution folder ex: /home/linea21
6 - apply specific setup to the following files :
	config/define_release.php from the previous version to config/define_release.ini
	config/define_db.php  from the previous version to  vers config/define_db.ini
7 -copy folders content from the previous to the new version :
	/contents/input
	/multimedia/input
	/news/input
	/newsletter/input
	/publication/contents
	/user/avatar


If you want to use URL Rewriting, please check /public/.htaccess file (Un-comment virtualhost or not)
Report old configuration from the previous version to the new one (ex :/public/tpl_home.php).
Version 1.2.x offers a new template system. By default, files are read from /public/dist/. You can create your own templates
and put them into /public/. Users templates have priority on default templates.


======= 1.2.x to 1.3 migration =======

- Repeat steps 1, 2, 3, 4, 5, 6 below
- For step 3 : Execute /scripts_sql/patches/patch_1.3.mysql.sql script


======= Documentation and support =======

http://dev.linea21.com				Wiki - Bug tracker
http://www.linea21.com/forum		Forum
http://www.linea21.com				Website


======= Installation under PostGreSQL =======

- create a database named 'linea'
- Execute /scripts_sql/buildDB.pgsql.sql script
- Execute /scripts_sql/input.pgsql.fr.sql script

Change the value of the defined variable 'SQL'  into /config/define_release.ini file.  Replace from 'mysql' to 'pgsql'.

!!! Version 1.2.x does not allow use of the 'search' module for pgsql  version >= 8.3 !!!

PostgreSQL Search engine : Tsearch2 Installation (PGSQL version <= 8.3)

Execute SQL script 'tsearch2.sql' located into /share/contrib/ (from PostgreSQL root folder install) to implement FTI (Full Text Indexing) search engine.

Finally, execute script/scripts_sql/buildDBindex.pgsql.sql script to generate necessary indexes.

To enhance search engines features, we highly advice to use a dictionary with FTI.

Available dictionaries and installation processes :

http://www.sai.msu.su/~megera/postgres/gist/tsearch/V2/
http://www.sai.msu.su/~megera/postgres/gist/doc/intro.shtml

If you install a dictionary, you would probably have to change the specified schema for search. Edit /search/pgsql.inc.php, look for \'default\' value and replaceit by the value you previously defined into the database 


======= Frequents Errors =======

* postgresql database installation.
   IF EXISTS only available from version 8.2.
   Remove instructions into the installation scripts
   
   





