Difference between revisions of "Henriette"
(→MySQL) |
(→Sintana_ark) |
||
(26 intermediate revisions by the same user not shown) | |||
Line 12: | Line 12: | ||
#Download MySQL from [http://dev.mysql.com/downloads/mysql http://dev.mysql.com/downloads/mysql] | #Download MySQL from [http://dev.mysql.com/downloads/mysql http://dev.mysql.com/downloads/mysql] | ||
#Install to c:\program files | #Install to c:\program files | ||
− | #Configure to run: server machine | + | #Configure to run: |
+ | ##server machine | ||
+ | ##multifunctional DB | ||
+ | ##C: as installation path | ||
+ | ##online transaction processing (oltp) | ||
+ | ##enable tcp/ip networking on 3306 port | ||
+ | ##enable strict mode | ||
+ | ##multilanguage utf-8 | ||
+ | ##install as a windows service | ||
+ | ##include bin directory | ||
+ | ##set root passwork | ||
+ | ##enable access from remote machines. | ||
#Security considerations with mysql. | #Security considerations with mysql. | ||
− | + | ##You might need to allow port 3306 as an exeption through the firewall settings in windows for it to work. | |
− | + | ##You might also want to change the root user and password for security reasons. | |
#Download [http://www.phpmyadmin.net/home_page/downloads.php phpmyadmin] - the english version or multilanguage if you wish. | #Download [http://www.phpmyadmin.net/home_page/downloads.php phpmyadmin] - the english version or multilanguage if you wish. | ||
− | #Extract the zip folder to C:\ms4w\Apache\htdocs and maybe further into a folder system only you know for security reasons. | + | #Extract the zip folder to C:\ms4w\Apache\htdocs and maybe further into a folder system only you know for security reasons and rename the folder to just phpmyadmin without all the version numbers. |
+ | #To configure phpmyadmin copy the file config.sample.inc.php and rename the copy to config.inc.php and leave in the main phpmyadmin folder. | ||
+ | ##Change the mysql database settings like host and stuff | ||
+ | ##Add a blowfish secret - can be anything or just 'herfjke' | ||
+ | ##And go to the phpmyadmin page in your browser http://localhost:8080/your_secret_foldersystem/phpmyadmin/ and login | ||
==ARK== | ==ARK== | ||
+ | ===Setup and settings files=== | ||
+ | This is all asuming that you are using the ms4w in windows as I know nothing of mac and such likes | ||
+ | #Get the newest version of the ARK code and pop it into the project folder. The ARK code for each project has been placed into the file directory of the ms4w\Apache\htdocs root folder under the relevant folder structure (in this case portus_ark which is located in C:\ms4w\Apache\htdocs\projects\portus_ark). | ||
+ | #Create a new database in mysql called portus_ark and import the ark database into here. | ||
+ | #Configure portus_ark\config\env_settings.php | ||
+ | ## Set $doc_root = 'C:\ms4w\Apache\htdocs'; | ||
+ | ## Set $pear_path = ";C:\ms4w\Apache\php\PEAR"; which is where the PEAR library is likely to be. Remember to get the whole pear library. | ||
+ | ## Set $ark_server_path = 'C:\ms4w\Apache\htdocs\projects\portus_ark'; This is the path to the project folder where all the ark code and index.php is situated. | ||
+ | #Configure portus_ark\config\settings.php | ||
+ | ##$ark_name = 'Portus'; - the name you choose to give your project | ||
+ | ##$ark_dir = '/projects/portus_ark/'; The online directory of your project | ||
+ | ##$loaded_modules = array( 'cxt','sph'); The array of modules that you end up having and using in your project | ||
+ | ##$default_itemkey = 'cxt_cd'; The main itemkey of you project e.i. the most important module in the project (in this case contexts) | ||
+ | ##Database setup - to access mysql | ||
+ | ###$ark_db = 'portus_ark'; Database name | ||
+ | ###$sql_server = 'localhost'; Will prob always be the same | ||
+ | ###$sql_user = 'root'; Is originally root or which ever username you choose to give it | ||
+ | ###$sql_pwd = 'your password'; | ||
+ | ##$default_year = '2007'; | ||
+ | ##$default_site_cd = 'PORT07'; Your special site code which will be placed in front of all module key values. | ||
+ | ##Mapping settings - is related to the clarent setup later - you don't need to change these settings now but can wait untill you setup the other spatial stuff. | ||
+ | ###$ark_mapdata_dir = $doc_root.$ark_dir.'data/mapping/'; - the directory you create for all your mapping files | ||
+ | ###$default_base_map = $doc_root.$ark_dir.'mapserver/mapfiles/portus.map'; Your default base mapfile - see setup later of clarent and mapfile | ||
+ | ###$spat_mods = array('cxt', 'sfi'); The modules that have geometry attached | ||
+ | ###$loaded_map_mods = array( 'cor', 'cxt', 'sfi'); The modules to load in the map | ||
+ | ##$default_lang = 'en'; | ||
+ | ##It is also in the settings file that you setup the left panels for microview and data entry: | ||
+ | ###$data_entry_left_panel[] = array('href' => "{$_SERVER['PHP_SELF']}?view=regist&item_key=cxt_cd", 'text' => 'Context Register'); Copy this and change for each bit the item_key and view and text. The view can be regist (register), detfrm (data entry form) or something else refering to an optional view (e.g. materi). | ||
+ | ###$micro_view_left_panel[] = array('href' => "{$_SERVER['PHP_SELF']}?item_key=cxt_cd", 'text' => 'View Context'); For the microview you only need to change the text and the item_key. | ||
− | The | + | ===Module setup=== |
+ | When you want to create a new module you should have a good think about weather it is infact something which needs a module for itself or if it could be a module type of another module. For example a bit of special ceramic and peice of metal don't need to have each their module as they are both really the same thing and can both be a type of the module 'special finds'. In this example I will setup a new module for special finds (in short form sfi) with a couple of different module types (modtypes) like ceramics, marble and metal. | ||
+ | |||
+ | In all the stuff we are creating now everytime it says 'sfi' this must be changed to your unique module short form | ||
+ | ====Module in database==== | ||
+ | #In the database (portus_ark) create a new table called '''sfi_tbl_sfi''' with the fields. This table will be fileld automatically with all the instances of the module | ||
+ | ##''sfi''_cd - varchar(30) | ||
+ | ##''sfi''_no - int(10) | ||
+ | ##ste_cd - varchar(10) | ||
+ | ##modtype - int(3) - is optional and only needed if the module is going to have modtypes like this one | ||
+ | ##cre_by - int(4) | ||
+ | ##cre_on - datetime | ||
+ | #If using modtypes you also need to create this next table which we will call '''sfi_lut_sfitype''' - in this table you must also each module type. | ||
+ | ##id - int(11) - Will fill in automatically | ||
+ | ##''sfi''_type - varchar(255) - e.g. ceramics, metal or marble | ||
+ | ##cre_by - int(11) - Fill in your number | ||
+ | ##cre_on - datetime - Can set to NOW | ||
+ | #Now go to '''cor_tbl_module''' and setup your new module | ||
+ | ##id = automatically | ||
+ | ##itemkey = ''sfi''_cd | ||
+ | ##name = mod_''sfi'' | ||
+ | ##shortform = ''sfi'' | ||
+ | ##description = The special finds module | ||
+ | ##cre_by = 1 (or your number) | ||
+ | ##cre_on = NOW | ||
+ | #Again if using modtypes go to '''cor_tbl_col''' and enter this | ||
+ | ##id = automatically | ||
+ | ##dbname = sfitype | ||
+ | ##description = types of special finds | ||
+ | ##cre_by = 1 (or your number) | ||
+ | ##cre_on = NOW | ||
+ | #Last but not least you must go to '''cor_tbl_alias''' and enter the aliases for your types, module and the module type. | ||
+ | ##id = automatically | ||
+ | ##alias = Special finds | ||
+ | ##aliastype = 1 (1 is normal) | ||
+ | ##language = en ( for english) | ||
+ | ##itemkey = sfi_lut_sfitype, cor_tbl_module or cor_tbl_col | ||
+ | ##itemvalue = the id number of the item in the original table. For examle if the module sfi is listed as id=5 in tbl_cor_module the itemkey is tbl_cor_module and the itemvalue is 5. | ||
+ | ##cre_by = 1 (or your number) | ||
+ | ##cre_on = NOW | ||
+ | If you wish to have aliases in other languages you must create first the original alias (i.e. the english one) and then create a new alias instance with the same itemkey and itemvalue as the first but with a different language (e.g. it for italian). | ||
+ | |||
+ | ====Module settings file==== | ||
+ | |||
+ | Create a copy of the example module settings file and call it mod_sfi_settings.php and begin with changing all the module shortforms for the module set in the example file to sfi. Don't change all the module shortforms you see - they might be for links and stuff with other modules. | ||
+ | |||
+ | The settings file begins with some custom fields settings. Normally all field setting sshould go to the field_settings.php file from where they can all be reused in other modules. However a few are very module specific and should be set in the modules own settings file. | ||
+ | $conf_field_itemkey = | ||
+ | array( | ||
+ | 'dataclass' => 'itemkey', | ||
+ | 'classtype' => 'sfi_cd', //this is needed to correctly request the qtype | ||
+ | 'alias_tbl' => 'cor_tbl_module', | ||
+ | 'alias_col' => 'itemkey', | ||
+ | 'alias_src_key' => 'sfi_cd', | ||
+ | 'alias_type' => '1', | ||
+ | 'module' => 'sfi', | ||
+ | 'editable' => TRUE, | ||
+ | 'hidden' => FALSE, | ||
+ | 'add_validation' => $key_add_validation, | ||
+ | 'edt_validation' => $key_edt_validation | ||
+ | ); | ||
+ | |||
+ | The itemkey field allows you to access the alias and information about the module itself. | ||
+ | $conf_field_cxtxmi = | ||
+ | array( | ||
+ | 'dataclass' => 'xmi', | ||
+ | 'classtype' => 'xmi_list', | ||
+ | 'alias_tbl' => 'cor_tbl_module', | ||
+ | 'alias_col' => 'itemkey', | ||
+ | 'alias_src_key' => 'cxt_cd', | ||
+ | 'alias_type' => '1', | ||
+ | 'module' => 'sfi', | ||
+ | 'op_xmi_mod' => 'cxt', | ||
+ | 'op_xmi_itemkey' => 'cxt_cd', | ||
+ | 'editable' => TRUE, | ||
+ | 'hidden' => FALSE, | ||
+ | 'add_validation' => $xmi_add_validation, | ||
+ | 'edt_validation' => $xmi_edt_validation | ||
+ | ); | ||
+ | The xmi fields allows for the links between the different modules. | ||
+ | |||
+ | ==Clarent== | ||
+ | |||
+ | #Create a new database in mysql for clarent - I called my ark database portus_ark and the clarent database for portus i called portus_clarent. | ||
+ | #Import the clarent database | ||
+ | #Create a datafolder into the project folder: portus_ark\data\mapping where you want to put the maps and other data for the project. | ||
+ | #Create a mapfile and put it into portus_ark\mapserver\mapfiles - see more on mapfiles later. The mapfile is only used for the clarent main map while the smaller maps attached to the modules use map settings in the ark database. | ||
+ | #In portus_ark\clarent\06\clarent\settings.php | ||
+ | ##Change all directories to fit the new project | ||
+ | ##Point clarent default map to your new mapfile | ||
+ | ##Change DB settings and point to your new clarent DB portus_clarent | ||
+ | ##Set mapextent to the same as in the mapfile | ||
==Different servers== | ==Different servers== | ||
Line 34: | Line 169: | ||
=Sintana_ark= | =Sintana_ark= | ||
+ | |||
+ | *txttypes | ||
+ | **placename - 74 | ||
+ | **production - 75 | ||
+ | **period - 45 | ||
+ | **construction - 76 | ||
+ | **condition - 62 | ||
+ | **colour - 5 | ||
+ | **glasstype - 77 | ||
+ | **nasmantype - 78 | ||
+ | **eggerstype - 79 | ||
+ | **straumetype - 80 | ||
+ | **bibtitle - 88 | ||
+ | **bibtown - 87 | ||
+ | **bibseries - 86 | ||
+ | **journaltitle - 85 | ||
+ | **journalnr - 84 | ||
+ | **journalpages - 83 | ||
+ | **authorln - 81 | ||
+ | **authorfn - 82 | ||
+ | *numbertypes | ||
+ | **rouendfac - 1 | ||
+ | **ovalfac - 2 | ||
+ | **height - 3 | ||
+ | **rimdia - 4 | ||
+ | *sintypes | ||
+ | **glass - 7 | ||
+ | **glassproduction - 8 | ||
+ | **bowl - 9 | ||
+ | *actiontypes | ||
+ | **regto - 12 | ||
+ | *datetypes | ||
+ | **regon - 10 | ||
+ | **bibyear - 8 |
Latest revision as of 10:39, 9 August 2007
Contents
Setup
ms4w
This service has been installed on all the servers and the directory structure in the ms4w\Apache\htdocs folder is either 'projects' or 'students'. The 'students' folder is divided into the different students user names and the 'projects' folder is divided into the project names. From this follows that the portus project code is all in ms4w\Apache\htdocs\projects\portus_ark and my own sintana project is in ms4w\Apache\htdocs\students\hro106\sintana.
When setting up ms4w I have changed the LISTEN setting in ms4w\Apache\conf\httpd.conf from 80 to 8080 since most of the servers already had some other service running on 80. This means that the root of the server can be reached from http://localhost:8080 or the equivalent. So for the ay-dehus server the address is http://ay-dehus.soton.ac.uk:8080/ and then the folders which lead to the projects and the ark code.
MySQL
- Download MySQL from http://dev.mysql.com/downloads/mysql
- Install to c:\program files
- Configure to run:
- server machine
- multifunctional DB
- C: as installation path
- online transaction processing (oltp)
- enable tcp/ip networking on 3306 port
- enable strict mode
- multilanguage utf-8
- install as a windows service
- include bin directory
- set root passwork
- enable access from remote machines.
- Security considerations with mysql.
- You might need to allow port 3306 as an exeption through the firewall settings in windows for it to work.
- You might also want to change the root user and password for security reasons.
- Download phpmyadmin - the english version or multilanguage if you wish.
- Extract the zip folder to C:\ms4w\Apache\htdocs and maybe further into a folder system only you know for security reasons and rename the folder to just phpmyadmin without all the version numbers.
- To configure phpmyadmin copy the file config.sample.inc.php and rename the copy to config.inc.php and leave in the main phpmyadmin folder.
- Change the mysql database settings like host and stuff
- Add a blowfish secret - can be anything or just 'herfjke'
- And go to the phpmyadmin page in your browser http://localhost:8080/your_secret_foldersystem/phpmyadmin/ and login
ARK
Setup and settings files
This is all asuming that you are using the ms4w in windows as I know nothing of mac and such likes
- Get the newest version of the ARK code and pop it into the project folder. The ARK code for each project has been placed into the file directory of the ms4w\Apache\htdocs root folder under the relevant folder structure (in this case portus_ark which is located in C:\ms4w\Apache\htdocs\projects\portus_ark).
- Create a new database in mysql called portus_ark and import the ark database into here.
- Configure portus_ark\config\env_settings.php
- Set $doc_root = 'C:\ms4w\Apache\htdocs';
- Set $pear_path = ";C:\ms4w\Apache\php\PEAR"; which is where the PEAR library is likely to be. Remember to get the whole pear library.
- Set $ark_server_path = 'C:\ms4w\Apache\htdocs\projects\portus_ark'; This is the path to the project folder where all the ark code and index.php is situated.
- Configure portus_ark\config\settings.php
- $ark_name = 'Portus'; - the name you choose to give your project
- $ark_dir = '/projects/portus_ark/'; The online directory of your project
- $loaded_modules = array( 'cxt','sph'); The array of modules that you end up having and using in your project
- $default_itemkey = 'cxt_cd'; The main itemkey of you project e.i. the most important module in the project (in this case contexts)
- Database setup - to access mysql
- $ark_db = 'portus_ark'; Database name
- $sql_server = 'localhost'; Will prob always be the same
- $sql_user = 'root'; Is originally root or which ever username you choose to give it
- $sql_pwd = 'your password';
- $default_year = '2007';
- $default_site_cd = 'PORT07'; Your special site code which will be placed in front of all module key values.
- Mapping settings - is related to the clarent setup later - you don't need to change these settings now but can wait untill you setup the other spatial stuff.
- $ark_mapdata_dir = $doc_root.$ark_dir.'data/mapping/'; - the directory you create for all your mapping files
- $default_base_map = $doc_root.$ark_dir.'mapserver/mapfiles/portus.map'; Your default base mapfile - see setup later of clarent and mapfile
- $spat_mods = array('cxt', 'sfi'); The modules that have geometry attached
- $loaded_map_mods = array( 'cor', 'cxt', 'sfi'); The modules to load in the map
- $default_lang = 'en';
- It is also in the settings file that you setup the left panels for microview and data entry:
- $data_entry_left_panel[] = array('href' => "{$_SERVER['PHP_SELF']}?view=regist&item_key=cxt_cd", 'text' => 'Context Register'); Copy this and change for each bit the item_key and view and text. The view can be regist (register), detfrm (data entry form) or something else refering to an optional view (e.g. materi).
- $micro_view_left_panel[] = array('href' => "{$_SERVER['PHP_SELF']}?item_key=cxt_cd", 'text' => 'View Context'); For the microview you only need to change the text and the item_key.
Module setup
When you want to create a new module you should have a good think about weather it is infact something which needs a module for itself or if it could be a module type of another module. For example a bit of special ceramic and peice of metal don't need to have each their module as they are both really the same thing and can both be a type of the module 'special finds'. In this example I will setup a new module for special finds (in short form sfi) with a couple of different module types (modtypes) like ceramics, marble and metal.
In all the stuff we are creating now everytime it says 'sfi' this must be changed to your unique module short form
Module in database
- In the database (portus_ark) create a new table called sfi_tbl_sfi with the fields. This table will be fileld automatically with all the instances of the module
- sfi_cd - varchar(30)
- sfi_no - int(10)
- ste_cd - varchar(10)
- modtype - int(3) - is optional and only needed if the module is going to have modtypes like this one
- cre_by - int(4)
- cre_on - datetime
- If using modtypes you also need to create this next table which we will call sfi_lut_sfitype - in this table you must also each module type.
- id - int(11) - Will fill in automatically
- sfi_type - varchar(255) - e.g. ceramics, metal or marble
- cre_by - int(11) - Fill in your number
- cre_on - datetime - Can set to NOW
- Now go to cor_tbl_module and setup your new module
- id = automatically
- itemkey = sfi_cd
- name = mod_sfi
- shortform = sfi
- description = The special finds module
- cre_by = 1 (or your number)
- cre_on = NOW
- Again if using modtypes go to cor_tbl_col and enter this
- id = automatically
- dbname = sfitype
- description = types of special finds
- cre_by = 1 (or your number)
- cre_on = NOW
- Last but not least you must go to cor_tbl_alias and enter the aliases for your types, module and the module type.
- id = automatically
- alias = Special finds
- aliastype = 1 (1 is normal)
- language = en ( for english)
- itemkey = sfi_lut_sfitype, cor_tbl_module or cor_tbl_col
- itemvalue = the id number of the item in the original table. For examle if the module sfi is listed as id=5 in tbl_cor_module the itemkey is tbl_cor_module and the itemvalue is 5.
- cre_by = 1 (or your number)
- cre_on = NOW
If you wish to have aliases in other languages you must create first the original alias (i.e. the english one) and then create a new alias instance with the same itemkey and itemvalue as the first but with a different language (e.g. it for italian).
Module settings file
Create a copy of the example module settings file and call it mod_sfi_settings.php and begin with changing all the module shortforms for the module set in the example file to sfi. Don't change all the module shortforms you see - they might be for links and stuff with other modules.
The settings file begins with some custom fields settings. Normally all field setting sshould go to the field_settings.php file from where they can all be reused in other modules. However a few are very module specific and should be set in the modules own settings file.
$conf_field_itemkey = array( 'dataclass' => 'itemkey', 'classtype' => 'sfi_cd', //this is needed to correctly request the qtype 'alias_tbl' => 'cor_tbl_module', 'alias_col' => 'itemkey', 'alias_src_key' => 'sfi_cd', 'alias_type' => '1', 'module' => 'sfi', 'editable' => TRUE, 'hidden' => FALSE, 'add_validation' => $key_add_validation, 'edt_validation' => $key_edt_validation );
The itemkey field allows you to access the alias and information about the module itself.
$conf_field_cxtxmi = array( 'dataclass' => 'xmi', 'classtype' => 'xmi_list', 'alias_tbl' => 'cor_tbl_module', 'alias_col' => 'itemkey', 'alias_src_key' => 'cxt_cd', 'alias_type' => '1', 'module' => 'sfi', 'op_xmi_mod' => 'cxt', 'op_xmi_itemkey' => 'cxt_cd', 'editable' => TRUE, 'hidden' => FALSE, 'add_validation' => $xmi_add_validation, 'edt_validation' => $xmi_edt_validation );
The xmi fields allows for the links between the different modules.
Clarent
- Create a new database in mysql for clarent - I called my ark database portus_ark and the clarent database for portus i called portus_clarent.
- Import the clarent database
- Create a datafolder into the project folder: portus_ark\data\mapping where you want to put the maps and other data for the project.
- Create a mapfile and put it into portus_ark\mapserver\mapfiles - see more on mapfiles later. The mapfile is only used for the clarent main map while the smaller maps attached to the modules use map settings in the ark database.
- In portus_ark\clarent\06\clarent\settings.php
- Change all directories to fit the new project
- Point clarent default map to your new mapfile
- Change DB settings and point to your new clarent DB portus_clarent
- Set mapextent to the same as in the mapfile
Different servers
ay-dehus
ay-scribe
my laptop
Portus_ark
Sintana_ark
- txttypes
- placename - 74
- production - 75
- period - 45
- construction - 76
- condition - 62
- colour - 5
- glasstype - 77
- nasmantype - 78
- eggerstype - 79
- straumetype - 80
- bibtitle - 88
- bibtown - 87
- bibseries - 86
- journaltitle - 85
- journalnr - 84
- journalpages - 83
- authorln - 81
- authorfn - 82
- numbertypes
- rouendfac - 1
- ovalfac - 2
- height - 3
- rimdia - 4
- sintypes
- glass - 7
- glassproduction - 8
- bowl - 9
- actiontypes
- regto - 12
- datetypes
- regon - 10
- bibyear - 8