Agenda: en_trac_install.txt

File en_trac_install.txt, 2.5 KB (added by nocadmin, 9 years ago)

Install TRAC howto

Line 
1Guide for rapid creation of an instance of TRAC
2September 2010 - Mali AROC EN
3
4$ sudo bash
5(type your password)
6
7# hostname tldX.aroc
8(replace X with your number)
9
10# apt-get install apache2
11
12# apt-get install trac
13
14# apt-get install libapache2-mod-python
15
16We will make trac available on <http://10.10.10.X/trac>.
17
18* Create a trac directory to contain the project
19
20        # mkdir -p /var/www/trac
21        # chown www-data /var/www/trac
22        # chmod 775 /var/www/trac
23
24* Initialise the project
25
26        # trac-admin /var/www/trac initenv
27        (press enter on all questions)
28
29        # chown -R www-data /var/www/trac
30
31* Initialise the base user
32
33        # htpasswd -c /var/www/trac/.htpasswd tldadmin
34                (choose a password, enter it twice)
35        # chown -R www-data /var/www/trac
36
37
38
39* Update trac.ini (your site configuration)
40
41        # vi /var/www/trac/conf/trac.ini
42
43        (you can use vi or nano orÉ)
44
45        Edit in the order below
46
47        [header_logo]
48        alt = AROC EN Workshop Mali, TLD X
49        height = 52
50        link = http://10.10.10.X/trac/
51        src = site/some-logo.jpg
52        width = 422
53
54        [project]
55        descr = AROC EN Workshop Mali, TLD X
56        footer = AROC EN Workshop Mali, TLD X
57        name = AROC EN Workshop Mali, TLD X
58
59* Save and quit the editor
60
61* We need to change the user permissions. Copy/paste the following
62  commands, EACH ON ONE LINE!
63
64        # trac-admin /var/www/trac permission remove anonymous MILESTONE_VIEW REPORT_SQL_VIEW REPORT_VIEW ROADMAP_VIEW SEARCH_VIEW TICKET_VIEW TIMELINE_VIEW
65
66        # trac-admin /var/www/trac permission add authenticated MILESTONE_VIEW MILESTONE_MODIFY REPORT_SQL_VIEW REPORT_VIEW ROADMAP_VIEW SEARCH_VIEW TICKET_VIEW TIMELINE_VIEW
67
68* We now give access to the web administrator "tldadmin"
69
70        # trac-admin /var/www/trac permission add tldadmin TRAC_ADMIN
71        # trac-admin /var/www/trac upgrade
72
73* We tell Apache how to find the site
74
75        # vi /etc/apache2/conf.d/trac.conf
76
77        <Location /trac>
78                SetHandler mod_python
79                PythonHandler trac.web.modpython_frontend
80                PythonOption TracEnv /var/www/trac
81                PythonOption TracUriRoot /trac
82                SetEnv PYTHON_EGG_CACHE /var/www/trac/python-eggs
83
84                        AuthType Basic
85                        AuthName "AROC En TLD XXX"
86                        AuthUserFile /var/www/trac/.htpasswd
87                        Require valid-user
88        </Location>
89
90* Save and quit the editor
91
92* Done! Restart apache:
93
94        # /etc/init.d/apache2 restart
95
96* You can put a logo in JPG form and specify the file name in
97  conf/trac.ini
98
99* Try to go to http://10.10.10.X/trac
100  (log in as tldadmin)
101
102* Create a home page
103
104        For help with the wiki markup format:
105
106        http://10.10.10.X/trac/wiki/WikiFormatting
107