Edgewall Software

TracOnRedhat9HomeDir: Installing Trac On Red Hat 9 Home.2.txt

File Installing Trac On Red Hat 9 Home.2.txt, 10.8 KB (added by dragoncity99@…, 3 years ago)

My original text on this howto

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