Installing Trac 0.8.4 on Red Hat Linux 9 (Specific User's Home Directory)
================================
1. Packages Needed & Preparation
================================
The following are the packages needed to install Trac 0.8.4 successfuly:
a. clearsilver-0.9.3.tar.gz
b. httpd-2.0.52.tar.bz2
c. pysqlite-1.0.1.tar.gz
d. Python-2.3.5.tar.bz2
e. SilverCity-0.9.5.tar.gz
f. sqlite-2.8.16.tar.gz
g. subversion-1.1.0.tar.gz
h. swig-1.3.21.tar.gz
i. trac-0.8.4.tar.gz
j. tcl8.3.5-src.tar.gz
Notes: You need Python-2.3.5 because the version in Red Hat Linux 9 is Python-2.2.2-26
After obtaining the packages, put all the packages in /home/trac/RH9 directory
(You need to create RH9 directory yourself and you must be root to perform the whole installation process)
Difference: The difference of this installation compared to the original version is that installation
were made on a user's home directory. Reasons I do this is because:
i. /usr/local is lack of space
ii. Testing the flexibility of the installation of the sources I collected if installed on other locationbs other than /usr/local
You must add the following line to the "/etc/ld.so.conf" file:
/home/trac/apache2/lib
/home/trac/lib
====================
2. Installing Httpd
====================
a. cd /home/trac/RH9
b. tar xjf httpd-2.0.52.tar.bz2
c. cd httpd-2.0.52;./configure;make;make install
d. /sbin/ldconfig
e. chmod a+rx /home/trac
====================
3. Installing Python
====================
a. cd /home/trac/RH9
b. tar xjf Python-2.3.5.tar.bz2
c. cd Python-2.3.5;./configure --prefix=/home/trac;make;make install
d. /sbin/ldconfig
====================
4. Installing TCL
====================
a. cd /home/trac/RH9
b. tar xzf tcl8.3.5-src.tar.gz
c. cd tcl8.3.5;./configure --prefix=/home/trac;make;make install
d. /sbin/ldconfig
====================
5. Installing Swig
====================
a. cd /home/trac/RH9
b. tar xzf swig-1.3.21.tar.gz
c. 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
d. make -k runtime;make install-runtime
e. /sbin/ldconfig
========================
6. Installing Subversion
========================
a. cd /home/trac/RH9
b. tar xzf subversion-1.1.0.tar.gz
c. 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
d. Edit ur Makefile to point PYTHON and -I/usr/include/Python2.2 path to the your installed "python"
e. make;make install
f. make swig-py;make install-swig-py
g. /sbin/ldconfig
=====================
7. Installing SqlLite
=====================
a. cd /home/trac/RH9
b. tar xzf sqlite-2.8.16.tar.gz
c. cd sqlite-2.8.16;./configure --prefix=/home/trac;make;make install
d. /sbin/ldconfig
========================
8. Installing SilverCity
========================
a. cd /home/richard/RH9
b. tar xzf SilverCity-0.9.5.tar.gz
c. cd SilverCity-0.9.5;python setup.py build;python setup.py install
d. /sbin/ldconfig
=========================
9. Installing ClearSilver
=========================
a. cd /home/trac/RH9
b. tar xzf clearsilver-0.9.3.tar.gz
c. cd clearsilver-0.9.3;./configure --prefix=/home/trac --with-python=/home/trac/bin/python --with-apache=/home/trac/apache2;make;make install
d. /sbin/ldconfig
=======================
10. Installing PySqlLite
=======================
a. cd /home/trac/RH9
b. tar xzf pysqlite-1.0.1.tar.gz
c. edit the file setup.py and change the following options
Line 14 --> include_dirs = ['/usr/include/sqlite'] ---> include_dirs = ['/home/trac/include']
Line 15 --> library_dirs = ['/usr/lib/'] ---> library_dirs = ['/home/trac/lib/']
d. cd pysqlite;python setup.py build; python setup.py install
e. /sbin/ldconfig
==================
11. Installing Trac
==================
a. cd /home/trac/RH9
b. tar xzf trac-0.8.4.tar.gz
c. cd trac-0.8.4;python setup.py build;python setup.py install
d. /sbin/ldconfig
===========================
12. Finalizing Installation
===========================
Create symbolic link for libsvn library to the python2.3 library:
a. cd /usr/local/lib/python2.3/site-packages
b. ln -s /home/trac/lib/svn-python svn-python
c. ln -s /home/trac/lib/svn-python/svn svn
d. ln -s /home/trac/lib/svn-python/libsvn libsvn
e. /sbin/ldconfig
Create the svn project environment:
f. /home/trac/bin/svnadmin create --fs-type=fsfs /home/trac/trac_fs
Create the trac project environment:
g. /home/trac/bin/trac-admin /home/trac/trac_fs/trac_project initenv
h. You will see the following message below and follow what my options showed:
Creating a new Trac environment at /home/trac/trac_fs/trac_project
Trac will first ask a few questions about your environment
in order to initalize and prepare the project database.
Please enter the name of your project.
This name will be used in page titles and descriptions.
Project Name [My Project]> Alltrix
Please specify the absolute path to the project Subversion repository.
Repository must be local, and trac-admin requires read+write
permission to initialize the Trac database.
Path to repository [/var/svn/test]> /home/trac/trac_fs
Please enter location of Trac page templates.
Default is the location of the site-wide templates installed with Trac.
Templates directory [/home/trac/share/trac/templates]>
Creating and Initializing Project
Inserting default data
Configuring Project
trac.repository_dir
trac.templates_dir
project.name
Installing wiki pages
/home/trac/share/trac/wiki-default/CamelCase => CamelCase
/home/trac/share/trac/wiki-default/RecentChanges => RecentChanges
/home/trac/share/trac/wiki-default/SandBox => SandBox
/home/trac/share/trac/wiki-default/TitleIndex => TitleIndex
/home/trac/share/trac/wiki-default/TracAccessibility => TracAccessibility
/home/trac/share/trac/wiki-default/TracAdmin => TracAdmin
/home/trac/share/trac/wiki-default/TracBackup => TracBackup
/home/trac/share/trac/wiki-default/TracBrowser => TracBrowser
/home/trac/share/trac/wiki-default/TracChangeset => TracChangeset
/home/trac/share/trac/wiki-default/TracEnvironment => TracEnvironment
/home/trac/share/trac/wiki-default/TracGuide => TracGuide
/home/trac/share/trac/wiki-default/TracImport => TracImport
/home/trac/share/trac/wiki-default/TracIni => TracIni
/home/trac/share/trac/wiki-default/TracInstall => TracInstall
/home/trac/share/trac/wiki-default/TracInstallPlatforms => TracInstallPlatforms
/home/trac/share/trac/wiki-default/TracLinks => TracLinks
/home/trac/share/trac/wiki-default/TracLogging => TracLogging
/home/trac/share/trac/wiki-default/TracModPython => TracModPython
/home/trac/share/trac/wiki-default/TracMultipleProjects => TracMultipleProjects
/home/trac/share/trac/wiki-default/TracNotification => TracNotification
/home/trac/share/trac/wiki-default/TracPermissions => TracPermissions
/home/trac/share/trac/wiki-default/TracQuery => TracQuery
/home/trac/share/trac/wiki-default/TracReports => TracReports
/home/trac/share/trac/wiki-default/TracRoadmap => TracRoadmap
/home/trac/share/trac/wiki-default/TracRss => TracRss
/home/trac/share/trac/wiki-default/TracSearch => TracSearch
/home/trac/share/trac/wiki-default/TracStandalone => TracStandalone
/home/trac/share/trac/wiki-default/TracSupport => TracSupport
/home/trac/share/trac/wiki-default/TracSyntaxColoring => TracSyntaxColoring
/home/trac/share/trac/wiki-default/TracTickets => TracTickets
/home/trac/share/trac/wiki-default/TracTicketsCustomFields => TracTicketsCustomFields
/home/trac/share/trac/wiki-default/TracTimeline => TracTimeline
/home/trac/share/trac/wiki-default/TracUnicode => TracUnicode
/home/trac/share/trac/wiki-default/TracUpgrade => TracUpgrade
/home/trac/share/trac/wiki-default/TracWiki => TracWiki
/home/trac/share/trac/wiki-default/WikiFormatting => WikiFormatting
/home/trac/share/trac/wiki-default/WikiHtml => WikiHtml
/home/trac/share/trac/wiki-default/WikiMacros => WikiMacros
/home/trac/share/trac/wiki-default/WikiNewPage => WikiNewPage
/home/trac/share/trac/wiki-default/WikiPageNames => WikiPageNames
/home/trac/share/trac/wiki-default/WikiProcessors => WikiProcessors
/home/trac/share/trac/wiki-default/WikiRestructuredText => WikiRestructuredText
/home/trac/share/trac/wiki-default/WikiRestructuredTextLinks => WikiRestructuredTextLinks
/home/trac/share/trac/wiki-default/WikiStart => WikiStart
Indexing repository
---------------------------------------------------------------------
Project database for 'Alltrix' created.
Customize settings for your project using the command:
trac-admin /home/trac/trac_fs/adms
Don't forget, you also need to copy (or symlink) "trac/cgi-bin/trac.cgi"
to you web server's /cgi-bin/ directory, and then configure the server.
If you're using Apache, this config example snippet might be helpful:
Alias /trac "/wherever/you/installed/trac/htdocs/"
SetEnv TRAC_ENV "/home/trac/trac_fs/adms"
# You need something like this to authenticate users
AuthType Basic
AuthName "Alltrix"
AuthUserFile /somewhere/trac.htpasswd
Require valid-user
The latest documentation can also always be found on the project website:
http://projects.edgewall.com/trac/
Congratulations!
=====================
13. Configuring Httpd
=====================
a. Add the following section into your "/home/trac/apache2/conf/httpd.conf" file:
Alias /trac "/home/trac/share/trac/htdocs/"
SetEnv TRAC_ENV "/home/trac/trac_fs/trac_project"
# You need something like this to authenticate users
AuthType Basic
AuthName "Alltrix"
AuthUserFile /home/trac/trac.htpasswd
Require valid-user
b. Create the "trac.htpasswd" file:
cd /home/trac;/home/trac/apache2/bin/htpasswd -c trac.htpasswd admin
(You can add more users by using: cd /home/trac/;/home/trac/apache2/bin/htpasswd -c trac.htpasswd username)
c. Change the privilege of the "trac_project_env" so httpd can perform r/w on trac.db:
chmod -Rv a+rw /home/trac/trac_fs
d. Copy "trac.cgi" file to "/home/trac/apache2/cgi-bin" directory:
cd /home/trac/apache2/cgi-bin;cp /home/trac/share/trac/cgi-bin/trac.cgi .
=====================
14. Congratulations :)
=====================
a. Run your httpd server as root:
/home/trac/apache2/bin/httpd
b. Open your web browser and type the following address:
your-ip-address/cgi-bin/trac.cgi