46 | | to be continue... |
| 55 | use following line to restart apache, check /var/log/httpd/error.log, if failed |
| 56 | {{{ |
| 57 | /etc/rc.d/httpd restart |
| 58 | }}} |
| 59 | |
| 60 | Tips: you can check it by http://your_server_ip/server-info after following config |
| 61 | {{{ |
| 62 | edit /etc/httpd/conf/httpd.conf uncomment following line |
| 63 | Include /etc/httpd/conf/extra/httpd-info.conf |
| 64 | |
| 65 | edit /etc/httpd/conf/extra/httpd-info.conf modify the "Allow from" to your client ip address |
| 66 | }}} |
| 67 | |
| 68 | == setup subversion for each project == |
| 69 | mkdir -p $SROOT/$PRJ |
| 70 | mkdir /tmp/$PRJ |
| 71 | mkdir /tmp/$PRJ/branches |
| 72 | mkdir /tmp/$PRJ/tags |
| 73 | mkdir /tmp/$PRJ/trunk |
| 74 | svnadmin create $SROOT/$PRJ |
| 75 | svn import /tmp/$PRJ file://$SROOT/$PRJ -m "initial import" |
| 76 | rm -rf /tmp/$PRJ |
| 77 | svn ls -v file://$SROOT/$PRJ # check it |
| 78 | |
| 79 | == setup trac db for each project == |
| 80 | mkdir -p $TROOT |
| 81 | |
| 82 | setup by interactive questions |
| 83 | {{{ |
| 84 | trac-admin $TROOT/$PRJ initenv |
| 85 | }}} |
| 86 | or, by command line parameters |
| 87 | {{{ |
| 88 | trac-admin $TROOT/$PRJ initenv $PRJ sqlite:db/trac.db svn $SROOT/$PRJ /usr/share/trac/templates |
| 89 | }}} |
| 90 | |
| 91 | == configure apache == |
| 92 | {{{ |
| 93 | chown -R nobody $SROOT $TROOT # allow httpd's owner 'nobody' could read/write |
| 94 | |
| 95 | edit /etc/httpd/conf/httpd.conf, uncomment following line |
| 96 | Include /etc/httpd/conf/extra/httpd-vhosts.conf |
| 97 | |
| 98 | edit /etc/httpd/conf/extra/httpd-vhosts.conf, append following lines |
| 99 | <VirtualHost *:80> |
| 100 | ServerAdmin dlin@mail.taifex.com.tw |
| 101 | DocumentRoot /home/trac/ |
| 102 | ServerName 192.168.13.203 |
| 103 | ErrorLog /var/log/httpd/trac.error_log |
| 104 | CustomLog /var/log/httpd/trac.access_log common |
| 105 | <Location /prjs> #set up Trac handling |
| 106 | SetHandler mod_python |
| 107 | PythonHandler trac.web.modpython_frontend |
| 108 | PythonOption TracEnvParentDir /home/trac <-- change to $TROOT value |
| 109 | PythonOption TracUriRoot /prjs |
| 110 | </Location> |
| 111 | </VirtualHost> |
| 112 | }}} |
| 113 | |