| 1 | Installing Trac 0.8.4 on Red Hat Linux 9 |
|---|
| 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 | =========================== |
|---|
| 110 | 10. Finalizing Installation |
|---|
| 111 | =========================== |
|---|
| 112 | Create symbolic link for libsvn library to the python2.3 library: |
|---|
| 113 | a. cd /usr/local/lib/python2.3/site-packages |
|---|
| 114 | b. ln -s /usr/local/lib/svn-python svn-python |
|---|
| 115 | c. ln -s /usr/local/lib/svn-python/svn svn |
|---|
| 116 | d. ln -s /usr/local/lib/svn-python/libsvn libsvn |
|---|
| 117 | e. /sbin/ldconfig |
|---|
| 118 | Create the svn project environment: |
|---|
| 119 | f. svnadmin create --fs-type=fsfs /var/svn |
|---|
| 120 | Create the trac project environment: |
|---|
| 121 | g. trac-admin /var/svn/trac_project_env initenv |
|---|
| 122 | h. You will see the following message below and follow what my options showed: |
|---|
| 123 | /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. |
|---|
| 124 | import _core |
|---|
| 125 | /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. |
|---|
| 126 | import _fs |
|---|
| 127 | /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. |
|---|
| 128 | import _delta |
|---|
| 129 | /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. |
|---|
| 130 | import _repos |
|---|
| 131 | Creating a new Trac environment at /var/svn/trac_project_env |
|---|
| 132 | |
|---|
| 133 | Trac will first ask a few questions about your environment |
|---|
| 134 | in order to initalize and prepare the project database. |
|---|
| 135 | |
|---|
| 136 | Please enter the name of your project. |
|---|
| 137 | This name will be used in page titles and descriptions. |
|---|
| 138 | |
|---|
| 139 | Project Name [My Project]> |
|---|
| 140 | |
|---|
| 141 | Please specify the absolute path to the project Subversion repository. |
|---|
| 142 | Repository must be local, and trac-admin requires read+write |
|---|
| 143 | permission to initialize the Trac database. |
|---|
| 144 | |
|---|
| 145 | Path to repository [/var/svn/test]> /var/svn |
|---|
| 146 | |
|---|
| 147 | Please enter location of Trac page templates. |
|---|
| 148 | Default is the location of the site-wide templates installed with Trac. |
|---|
| 149 | |
|---|
| 150 | Templates directory [/usr/local/share/trac/templates]> |
|---|
| 151 | Creating and Initializing Project |
|---|
| 152 | Inserting default data |
|---|
| 153 | Configuring Project |
|---|
| 154 | trac.repository_dir |
|---|
| 155 | trac.templates_dir |
|---|
| 156 | project.name |
|---|
| 157 | Installing wiki pages |
|---|
| 158 | /usr/local/share/trac/wiki-default/CamelCase => CamelCase |
|---|
| 159 | /usr/local/share/trac/wiki-default/RecentChanges => RecentChanges |
|---|
| 160 | /usr/local/share/trac/wiki-default/SandBox => SandBox |
|---|
| 161 | /usr/local/share/trac/wiki-default/TitleIndex => TitleIndex |
|---|
| 162 | /usr/local/share/trac/wiki-default/TracAccessibility => TracAccessibility |
|---|
| 163 | /usr/local/share/trac/wiki-default/TracAdmin => TracAdmin |
|---|
| 164 | /usr/local/share/trac/wiki-default/TracBackup => TracBackup |
|---|
| 165 | /usr/local/share/trac/wiki-default/TracBrowser => TracBrowser |
|---|
| 166 | /usr/local/share/trac/wiki-default/TracChangeset => TracChangeset |
|---|
| 167 | /usr/local/share/trac/wiki-default/TracEnvironment => TracEnvironment |
|---|
| 168 | /usr/local/share/trac/wiki-default/TracGuide => TracGuide |
|---|
| 169 | /usr/local/share/trac/wiki-default/TracImport => TracImport |
|---|
| 170 | /usr/local/share/trac/wiki-default/TracIni => TracIni |
|---|
| 171 | /usr/local/share/trac/wiki-default/TracInstall => TracInstall |
|---|
| 172 | /usr/local/share/trac/wiki-default/TracInstallPlatforms => TracInstallPlatforms |
|---|
| 173 | /usr/local/share/trac/wiki-default/TracLinks => TracLinks |
|---|
| 174 | /usr/local/share/trac/wiki-default/TracLogging => TracLogging |
|---|
| 175 | /usr/local/share/trac/wiki-default/TracModPython => TracModPython |
|---|
| 176 | /usr/local/share/trac/wiki-default/TracMultipleProjects => TracMultipleProjects |
|---|
| 177 | /usr/local/share/trac/wiki-default/TracNotification => TracNotification |
|---|
| 178 | /usr/local/share/trac/wiki-default/TracPermissions => TracPermissions |
|---|
| 179 | /usr/local/share/trac/wiki-default/TracQuery => TracQuery |
|---|
| 180 | /usr/local/share/trac/wiki-default/TracReports => TracReports |
|---|
| 181 | /usr/local/share/trac/wiki-default/TracRoadmap => TracRoadmap |
|---|
| 182 | /usr/local/share/trac/wiki-default/TracRss => TracRss |
|---|
| 183 | /usr/local/share/trac/wiki-default/TracSearch => TracSearch |
|---|
| 184 | /usr/local/share/trac/wiki-default/TracStandalone => TracStandalone |
|---|
| 185 | /usr/local/share/trac/wiki-default/TracSupport => TracSupport |
|---|
| 186 | /usr/local/share/trac/wiki-default/TracSyntaxColoring => TracSyntaxColoring |
|---|
| 187 | /usr/local/share/trac/wiki-default/TracTickets => TracTickets |
|---|
| 188 | /usr/local/share/trac/wiki-default/TracTicketsCustomFields => TracTicketsCustomFields |
|---|
| 189 | /usr/local/share/trac/wiki-default/TracTimeline => TracTimeline |
|---|
| 190 | /usr/local/share/trac/wiki-default/TracUnicode => TracUnicode |
|---|
| 191 | /usr/local/share/trac/wiki-default/TracUpgrade => TracUpgrade |
|---|
| 192 | /usr/local/share/trac/wiki-default/TracWiki => TracWiki |
|---|
| 193 | /usr/local/share/trac/wiki-default/WikiFormatting => WikiFormatting |
|---|
| 194 | /usr/local/share/trac/wiki-default/WikiHtml => WikiHtml |
|---|
| 195 | /usr/local/share/trac/wiki-default/WikiMacros => WikiMacros |
|---|
| 196 | /usr/local/share/trac/wiki-default/WikiNewPage => WikiNewPage |
|---|
| 197 | /usr/local/share/trac/wiki-default/WikiPageNames => WikiPageNames |
|---|
| 198 | /usr/local/share/trac/wiki-default/WikiProcessors => WikiProcessors |
|---|
| 199 | /usr/local/share/trac/wiki-default/WikiRestructuredText => WikiRestructuredText |
|---|
| 200 | /usr/local/share/trac/wiki-default/WikiRestructuredTextLinks => WikiRestructuredTextLinks |
|---|
| 201 | /usr/local/share/trac/wiki-default/WikiStart => WikiStart |
|---|
| 202 | Indexing repository |
|---|
| 203 | --------------------------------------------------------------------- |
|---|
| 204 | |
|---|
| 205 | Project database for 'My Project' created. |
|---|
| 206 | |
|---|
| 207 | Customize settings for your project using the command: |
|---|
| 208 | |
|---|
| 209 | trac-admin /var/svn/trac_project_env |
|---|
| 210 | |
|---|
| 211 | Don't forget, you also need to copy (or symlink) "trac/cgi-bin/trac.cgi" |
|---|
| 212 | to you web server's /cgi-bin/ directory, and then configure the server. |
|---|
| 213 | |
|---|
| 214 | If you're using Apache, this config example snippet might be helpful: |
|---|
| 215 | |
|---|
| 216 | Alias /trac "/wherever/you/installed/trac/htdocs/" |
|---|
| 217 | <Location "/cgi-bin/trac.cgi"> |
|---|
| 218 | SetEnv TRAC_ENV "/var/svn/trac_project_env" |
|---|
| 219 | </Location> |
|---|
| 220 | |
|---|
| 221 | # You need something like this to authenticate users |
|---|
| 222 | <Location "/cgi-bin/trac.cgi/login"> |
|---|
| 223 | AuthType Basic |
|---|
| 224 | AuthName "My Project" |
|---|
| 225 | AuthUserFile /somewhere/trac.htpasswd |
|---|
| 226 | Require valid-user |
|---|
| 227 | </Location> |
|---|
| 228 | |
|---|
| 229 | The latest documentation can also always be found on the project website: |
|---|
| 230 | http://projects.edgewall.com/trac/ |
|---|
| 231 | |
|---|
| 232 | Congratulations! |
|---|
| 233 | |
|---|
| 234 | |
|---|
| 235 | ===================== |
|---|
| 236 | 11. Configuring Httpd |
|---|
| 237 | ===================== |
|---|
| 238 | a. Add the following section into your "/usr/local/apache/conf/httpd.conf" file: |
|---|
| 239 | |
|---|
| 240 | Alias /trac "/usr/share/trac/htdocs/" |
|---|
| 241 | <Location "/cgi-bin/trac.cgi"> |
|---|
| 242 | SetEnv TRAC_ENV "/var/svn/trac_project_env" |
|---|
| 243 | </Location> |
|---|
| 244 | |
|---|
| 245 | # You need something like this to authenticate users |
|---|
| 246 | <Location "/cgi-bin/trac.cgi/login"> |
|---|
| 247 | AuthType Basic |
|---|
| 248 | AuthName "My Project" |
|---|
| 249 | AuthUserFile /var/svn/trac.htpasswd |
|---|
| 250 | Require valid-user |
|---|
| 251 | </Location> |
|---|
| 252 | |
|---|
| 253 | b. Create the "trac.htpasswd" file: |
|---|
| 254 | cd /var/svn;/usr/local/apache2/bin/htpasswd -c trac.htpasswd admin |
|---|
| 255 | (You can add more users by using: cd /var/svn;/usr/local/apache2/bin/htpasswd -c trac.htpasswd username) |
|---|
| 256 | |
|---|
| 257 | c. Change the privilege of the "trac_project_env" so httpd can perform r/w on trac.db: |
|---|
| 258 | chmod -Rv a+rw /var/svn/trac_project_env |
|---|
| 259 | |
|---|
| 260 | d. Copy "trac.cgi" file to "/usr/local/apache2/cgi-bin" directory: |
|---|
| 261 | cd /usr/local/apache2/cgi-bin;cp /usr/local/share/trac/cgi-bin/trac.cgi . |
|---|
| 262 | |
|---|
| 263 | ===================== |
|---|
| 264 | 12. Congratulations :) |
|---|
| 265 | ===================== |
|---|
| 266 | a. Run your httpd server: |
|---|
| 267 | /usr/local/apache2/bin/httpd |
|---|
| 268 | |
|---|
| 269 | b. Open your web browser and type the following address: |
|---|
| 270 | your-ip-address/cgi-bin/trac.cgi |
|---|