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