Edgewall Software

TracOnRedhat: Installing Trac On Red Hat 9.txt

File Installing Trac On Red Hat 9.txt, 10.4 KB (added by dragoncity99@…, 6 years ago)

Sorry, I forgot to add my original HOWTO HERE :p

Line 
1Installing Trac 0.8.4 on Red Hat Linux 9
2
3================================
41. Packages Needed & Preparation
5================================
6The following are the packages needed to install Trac 0.8.4 successfuly:
7a. clearsilver-0.9.3.tar.gz
8b. httpd-2.0.52.tar.bz2
9c. pysqlite-1.0.1.tar.gz
10d. Python-2.3.5.tar.bz2
11e. SilverCity-0.9.5.tar.gz
12f. sqlite-2.8.16.tar.gz
13g. subversion-1.1.0.tar.gz
14h. swig-1.3.21.tar.gz
15i. trac-0.8.4.tar.gz
16
17Notes: You need Python-2.3.5 because the version in Red Hat Linux 9 is Python-2.2.2-26
18After obtaining the packages, put all the packages in /usr/local/RH9 directory
19(You need to create RH9 directory yourself)
20
21You must add the following line to the "/etc/ld.so.conf" file:
22/usr/local/lib
23
24
25====================
262. Installing Python
27====================
28a. cd /usr/local/RH9
29b. tar xjf Python-2.3.5.tar.bz2
30c. cd Python-2.3.5;./configure;make;make install
31d. /sbin/ldconfig
32
33
34====================
353. Installing Httpd
36====================
37a. cd /usr/local/RH9
38b. tar xjf httpd-2.0.52.tar.bz2
39c. cd httpd-2.0.52;./configure;make;make install
40d. /sbin/ldconfig
41
42====================
434. Installing Swig
44====================
45a. cd /usr/local/RH9
46b. tar xzf swig-1.3.21.tar.gz
47c. cd SWIG-1.3.21;./configure --with-python=/usr/local/bin/python;make;make install
48d. make -k runtime;make install-runtime
49e. /sbin/ldconfig
50
51
52========================
535. Installing Subversion
54========================
55a. cd /usr/local/RH9
56b. tar xzf subversion-1.1.0.tar.gz
57c. cd subversion-1.1.0;./configure --disable-mod-activation --enable-swig-bindings=python --with-apr=/usr/local/apache2/bin/apr-config --with-apr-util=/usr/local/apache2/bin/apu-config  --with-apxs=/usr/local/apache2/bin/apxs --without-berkeley-db --with-zlib --with-swig=/usr/local
58d. Edit ur Makefile to point PYTHON and -I/usr/include/Python2.2 path to the your installed "python"
59e. make;make install
60f. make swig-py;make install-swig-py
61g. /sbin/ldconfig
62
63
64=====================
656. Installing SqlLite
66=====================
67a. cd /usr/local/RH9
68b. tar xzf sqlite-2.8.16.tar.gz
69c. cd sqlite-2.8.16;./configure;make;make install
70d. /sbin/ldconfig
71
72
73========================
747. Installing SilverCity
75========================
76a. cd /usr/local/RH9
77b. tar xzf SilverCity-0.9.5.tar.gz
78c. cd SilverCity-0.9.5;python setup.py build;python setup.py install
79d. /sbin/ldconfig
80
81
82=========================
838. Installing ClearSilver
84=========================
85a. cd /usr/local/RH9
86b. tar xzf clearsilver-0.9.3.tar.gz
87c. cd clearsilver-0.9.3;./configure  --with-python=/usr/local/bin/python --with-apache=/usr/local/apache2;make;make install
88d. /sbin/ldconfig
89
90
91=======================
929. Installing PySqlLite
93=======================
94a. cd /usr/local/RH9
95b. tar xzf pysqlite-1.0.1.tar.gz
96c. cd pysqlite;python setup.py build; python setup.py install
97d. /sbin/ldconfig
98
99
100==================
1019. Installing Trac
102==================
103a. cd /usr/local/RH9
104b. tar xzf trac-0.8.4.tar.gz
105c. cd trac-0.8.4;python setup.py build;python setup.py install
106d. /sbin/ldconfig
107
108
109===========================
11010. Finalizing Installation
111===========================
112Create symbolic link for libsvn library to the python2.3 library:
113a. cd /usr/local/lib/python2.3/site-packages
114b. ln -s /usr/local/lib/svn-python svn-python
115c. ln -s /usr/local/lib/svn-python/svn svn
116d. ln -s /usr/local/lib/svn-python/libsvn libsvn
117e. /sbin/ldconfig
118Create the svn project environment:
119f. svnadmin create --fs-type=fsfs /var/svn
120Create the trac project environment:
121g. trac-admin /var/svn/trac_project_env initenv
122h. You will see the following message below and follow what my options showed:
123/usr/local/lib/python2.3/site-packages/libsvn/core.py:5: RuntimeWarning: Python C API version mismatch for module _core: This Python has API version 1012, module _core has version 1011.
124  import _core
125/usr/local/lib/python2.3/site-packages/libsvn/fs.py:5: RuntimeWarning: Python C API version mismatch for module _fs: This Python has API version 1012, module _fs has version 1011.
126  import _fs
127/usr/local/lib/python2.3/site-packages/libsvn/delta.py:5: RuntimeWarning: Python C API version mismatch for module _delta: This Python has API version 1012, module _delta has version 1011.
128  import _delta
129/usr/local/lib/python2.3/site-packages/libsvn/repos.py:5: RuntimeWarning: Python C API version mismatch for module _repos: This Python has API version 1012, module _repos has version 1011.
130  import _repos
131Creating a new Trac environment at /var/svn/trac_project_env
132
133Trac will first ask a few questions about your environment
134in order to initalize and prepare the project database.
135
136 Please enter the name of your project.
137 This name will be used in page titles and descriptions.
138
139Project Name [My Project]>
140
141 Please specify the absolute path to the project Subversion repository.
142 Repository must be local, and trac-admin requires read+write
143 permission to initialize the Trac database.
144
145Path to repository [/var/svn/test]> /var/svn
146
147 Please enter location of Trac page templates.
148 Default is the location of the site-wide templates installed with Trac.
149
150Templates directory [/usr/local/share/trac/templates]>
151Creating and Initializing Project
152 Inserting default data
153 Configuring Project
154  trac.repository_dir
155  trac.templates_dir
156  project.name
157 Installing wiki pages
158 /usr/local/share/trac/wiki-default/CamelCase => CamelCase
159 /usr/local/share/trac/wiki-default/RecentChanges => RecentChanges
160 /usr/local/share/trac/wiki-default/SandBox => SandBox
161 /usr/local/share/trac/wiki-default/TitleIndex => TitleIndex
162 /usr/local/share/trac/wiki-default/TracAccessibility => TracAccessibility
163 /usr/local/share/trac/wiki-default/TracAdmin => TracAdmin
164 /usr/local/share/trac/wiki-default/TracBackup => TracBackup
165 /usr/local/share/trac/wiki-default/TracBrowser => TracBrowser
166 /usr/local/share/trac/wiki-default/TracChangeset => TracChangeset
167 /usr/local/share/trac/wiki-default/TracEnvironment => TracEnvironment
168 /usr/local/share/trac/wiki-default/TracGuide => TracGuide
169 /usr/local/share/trac/wiki-default/TracImport => TracImport
170 /usr/local/share/trac/wiki-default/TracIni => TracIni
171 /usr/local/share/trac/wiki-default/TracInstall => TracInstall
172 /usr/local/share/trac/wiki-default/TracInstallPlatforms => TracInstallPlatforms
173 /usr/local/share/trac/wiki-default/TracLinks => TracLinks
174 /usr/local/share/trac/wiki-default/TracLogging => TracLogging
175 /usr/local/share/trac/wiki-default/TracModPython => TracModPython
176 /usr/local/share/trac/wiki-default/TracMultipleProjects => TracMultipleProjects
177 /usr/local/share/trac/wiki-default/TracNotification => TracNotification
178 /usr/local/share/trac/wiki-default/TracPermissions => TracPermissions
179 /usr/local/share/trac/wiki-default/TracQuery => TracQuery
180 /usr/local/share/trac/wiki-default/TracReports => TracReports
181 /usr/local/share/trac/wiki-default/TracRoadmap => TracRoadmap
182 /usr/local/share/trac/wiki-default/TracRss => TracRss
183 /usr/local/share/trac/wiki-default/TracSearch => TracSearch
184 /usr/local/share/trac/wiki-default/TracStandalone => TracStandalone
185 /usr/local/share/trac/wiki-default/TracSupport => TracSupport
186 /usr/local/share/trac/wiki-default/TracSyntaxColoring => TracSyntaxColoring
187 /usr/local/share/trac/wiki-default/TracTickets => TracTickets
188 /usr/local/share/trac/wiki-default/TracTicketsCustomFields => TracTicketsCustomFields
189 /usr/local/share/trac/wiki-default/TracTimeline => TracTimeline
190 /usr/local/share/trac/wiki-default/TracUnicode => TracUnicode
191 /usr/local/share/trac/wiki-default/TracUpgrade => TracUpgrade
192 /usr/local/share/trac/wiki-default/TracWiki => TracWiki
193 /usr/local/share/trac/wiki-default/WikiFormatting => WikiFormatting
194 /usr/local/share/trac/wiki-default/WikiHtml => WikiHtml
195 /usr/local/share/trac/wiki-default/WikiMacros => WikiMacros
196 /usr/local/share/trac/wiki-default/WikiNewPage => WikiNewPage
197 /usr/local/share/trac/wiki-default/WikiPageNames => WikiPageNames
198 /usr/local/share/trac/wiki-default/WikiProcessors => WikiProcessors
199 /usr/local/share/trac/wiki-default/WikiRestructuredText => WikiRestructuredText
200 /usr/local/share/trac/wiki-default/WikiRestructuredTextLinks => WikiRestructuredTextLinks
201 /usr/local/share/trac/wiki-default/WikiStart => WikiStart
202 Indexing repository
203---------------------------------------------------------------------
204
205Project database for 'My Project' created.
206
207 Customize settings for your project using the command:
208
209   trac-admin /var/svn/trac_project_env
210
211 Don't forget, you also need to copy (or symlink) "trac/cgi-bin/trac.cgi"
212 to you web server's /cgi-bin/ directory, and then configure the server.
213
214 If you're using Apache, this config example snippet might be helpful:
215
216    Alias /trac "/wherever/you/installed/trac/htdocs/"
217    <Location "/cgi-bin/trac.cgi">
218        SetEnv TRAC_ENV "/var/svn/trac_project_env"
219    </Location>
220
221    # You need something like this to authenticate users
222    <Location "/cgi-bin/trac.cgi/login">
223        AuthType Basic
224        AuthName "My Project"
225        AuthUserFile /somewhere/trac.htpasswd
226        Require valid-user
227    </Location>
228
229 The latest documentation can also always be found on the project website:
230 http://projects.edgewall.com/trac/
231
232Congratulations!
233
234
235=====================
23611. Configuring Httpd
237=====================
238a. Add the following section into your "/usr/local/apache/conf/httpd.conf" file:
239
240Alias /trac "/usr/share/trac/htdocs/"
241<Location "/cgi-bin/trac.cgi">
242   SetEnv TRAC_ENV "/var/svn/trac_project_env"
243</Location>
244
245# You need something like this to authenticate users
246<Location "/cgi-bin/trac.cgi/login">
247   AuthType Basic
248   AuthName "My Project"
249   AuthUserFile /var/svn/trac.htpasswd
250   Require valid-user
251</Location>
252
253b. Create the "trac.htpasswd" file:
254  cd /var/svn;/usr/local/apache2/bin/htpasswd -c trac.htpasswd admin
255  (You can add more users by using: cd /var/svn;/usr/local/apache2/bin/htpasswd -c trac.htpasswd username)
256
257c. Change the privilege of the "trac_project_env" so httpd can perform r/w on trac.db:
258   chmod -Rv a+rw /var/svn/trac_project_env
259
260d. Copy "trac.cgi" file to "/usr/local/apache2/cgi-bin" directory:
261   cd /usr/local/apache2/cgi-bin;cp /usr/local/share/trac/cgi-bin/trac.cgi .
262
263=====================
26412. Congratulations :)
265=====================
266a. Run your httpd server:
267   /usr/local/apache2/bin/httpd
268
269b. Open your web browser and type the following address:
270   your-ip-address/cgi-bin/trac.cgi