2009/12 17
My Env:
Ubuntu 8.04
python 2.5

Step:
1. sudo apt-get install python-subversion python-mysqldb
2. sudo easy_install Trac
3. sudo useradd trac
4. sudo su trac
5. trac-admin /home/trac/luochunhui.com initenv
Project Name [My Project]> Blog
Database connection string [sqlite:db/trac.db]> mysql://username:password@localhost/trac
Repository type [svn]> svn
Path to repository [/path/to/repos]> /home/svn/blog

6. nohup tracd --port 8290 -b trac.luochunhui.com /home/trac/luochunhui.com/ &
7. exit
visit trac.luochunhui.com:8290


Next: auth & use nginx

8. sudo su tracd
9. cd /home/trac
10. trac-admin luochunhui.com/ permission remove anonymous BROWSER_VIEW CHANGESET_VIEW FILE_VIEW LOG_VIEW MILESTONE_VIEW REPORT_SQL_VIEW REPORT_VIEW ROADMAP_VIEW SEARCH_VIEW TICKET_VIEW WIKI_VIEW TIMELINE_VIEW
11. trac-admin luochunhui.com/ permission add authenticated BROWSER_VIEW CHANGESET_VIEW FILE_VIEW LOG_VIEW MILESTONE_VIEW REPORT_SQL_VIEW REPORT_VIEW ROADMAP_VIEW SEARCH_VIEW TICKET_VIEW WIKI_VIEW TIMELINE_VIEW
12. htpasswd -c conf/trac.htpasswd username
13. killall tracd
14. nohup tracd --port 8290 -b trac.luochunhui.com /home/trac/luochunhui.com --basic-auth="*",/home/trac/luochunhui.com/conf/trac.htpasswd,trac.luochunhui.com &
15. exit //exit trac user
14. sudo vi /etc/nginx/sites-available/trac.luochunhui.com
upstream trac_rollenc { server trac.luochunhui.com:8290; } server { listen 80; server_name trac.luochunhui.com; access_log /var/log/nginx/trac.access.log main; error_log /var/log/nginx/trac.error.log info; location / { proxy_pass http://trac_rollenc; # include /etc/nginx/proxy.conf; } }
15. sudo ln -sf /etc/nginx/sites-available/trac.luochunhui.com /etc/nginx/sites-enable/trac.luochunhui.com
16. sudo nginx -t
17. sudo /etc/init.d/nginx restart

visit trac.luochunhui.com
and you will see some error message because the anonymous is deny.
click "login" and input your username and password.
Enjoy it.

ALL DONE.

Posted by rollenc

Last modified on 2009-12-17 14:55

0 Trackbacks

  1. No Trackbacks

0 Comments

  1. No comments

Add Comment


E-Mail addresses will not be displayed and will only be used for E-Mail notifications.