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