Changes between Version 14 and Version 15 of Ubuntu-11.10
- Timestamp:
- Dec 20, 2015, 3:32:47 PM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ubuntu-11.10
v14 v15 1 How to install Trac 0.12 on ubuntu 11.10 machine with apache2 using wsgi. (everytime I use vim you can use any editor you want (nano, gedit..)) 1 = How to install Trac 0.12 on Ubuntu 11.10 with Apache2 using WSGI 2 2 3 '''Install trac''' (and usefull plugins) from repository: 3 {{{#!div class="system-message" 4 '''Notice''': These instructions are incomplete. See http://robertbasic.com/blog/trac-on-ubuntu for more detailed instructions. 5 }}} 4 6 5 {{{ 7 Every time I use vim you can use any editor you want, such as nano or gedit. 8 9 '''Install Trac''' (and useful plugins) from repository: 10 11 {{{#!sh 6 12 sudo apt-get install trac trac-accountmanager trac-graphviz trac-icalviewplugin trac-mastertickets trac-wysiwyg trac-wikitablemacro trac-tags trac-customfieldadmin trac-datefieldplugin 7 13 }}} 8 14 9 If you're going to use sqlite for d b (as I do)install python-sqlite:15 If you're going to use sqlite for database, then install python-sqlite: 10 16 11 {{{ 17 {{{#!sh 12 18 sudo apt-get install sqlite3 python-sqlite 13 19 }}} 14 20 21 '''Install sendmail''' (if not installed already): 15 22 16 '''install sendmail''' (if not installed already): 17 18 {{{ 23 {{{#!sh 19 24 sudo apt-get install sendmail 20 25 }}} 21 26 22 ''' add trac user:'''27 '''Add Trac user:''' 23 28 24 {{{ 29 {{{#!sh 25 30 sudo adduser --system --shell /bin/sh --gecos 'trac project managment' --group --disabled-password --home /var/trac trac 26 31 }}} 27 32 28 ''' add www-data to trac group''' so apache can access trac files33 '''Add www-data to Trac group''' so Apache can access Trac files 29 34 30 {{{ 35 {{{#!sh 31 36 sudo adduser www-data trac 32 37 }}} 33 38 39 '''Login as Trac user''' start bash and swich to homedir: 34 40 35 '''login as trac user''' start bash and swich to homedir: 36 37 {{{ 41 {{{#!sh 38 42 sudo su trac 39 43 bash … … 41 45 }}} 42 46 43 ''' make directory for all projects and create new project'''47 '''Make directory for all projects and create new project''' 44 48 45 {{{ 49 {{{#!sh 46 50 mkdir projects 47 51 cd projects … … 51 55 and finish instalation 52 56 53 ''' change permissions so group can write/read/execute'''57 '''Change permissions so group can write/read/execute''' 54 58 55 {{{ 59 {{{#!sh 56 60 chmod 0775 . -R 57 61 }}} 58 62 59 You can add as many projects as you want. And even later, all you have to do createnew project, deploy it and you're set.63 You can add as many projects as you want. And even later, all you have to do to create a new project, deploy it and you're set. 60 64 61 ''' back to your user'''.62 pressing C TRL+dtwice should get you back.65 '''Back to your user'''. 66 pressing Ctrl-D twice should get you back. 63 67 64 now we'll configure apache 68 Now we'll configure Apache. 65 69 66 Open apache apache site file what you want to use for trac (default should be fine). In my case I have Virtualhost for subdomain trac.70 Open apache apache site file what you want to use for Trac (default should be fine). In my case I have Virtualhost for subdomain Trac. 67 71 68 {{{ 72 {{{#!sh 69 73 vim /etc/apache2/sites-enabled/trac 70 74 }}} 75 71 76 and looks like: 72 77 73 {{{ 78 {{{#!apache 74 79 <VirtualHost *> 75 80 ServerName trac.domain.my … … 97 102 }}} 98 103 99 WSGIScriptAlias does all the magic. it gets project name from url and redirects to trac.wsgi in that project.100 If you're not running trac sites as subdomain but as folder in your documentroot (i.e. domain.ur/trac/myproject) replace101 {{{ 104 WSGIScriptAlias does all the magic. It gets its project name from url and redirects to trac.wsgi in that project. 105 If you're not running Trac sites as a subdomain but as a folder in your documentroot (i.e. `domain.ur/trac/myproject`) replace: 106 {{{#!sh 102 107 ^/([^/]+) 103 108 }}} 104 line with 105 {{{ 109 110 with: 111 {{{#!sh 106 112 ^/trac/([^/]+) 107 113 }}} 108 (there's just added 'trac/'). And make sure that /var/trac/projectsis in DocumentRoot.114 (there's just added 'trac/'). And make sure that `/var/trac/projects` is in DocumentRoot. 109 115 110 ''' reload apache configuration'''116 '''Reload apache configuration''' 111 117 112 {{{ 118 {{{#!sh 113 119 sudo service apache2 reload 114 120 }}} 115 116 You should be done117 118 (Comment: These instructions are relatively incomplete. I found http://robertbasic.com/blog/trac-on-ubuntu to offer more detailed instructions)