Version 1 (modified by mitty, 14 years ago) (diff) |
---|
- http(s)://lab.mitty.jp のsvn/trac 設定(抜粋)
- see also wiki:TipAndDoc/scm/svn and wiki:TipAndDoc/project/trac
templates and conf file sample
- source:/lab/trunk/TipAndDoc/tools => /home/tools
svn export http://lab.mitty.jp/svn/lab/trunk/TipAndDoc/tools /home/tools
setup Apache and its modules
- sudo aptitude install -R apache2 libapache2-svn libapache2-mod-fcgid
- sudo a2enmod ssl
activate lab.mitty.jp
- sudo vim /etc/apache2/sites-available/lab
- sudo a2ensite lab
- sudo vim /etc/apache2/sites-available/ssl.lab
- sudo a2ensite ssl.lab
install Subversion
- sudo aptitude install -R -y subversion
install Trac
install packages for Trac
- sudo aptitude install -R -y python-setuptools
- sudo easy_install -U setuptools
- sudo aptitude install -R -y python-subversion
- sudo aptitude install -R -y enscript
- sudo easy_install Pygments
- sudo aptitude install -R -y unzip
i18n
- sudo easy_install pytz
- sudo easy_install Babel
install Trac itself
- wget from http://www.i-act.co.jp/project/products/products.html and unzip
- sudo python setup.py install
- sudo ln -s /usr/local/lib/python2.6/dist-packages/Trac-*.egg/trac/htdocs /var/www/trac
install plugins
trachacks:graphviz
- sudo aptitude install -R -y graphviz
- sudo aptitude install -R ttf-vlgothic
- svn co http://trac-hacks.org/svn/graphvizplugin
- vim graphvizplugin/0.11/graphviz/graphviz.py
-
0.11/graphviz/graphviz.py
20 20 import locale 21 21 import os 22 22 import re 23 import sha23 import hashlib 24 24 import subprocess 25 25 import sys 26 26 … … 310 310 encoded_cmd = (processor + unicode(self.processor_options)) \ 311 311 .encode(self.encoding) 312 312 encoded_content = content.encode(self.encoding) 313 sha_key = sha.new(encoded_cmd + encoded_content).hexdigest()313 sha_key = hashlib.sha1(encoded_cmd + encoded_content).hexdigest() 314 314 img_name = '%s.%s.%s' % (sha_key, processor, out_format) 315 315 # cache: hash.<dot>.<png> 316 316 img_path = os.path.join(self.cache_dir, img_name)
-
- sudo mkdir /var/tmp/graphviz
- sudo chgrp www-data /var/tmp/graphviz
- sudo chmod g+w /var/tmp/graphviz
- ~/graphvizplugin/0.11$ python setup.py bdist_egg
- ~/graphvizplugin/0.11$ sudo cp dist/graphviz-0.7.6dev-py2.6.egg /home/tools/trac/plugins/
track-hacks:XmlRpcPlugin
- svn co http://trac-hacks.org/svn/xmlrpcplugin/
- ~/xmlrpcplugin/trunk$ python setup.py bdist_egg
- ~/xmlrpcplugin/trunk$ sudo cp dist/TracXMLRPC-1.1.0_r9395-py2.6.egg /home/systool/trac/plugins/
- sudo vim /home/systool/trac/conf/trac.ini
create repository/project
- source:/lab/trunk/TipAndDoc/tools/tool/buildrepos.sh
sudo /home/tools/tool/buildrepos.sh repository_name parent_dir_name
- => /var/svn/parent_dir_name/repository_name
- http://lab.mitty.jp/svn/repository_name
- source:/lab/trunk/TipAndDoc/tools/tool/buildtrac.sh
sudo /home/tools/tool/buildtrac.sh project_name parent_dir_name subdomain_name
- => /var/trac/parent_dir_name/project_name
- http://lab.mitty.jp/trac/project_name