Edgewall Software

Version 14 (modified by patrick@…, 18 years ago) ( diff )

Added ClearSilver step d) to install python parts in the right place. Found this suggestion here: http://www.third-bit.com/trac/argon/wiki/InstallingTracOnCs

Installing Trac 0.8.4 on Red Hat Linux 9

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

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 /usr/local/RH9 directory (You need to create RH9 directory yourself)

You must add the following line to the "/etc/ld.so.conf" file: /usr/local/lib

2. Installing Python

 a. cd /usr/local/RH9
 b. tar xjf Python-2.3.5.tar.bz2
 c. cd Python-2.3.5;./configure;make;make install
 d. /sbin/ldconfig

3. Installing Httpd

 a. cd /usr/local/RH9
 b. tar xjf httpd-2.0.52.tar.bz2
 c. cd httpd-2.0.52;./configure;make;make install
 d. /sbin/ldconfig

4. Installing Swig

a. cd /usr/local/RH9
b. tar xzf swig-1.3.21.tar.gz
c. cd SWIG-1.3.21;./configure --with-python=/usr/local/bin/python;make;make install
d. make -k runtime;make install-runtime
e. /sbin/ldconfig

5. Installing Subversion

 a. cd /usr/local/RH9
 b. tar xzf subversion-1.1.0.tar.gz
 c. 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
 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

6. Installing SqlLite

 a. cd /usr/local/RH9
 b. tar xzf sqlite-2.8.16.tar.gz
 c. cd sqlite-2.8.16;./configure;make;make install
 d. /sbin/ldconfig

7. Installing SilverCity

 a. cd /usr/local/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

8. Installing ClearSilver

 a. cd /usr/local/RH9
 b. tar xzf clearsilver-0.9.3.tar.gz
 c. cd clearsilver-0.9.3;./configure  --with-python=/usr/local/bin/python --with-apache=/usr/local/apache2;make;make install
 d. cd python; python setup.py install;
 e. /sbin/ldconfig

9. Installing PySqlLite

 a. cd /usr/local/RH9
 b. tar xzf pysqlite-1.0.1.tar.gz
 c. cd pysqlite;python setup.py build; python setup.py install
 d. /sbin/ldconfig

9. Installing Trac

 a. cd /usr/local/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

10. 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 /usr/local/lib/svn-python svn-python
 c. ln -s /usr/local/lib/svn-python/svn svn
 d. ln -s /usr/local/lib/svn-python/libsvn libsvn
 e. /sbin/ldconfig
 Create the svn project environment:
 f. svnadmin create --fs-type=fsfs /var/svn
 Create the trac project environment:
 g. trac-admin /var/svn/trac_project_env initenv
 h. You will see the following message below and follow what my options showed:
/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.
  import _core
/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.
  import _fs
/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.
  import _delta
/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.
  import _repos
Creating a new Trac environment at /var/svn/trac_project_env

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]>

 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]> /var/svn

 Please enter location of Trac page templates.
 Default is the location of the site-wide templates installed with Trac.

Templates directory [/usr/local/share/trac/templates]>
Creating and Initializing Project
 Inserting default data
 Configuring Project
  trac.repository_dir
  trac.templates_dir
  project.name
 Installing wiki pages
 /usr/local/share/trac/wiki-default/CamelCase => CamelCase
 /usr/local/share/trac/wiki-default/RecentChanges => RecentChanges
 /usr/local/share/trac/wiki-default/SandBox => SandBox
 /usr/local/share/trac/wiki-default/TitleIndex => TitleIndex
 /usr/local/share/trac/wiki-default/TracAccessibility => TracAccessibility
 /usr/local/share/trac/wiki-default/TracAdmin => TracAdmin
 /usr/local/share/trac/wiki-default/TracBackup => TracBackup
 /usr/local/share/trac/wiki-default/TracBrowser => TracBrowser
 /usr/local/share/trac/wiki-default/TracChangeset => TracChangeset
 /usr/local/share/trac/wiki-default/TracEnvironment => TracEnvironment
 /usr/local/share/trac/wiki-default/TracGuide => TracGuide
 /usr/local/share/trac/wiki-default/TracImport => TracImport
 /usr/local/share/trac/wiki-default/TracIni => TracIni
 /usr/local/share/trac/wiki-default/TracInstall => TracInstall
 /usr/local/share/trac/wiki-default/TracInstallPlatforms => TracInstallPlatforms
 /usr/local/share/trac/wiki-default/TracLinks => TracLinks
 /usr/local/share/trac/wiki-default/TracLogging => TracLogging
 /usr/local/share/trac/wiki-default/TracModPython => TracModPython
 /usr/local/share/trac/wiki-default/TracMultipleProjects => TracMultipleProjects
 /usr/local/share/trac/wiki-default/TracNotification => TracNotification
 /usr/local/share/trac/wiki-default/TracPermissions => TracPermissions
 /usr/local/share/trac/wiki-default/TracQuery => TracQuery
 /usr/local/share/trac/wiki-default/TracReports => TracReports
 /usr/local/share/trac/wiki-default/TracRoadmap => TracRoadmap
 /usr/local/share/trac/wiki-default/TracRss => TracRss
 /usr/local/share/trac/wiki-default/TracSearch => TracSearch
 /usr/local/share/trac/wiki-default/TracStandalone => TracStandalone
 /usr/local/share/trac/wiki-default/TracSupport => TracSupport
 /usr/local/share/trac/wiki-default/TracSyntaxColoring => TracSyntaxColoring
 /usr/local/share/trac/wiki-default/TracTickets => TracTickets
 /usr/local/share/trac/wiki-default/TracTicketsCustomFields => TracTicketsCustomFields
 /usr/local/share/trac/wiki-default/TracTimeline => TracTimeline
 /usr/local/share/trac/wiki-default/TracUnicode => TracUnicode
 /usr/local/share/trac/wiki-default/TracUpgrade => TracUpgrade
 /usr/local/share/trac/wiki-default/TracWiki => TracWiki
 /usr/local/share/trac/wiki-default/WikiFormatting => WikiFormatting
 /usr/local/share/trac/wiki-default/WikiHtml => WikiHtml
 /usr/local/share/trac/wiki-default/WikiMacros => WikiMacros
 /usr/local/share/trac/wiki-default/WikiNewPage => WikiNewPage
 /usr/local/share/trac/wiki-default/WikiPageNames => WikiPageNames
 /usr/local/share/trac/wiki-default/WikiProcessors => WikiProcessors
 /usr/local/share/trac/wiki-default/WikiRestructuredText => WikiRestructuredText
 /usr/local/share/trac/wiki-default/WikiRestructuredTextLinks => WikiRestructuredTextLinks
 /usr/local/share/trac/wiki-default/WikiStart => WikiStart
 Indexing repository
---------------------------------------------------------------------

Project database for 'My Project' created.

 Customize settings for your project using the command:

   trac-admin /var/svn/trac_project_env

 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/"
    <Location "/cgi-bin/trac.cgi">
        SetEnv TRAC_ENV "/var/svn/trac_project_env"
    </Location>

    # You need something like this to authenticate users
    <Location "/cgi-bin/trac.cgi/login">
        AuthType Basic
        AuthName "My Project"
        AuthUserFile /somewhere/trac.htpasswd
        Require valid-user
    </Location>

 The latest documentation can also always be found on the project website:
 http://projects.edgewall.com/trac/

Congratulations!

11. Configuring Httpd

a. Add the following section into your "/usr/local/apache/conf/httpd.conf" file:

Alias /trac "/usr/share/trac/htdocs/"
<Location "/cgi-bin/trac.cgi">
   SetEnv TRAC_ENV "/var/svn/trac_project_env"
</Location>

# You need something like this to authenticate users
<Location "/cgi-bin/trac.cgi/login">
   AuthType Basic
   AuthName "My Project"
   AuthUserFile /var/svn/trac.htpasswd
   Require valid-user
</Location>

b. Create the "trac.htpasswd" file:
  cd /var/svn;/usr/local/apache2/bin/htpasswd -c trac.htpasswd admin
  (You can add more users by using: cd /var/svn;/usr/local/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 /var/svn/trac_project_env

d. Copy "trac.cgi" file to "/usr/local/apache2/cgi-bin" directory:
   cd /usr/local/apache2/cgi-bin;cp /usr/local/share/trac/cgi-bin/trac.cgi .

12. Congratulations :)

a. Run your httpd server:
   /usr/local/apache2/bin/httpd

b. Open your web browser and type the following address:
   your-ip-address/cgi-bin/trac.cgi

Attachments (1)

Download all attachments as: .zip

Note: See TracWiki for help on using the wiki.