Edgewall Software

Changes between Version 23 and Version 24 of TracOnRedhat


Ignore:
Timestamp:
Mar 21, 2006, 9:12:31 PM (18 years ago)
Author:
coderanger
Comment:

More documentation cleanups

Legend:

Unmodified
Added
Removed
Modified
  • TracOnRedhat

    v23 v24  
     1[[PageOutline]]
    12= Installing Trac on Red Hat Linux =
    23
     
    56 * Red Hat Linux 9
    67 * Red Hat Enterprise Linux 3 (RHEL3)
    7 
    8 == 1. Packages Needed & Preparation ==
     8----
     9
     10== Packages Needed & Preparation ==
    911The following are the packages needed to install Trac 0.9.3 successfully:
    10 {{{
    11  a. clearsilver-0.9.3.tar.gz
    12  b. httpd-2.0.52.tar.bz2
    13  c. pysqlite-1.0.1.tar.gz
    14  d. Python-2.3.5.tar.bz2
    15  e. SilverCity-0.9.5.tar.gz
    16  f. sqlite-2.8.16.tar.gz
    17  g. subversion-1.3.0.tar.gz
    18  h. swig-1.3.21.tar.gz
    19  i. trac-0.9.3.tar.gz
    20 }}}
    21 
    22 
    23 Notes: You need Python-2.3.5 because the version in Red Hat Linux 9 is Python-2.2.2-26
     12 * clearsilver-0.9.3.tar.gz
     13 * httpd-2.0.52.tar.bz2
     14 * pysqlite-1.0.1.tar.gz
     15 * Python-2.3.5.tar.bz2
     16 * SilverCity-0.9.5.tar.gz
     17 * sqlite-2.8.16.tar.gz
     18 * subversion-1.3.0.tar.gz
     19 * swig-1.3.21.tar.gz
     20 * trac-0.9.3.tar.gz
     21
     22You need Python-2.3.5 because the version in Red Hat Linux 9 is Python-2.2.2-26
    2423After obtaining the packages, put all the packages in /usr/local/RH9 directory
    2524(You need to create RH9 directory yourself)
    2625
    27 '''You must add the following line to the "/etc/ld.so.conf" file:
    28 /usr/local/lib'''
    29 
    30 
    31 == 2. Installing Python ==
    32 {{{
    33  a. cd /usr/local/RH9
    34  b. tar xjf Python-2.3.5.tar.bz2
    35  c. cd Python-2.3.5;./configure;make;make install
    36  d. /sbin/ldconfig
    37 }}}
    38 
    39 == 3. Installing Httpd ==
    40 {{{
    41  a. cd /usr/local/RH9
    42  b. tar xjf httpd-2.0.52.tar.bz2
    43  c. cd httpd-2.0.52;./configure;make;make install
    44  d. /sbin/ldconfig
    45 }}}
    46 
    47 == 4. Installing Swig ==
    48 {{{
    49 a. cd /usr/local/RH9
    50 b. tar xzf swig-1.3.21.tar.gz
    51 c. cd SWIG-1.3.21;./configure --with-python=/usr/local/bin/python;make;make install
    52 d. make -k runtime;make install-runtime
    53 e. /sbin/ldconfig
    54 }}}
    55 
    56 
    57 
    58 == 5. Installing Subversion ==
    59 {{{
    60  a. cd /usr/local/RH9
    61  b. tar xzf subversion-1.3.0.tar.gz
    62  c. cd subversion-1.3.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
    63  d. Edit the Makefile to point PYTHON and -I/usr/include/python2.2 path to your installed Python (typically /usr/local/bin)
    64  e. make;make install
    65  f. make swig-py;make install-swig-py
    66  g. /sbin/ldconfig
    67 }}}
    68 
    69 
    70 
    71 == 6. Installing SqlLite ==
    72 {{{
    73  a. cd /usr/local/RH9
    74  b. tar xzf sqlite-2.8.16.tar.gz
    75  c. cd sqlite-2.8.16;./configure;make;make install
    76  d. /sbin/ldconfig
    77 }}}
    78 
    79 
    80 
    81 == 7. Installing SilverCity ==
    82 {{{
    83  a. cd /usr/local/RH9
    84  b. tar xzf SilverCity-0.9.5.tar.gz
    85  c. cd SilverCity-0.9.5;python setup.py build;python setup.py install
    86  d. /sbin/ldconfig
    87 }}}
    88 
    89 
    90 == 8. Installing ClearSilver ==
    91 
    92 {{{
    93  a. cd /usr/local/RH9
    94  b. tar xzf clearsilver-0.9.3.tar.gz
    95  c. cd clearsilver-0.9.3;./configure  --with-python=/usr/local/bin/python --with-apache=/usr/local/apache2;make;make install
    96  d. cd python; python setup.py install;
    97  e. /sbin/ldconfig
    98 }}}
    99 
    100 
    101 == 9. Installing PySqlLite ==
    102 {{{
    103  a. cd /usr/local/RH9
    104  b. tar xzf pysqlite-1.0.1.tar.gz
    105  c. cd pysqlite;python setup.py build; python setup.py install
    106  d. /sbin/ldconfig
    107 }}}
    108 
    109 
    110 
    111 == 9. Installing Trac ==
    112 {{{
    113  a. cd /usr/local/RH9
    114  b. tar xzf trac-0.9.3.tar.gz
    115  c. cd trac-0.9.3;python setup.py build;python setup.py install
    116  d. /sbin/ldconfig
    117 }}}
    118 
    119 
    120 == 10. Finalizing Installation ==
    121 {{{
    122  Create symbolic link for libsvn library to the python2.3 library:
    123  a. cd /usr/local/lib/python2.3/site-packages
    124  b. ln -s /usr/local/lib/svn-python svn-python
    125  c. ln -s /usr/local/lib/svn-python/svn svn
    126  d. ln -s /usr/local/lib/svn-python/libsvn libsvn
    127  e. /sbin/ldconfig
    128  Create the svn project environment:
    129  f. svnadmin create --fs-type=fsfs /var/svn
    130  Create the trac project environment:
    131  g. trac-admin /var/svn/trac_project_env initenv
    132  h. You will see the following message below and follow what my options showed:
     26You must add the following line to the "/etc/ld.so.conf" file:
     27{{{
     28/usr/local/lib
     29}}}
     30
     31== Installation ==
     32
     33=== Install Python ===
     34{{{
     35$ cd /usr/local/RH9
     36$ tar xjf Python-2.3.5.tar.bz2
     37$ cd Python-2.3.5;./configure;make;make install
     38$ /sbin/ldconfig
     39}}}
     40
     41=== Install Apache ===
     42{{{
     43$ cd /usr/local/RH9
     44$ tar xjf httpd-2.0.52.tar.bz2
     45$ cd httpd-2.0.52;./configure;make;make install
     46$ /sbin/ldconfig
     47}}}
     48
     49=== Install SWIG ===
     50{{{
     51$ cd /usr/local/RH9
     52$ tar xzf swig-1.3.21.tar.gz
     53$ cd SWIG-1.3.21
     54$ ./configure --with-python=/usr/local/bin/python
     55$ make
     56$ make install
     57$ make -k runtime
     58$ make install-runtime
     59$ /sbin/ldconfig
     60}}}
     61
     62
     63
     64=== Install Subversion ===
     65{{{
     66$ cd /usr/local/RH9
     67$ tar xzf subversion-1.3.0.tar.gz
     68$ cd subversion-1.3.0;./configure --disable-mod-activation --enable-swig-bindings=python \
     69    --with-apr=/usr/local/apache2/bin/apr-config --with-apr-util=/usr/local/apache2/bin/apu-config \
     70    --with-apxs=/usr/local/apache2/bin/apxs --without-berkeley-db --with-zlib --with-swig=/usr/local
     71(Edit the Makefile to point PYTHON and -I/usr/include/python2.2 path to your installed Python, typically /usr/local/bin)
     72$ make
     73$ make install
     74$ make swig-py
     75$ make install-swig-py
     76$ /sbin/ldconfig
     77}}}
     78
     79
     80
     81=== Install Sqlite ===
     82{{{
     83$ cd /usr/local/RH9
     84$ tar xzf sqlite-2.8.16.tar.gz
     85$ cd sqlite-2.8.16
     86$ ./configure
     87$ make
     88$ make install
     89$ /sbin/ldconfig
     90}}}
     91
     92
     93
     94=== Install SilverCity ===
     95{{{
     96$ cd /usr/local/RH9
     97$ tar xzf SilverCity-0.9.5.tar.gz
     98$ cd SilverCity-0.9.5
     99$ python setup.py build
     100$ python setup.py install
     101$ /sbin/ldconfig
     102}}}
     103
     104
     105=== Install ClearSilver ===
     106{{{
     107$ cd /usr/local/RH9
     108$ tar xzf clearsilver-0.9.3.tar.gz
     109$ cd clearsilver-0.9.3
     110$ ./configure  --with-python=/usr/local/bin/python --with-apache=/usr/local/apache2
     111$ make
     112$ make install
     113$ cd python
     114$ python setup.py install
     115$ /sbin/ldconfig
     116}}}
     117
     118
     119=== Install PySqlite ===
     120{{{
     121$ cd /usr/local/RH9
     122$ tar xzf pysqlite-1.0.1.tar.gz
     123$ cd pysqlite
     124$ python setup.py build
     125$ python setup.py install
     126$ /sbin/ldconfig
     127}}}
     128
     129
     130
     131=== Install Trac ===
     132{{{
     133$ cd /usr/local/RH9
     134$ tar xzf trac-0.9.3.tar.gz
     135$ cd trac-0.9.3
     136$ python setup.py build
     137$ python setup.py install
     138$ /sbin/ldconfig
     139}}}
     140
     141
     142=== Finalize Installation ===
     143
     144==== Fix libsvn paths ====
     145This will create symbolic a link for then libsvn library to the Python 2.3 library
     146{{{
     147$ cd /usr/local/lib/python2.3/site-packages
     148$ ln -s /usr/local/lib/svn-python svn-python
     149$ ln -s /usr/local/lib/svn-python/svn svn
     150$ ln -s /usr/local/lib/svn-python/libsvn libsvn
     151$ /sbin/ldconfig
     152}}}
     153
     154==== Create the Subversion repository ====
     155{{{
     156$ svnadmin create --fs-type=fsfs /var/svn
     157}}}
     158
     159==== Create the Trac environment ====
     160You will see the following message below and follow what my options showed:
     161{{{
     162$ trac-admin /var/trac initenv
    133163/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.
    134164  import _core
     
    139169/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.
    140170  import _repos
    141 Creating a new Trac environment at /var/svn/trac_project_env
     171Creating a new Trac environment at /var/trac
    142172
    143173Trac will first ask a few questions about your environment
     
    147177 This name will be used in page titles and descriptions.
    148178
    149 Project Name [My Project]>
     179Project Name [My Project]> (Your project name)
    150180
    151181 Please specify the absolute path to the project Subversion repository.
     
    158188 Default is the location of the site-wide templates installed with Trac.
    159189
    160 Templates directory [/usr/local/share/trac/templates]>
     190Templates directory [/usr/local/share/trac/templates]> (Press enter here)
    161191Creating and Initializing Project
    162  Inserting default data
    163  Configuring Project
    164   trac.repository_dir
    165   trac.templates_dir
    166   project.name
    167  Installing wiki pages
    168  /usr/local/share/trac/wiki-default/CamelCase => CamelCase
    169  /usr/local/share/trac/wiki-default/RecentChanges => RecentChanges
    170  /usr/local/share/trac/wiki-default/SandBox => SandBox
    171  /usr/local/share/trac/wiki-default/TitleIndex => TitleIndex
    172  /usr/local/share/trac/wiki-default/TracAccessibility => TracAccessibility
    173  /usr/local/share/trac/wiki-default/TracAdmin => TracAdmin
    174  /usr/local/share/trac/wiki-default/TracBackup => TracBackup
    175  /usr/local/share/trac/wiki-default/TracBrowser => TracBrowser
    176  /usr/local/share/trac/wiki-default/TracChangeset => TracChangeset
    177  /usr/local/share/trac/wiki-default/TracEnvironment => TracEnvironment
    178  /usr/local/share/trac/wiki-default/TracGuide => TracGuide
    179  /usr/local/share/trac/wiki-default/TracImport => TracImport
    180  /usr/local/share/trac/wiki-default/TracIni => TracIni
    181  /usr/local/share/trac/wiki-default/TracInstall => TracInstall
    182  /usr/local/share/trac/wiki-default/TracInstallPlatforms => TracInstallPlatforms
    183  /usr/local/share/trac/wiki-default/TracLinks => TracLinks
    184  /usr/local/share/trac/wiki-default/TracLogging => TracLogging
    185  /usr/local/share/trac/wiki-default/TracModPython => TracModPython
    186  /usr/local/share/trac/wiki-default/TracMultipleProjects => TracMultipleProjects
    187  /usr/local/share/trac/wiki-default/TracNotification => TracNotification
    188  /usr/local/share/trac/wiki-default/TracPermissions => TracPermissions
    189  /usr/local/share/trac/wiki-default/TracQuery => TracQuery
    190  /usr/local/share/trac/wiki-default/TracReports => TracReports
    191  /usr/local/share/trac/wiki-default/TracRoadmap => TracRoadmap
    192  /usr/local/share/trac/wiki-default/TracRss => TracRss
    193  /usr/local/share/trac/wiki-default/TracSearch => TracSearch
    194  /usr/local/share/trac/wiki-default/TracStandalone => TracStandalone
    195  /usr/local/share/trac/wiki-default/TracSupport => TracSupport
    196  /usr/local/share/trac/wiki-default/TracSyntaxColoring => TracSyntaxColoring
    197  /usr/local/share/trac/wiki-default/TracTickets => TracTickets
    198  /usr/local/share/trac/wiki-default/TracTicketsCustomFields => TracTicketsCustomFields
    199  /usr/local/share/trac/wiki-default/TracTimeline => TracTimeline
    200  /usr/local/share/trac/wiki-default/TracUnicode => TracUnicode
    201  /usr/local/share/trac/wiki-default/TracUpgrade => TracUpgrade
    202  /usr/local/share/trac/wiki-default/TracWiki => TracWiki
    203  /usr/local/share/trac/wiki-default/WikiFormatting => WikiFormatting
    204  /usr/local/share/trac/wiki-default/WikiHtml => WikiHtml
    205  /usr/local/share/trac/wiki-default/WikiMacros => WikiMacros
    206  /usr/local/share/trac/wiki-default/WikiNewPage => WikiNewPage
    207  /usr/local/share/trac/wiki-default/WikiPageNames => WikiPageNames
    208  /usr/local/share/trac/wiki-default/WikiProcessors => WikiProcessors
    209  /usr/local/share/trac/wiki-default/WikiRestructuredText => WikiRestructuredText
    210  /usr/local/share/trac/wiki-default/WikiRestructuredTextLinks => WikiRestructuredTextLinks
    211  /usr/local/share/trac/wiki-default/WikiStart => WikiStart
    212  Indexing repository
    213 ---------------------------------------------------------------------
    214 
     192(Output removed)
    215193Project database for 'My Project' created.
    216194
    217195 Customize settings for your project using the command:
    218196
    219    trac-admin /var/svn/trac_project_env
     197   trac-admin /var/trac
    220198
    221199 Don't forget, you also need to copy (or symlink) "trac/cgi-bin/trac.cgi"
     
    226204    Alias /trac "/wherever/you/installed/trac/htdocs/"
    227205    <Location "/cgi-bin/trac.cgi">
    228         SetEnv TRAC_ENV "/var/svn/trac_project_env"
     206        SetEnv TRAC_ENV "/var/trac"
    229207    </Location>
    230208
     
    243221}}}
    244222
    245 
    246 
    247 == 11. Configuring Httpd ==
    248 {{{
    249 a. Add the following section into your "/usr/local/apache/conf/httpd.conf" file:
    250 
     223== Configuration ==
     224===  Configuring Apache ===
     225Add the following section into your "/usr/local/apache/conf/httpd.conf" file
     226{{{
    251227Alias /trac "/usr/local/share/trac/htdocs/"
    252228<Location "/cgi-bin/trac.cgi">
     
    258234   AuthType Basic
    259235   AuthName "My Project"
    260    AuthUserFile /var/svn/trac.htpasswd
     236   AuthUserFile /var/trac/conf/htpasswd
    261237   Require valid-user
    262238</Location>
    263 
    264 b. Create the "trac.htpasswd" file:
    265   cd /var/svn;/usr/local/apache2/bin/htpasswd -c trac.htpasswd admin
    266   (You can add more users by using: cd /var/svn;/usr/local/apache2/bin/htpasswd -c trac.htpasswd username)
    267 
    268 c. Change the privilege of the "trac_project_env" so httpd can perform r/w on trac.db:
    269    chmod -Rv a+rw /var/svn/trac_project_env
    270 
    271 d. Copy "trac.cgi" file to "/usr/local/apache2/cgi-bin" directory:
    272    cd /usr/local/apache2/cgi-bin;cp /usr/local/share/trac/cgi-bin/trac.cgi .
    273 }}}
    274 
    275 
    276 == 12. Congratulations :) ==
    277 {{{
    278 a. Run your httpd server:
    279    /usr/local/apache2/bin/httpd
    280 
    281 b. Open your web browser and type the following address:
    282    your-ip-address/cgi-bin/trac.cgi
    283 }}}
    284 
    285 
     239}}}
     240
     241=== Configuring passwords ===
     242Create the "trac.htpasswd" file
     243{{{
     244$ cd /var/trac/conf
     245$ /usr/local/apache2/bin/htpasswd -c htpasswd admin
     246}}}
     247
     248You can add more users by using: {{{/usr/local/apache2/bin/htpasswd htpasswd username}}}
     249
     250=== Configuring file permissions ===
     251Change the permissions on the Trac environment so Apache has read/write access to the trac.db file
     252{{{
     253$ chmod -Rv a+rw /var/trac
     254}}}
     255
     256=== Copy trac.cgi ===
     257Copy {{{trac.cgi}}} to the directory {{{/usr/local/apache2/cgi-bin}}}
     258{{{
     259$ cd /usr/local/apache2/cgi-bin
     260$ cp /usr/local/share/trac/cgi-bin/trac.cgi .
     261}}}
     262
     263
     264== Congratulations ==
     265Start Apache and point your web browser at "localhost/cgi-bin/trac.cgi"
     266{{{
     267$ /usr/local/apache2/bin/httpd
     268}}}
     269
     270----
    286271Please mail me if you need additional environments to compile and install on:
    287272dragoncity99@hotmail.com