Quick start
From Tangra Framework Wiki
Information of this page is last updated to reflect TF aio build 20080626. If you see any inconsistency or error - please report it as a bug in category "Tangra Wiki".
Contents |
TCC settings
After installing TCC you have to configure some settings in order TCC to be functional.
Open your TCC, login with admin/admin and let's start.
Sites paths
From the main menu choose Settings -> Sites paths.
A grid will open showing that you don't have any paths defined yet.
Sites paths are intended to hold paths where your sites usually reside. Currently this setting is not used by TCC but it will be in next versions.
What is the purpose of sites paths? Well, imagine situation where you already have installed few TF appplications that are created by other people and you want them in your TCC. In future versions of TCC there will be a "Detect sites" functionality that will be used to find TF applications in your sites paths and to import their data into TCC so you will be able to manage them as if they were created by you.
For now you may skip setting sites paths but it will not hurt if you define at least one path. Add the path where your sites normally reside.
Click on "Add new site path" to open a page with form and fill the path.
Example value for sites path: /var/www/sites
Modules sources paths
Modules source path is path that points to a directory that contains Tangra modules. Usually after installation of TF your modules are located in tangra2/tangra_modules.
From the main menu choose Settings -> Modules source paths. A grid will open. Click on "Add new modules source path" and fill the form field with the full path to your tangra_modules dir.
Example: /var/www/sites/tangra2/tangra_modules/
!!! Important: there is a bug in the previous build 20080102 preventing adding new module source path. See bug report 1863077 for bug description and solutions.
File permissions, groups
From the main menu choose Settings -> File persmissions groups
This setting is used when installing new sites/modules. If set, after installation of the files of given module their permissions and group are changed to this setting. This is necessary because when a file is created via TCC it is initially owned by the user used by Apache and you can't edit it (usually). In future versions of TCC this setting will be expanded to have separate permissions for directories and files (i.e. to be able to set 775 for directories and 644 for files).
Update modules information
After you set Modules sources paths it is time to update modules information in order to tell TCC what modules are present.
From the main menu choose: Modules -> Available modules and on the page click on "Update modules info" link. You will be asked for confirmation and then update process will start. When finished a list with updated modules will be shown.
Create new application / site
Choose Site -> Manage sites -> Add new site
You have to enter site details as follows:
- site name - choose name for your site.Example: My first tangra application
- site path - path to directory where site will be installed. This directory you have to create manually before saving the form. Web server have to have permissions to write in it. Example: /var/www/sites/my_test
- description - enter some description
- class and file prefix - mouse over ? icon for description.
Create new VirtualHost for your new site in Apache configuration.
When saved a record for this site will be created and you will be redirected to "Manage site" page for this site.
On the row "Install template" click "Select" link to the right to select site template. Site template is a predefined set of modules. Select "Jabba" template (currently - the only one).
After returning to "Manage site" page, click "Install" to install the site using template "Jabba" - a list of all modules and their parameters will be shown. Follow the instructions on the page.
You will have to set at least following parameters:
- tangra-lib-path - path to tangra_lib. You may use path to your copy of tangra_lib in tangra2 directory. Example: /var/www/sites/tangra2/tangra_lib/
- smarty - path to smarty lib. Examples: /var/www/inc/smarty/; /var/www/inc/Smarty-2.6.14
- adodb - path to ADOdb lib. Examples: /var/www/inc/adodb; /var/www/inc/adodb5
- zendframework - path to Zend Framework. Example: /var/www/inc/zendframework/
You may set these paths to point to libs inside tcc/ext_inc directory but generally that is not good idea. Best solution is to download these libs (Smarty, ADOdb, Zend Framework) and extract them in a directory that will be common for all of your TF applications. Example: /var/www/inc.
- admin-dsn - DSN with privileged DB access. You will need to create db/schema for your new site. admin-dsn have to be able to create tables in your new db.
- db-dsn
- session-dsn
Above two DSNs have to contain the normal DB account to your database/schema, i.e. with just SELECT, INSERT, UPDATE, DELETE privileges.
After filling all missing parameters click on "Install" link and on the next page click "Install" button. Installation will start.
Open a browser and point it to hostname that you configured when created the VirtualHost.
You should see:
Installation successful (module ws_jabba_sample)
You are seeing this because you still did not replaced default template after installation.

