Configure sinedoncfg shared » History » Version 13
Anchi Cheng, 06/06/2012 05:30 PM
1 | 1 | Anchi Cheng | h1. Configure sinedon.cfg |
---|---|---|---|
2 | |||
3 | 12 | Anchi Cheng | Sinedon is an object relational mapping library designed to interact with the Leginon and Appion databases. |
4 | |||
5 | 10 | Amber Herold | For older versions of Appion and Leginon (pre-2.2), please use the following instructions: |
6 | [[configure_sinedoncfg_2_1|Instructions for Appion and Leginon versions prior to 2.2]] |
||
7 | |||
8 | h2. The order in which Leginon/Appion looks for sinedon.cfg |
||
9 | |||
10 | # individual user home directory |
||
11 | # $PYTHONSITEPKG/sinedon |
||
12 | |
||
13 | Note: You can discover the $PYTHONSITEPKG path by starting python: |
||
14 | <pre> |
||
15 | python |
||
16 | import sys |
||
17 | sys.path |
||
18 | </pre> |
||
19 | The first path to site-packages should hold the config file. |
||
20 | 1 | Anchi Cheng | |
21 | 13 | Anchi Cheng | # /etc/myami on Linux or a global configuration directory on C drive following standard on Windows |
22 | 11 | Amber Herold | |
23 | 12 | Anchi Cheng | Locate the search directories and the currently loaded cfg files by running the following python script in $PYTHONSITEPKG/leginon |
24 | 1 | Anchi Cheng | |
25 | 12 | Anchi Cheng | <pre> |
26 | configcheck.py |
||
27 | </pre> |
||
28 | 11 | Amber Herold | |
29 | 12 | Anchi Cheng | h2. Create a sinedon.cfg for all users |
30 | 7 | Amber Herold | |
31 | 1 | Anchi Cheng | * An example configuration file is available at: |
32 | myami/sinedon/examples/sinedon.cfg |
||
33 | 8 | Amber Herold | |
34 | * Configurations for all users should be placed at the following path: |
||
35 | 11 | Amber Herold | /etc/myami/sinedon.cfg |
36 | 1 | Anchi Cheng | |
37 | 5 | Anchi Cheng | * Modify sinedon.cfg to look like the following example. Set the host, [[Explanation of Sample Names|db, user, and passwd to match the databases created during your Database Server setup]]. Note that the user here is the MySQL user Leginon uses to communicate with the database for all Leginon users. For an Appion or Leginon installation that uses Project database, set the following: |
38 | 1 | Anchi Cheng | <pre> |
39 | [global] |
||
40 | #host: your_database_host |
||
41 | host: localhost |
||
42 | user: usr_object |
||
43 | passwd: |
||
44 | |||
45 | [projectdata] |
||
46 | db: projectdb |
||
47 | |||
48 | [leginondata] |
||
49 | db: leginondb |
||
50 | </pre> |
||
51 | 6 | Amber Herold | |
52 | *Note:* If you are a developer, and you need to use sinedon.cfg settings that are different from the global settings, you may create your own sinedon.cfg file and place it in your home directory. This version will override the global version located in the site packages directory. |