ubuntu安装trac

1、下载安装trac

 
sudo apt-get install libapache2-mod-wsgi libapache2-mod-auth-mysql
 
sudo apt-get install python-setuptools;
sudo apt-get install libmysqlclient-dev;
sudo apt-get install python-dev;
 
sudo easy_install Genshi;
sudo easy_install -U distribute;
sudo easy_install mysql_python;
 
wget http://download.edgewall.org/trac/Trac-1.0.1.tar.gz
 
python ./setup.py install

安装输出结果

creating build/bdist.linux-i686/egg/EGG-INFO
copying Trac.egg-info/PKG-INFO -> build/bdist.linux-i686/egg/EGG-INFO
copying Trac.egg-info/SOURCES.txt -> build/bdist.linux-i686/egg/EGG-INFO
copying Trac.egg-info/dependency_links.txt -> build/bdist.linux-i686/egg/EGG-INFO
copying Trac.egg-info/entry_points.txt -> build/bdist.linux-i686/egg/EGG-INFO
copying Trac.egg-info/requires.txt -> build/bdist.linux-i686/egg/EGG-INFO
copying Trac.egg-info/top_level.txt -> build/bdist.linux-i686/egg/EGG-INFO
copying Trac.egg-info/zip-safe -> build/bdist.linux-i686/egg/EGG-INFO
creating dist
creating 'dist/Trac-1.0.1-py2.6.egg' and adding 'build/bdist.linux-i686/egg' to it
removing 'build/bdist.linux-i686/egg' (and everything under it)
Processing Trac-1.0.1-py2.6.egg
creating /usr/local/lib/python2.6/dist-packages/Trac-1.0.1-py2.6.egg
Extracting Trac-1.0.1-py2.6.egg to /usr/local/lib/python2.6/dist-packages
Adding Trac 1.0.1 to easy-install.pth file
Installing trac-admin script to /usr/local/bin
Installing tracd script to /usr/local/bin
 
Installed /usr/local/lib/python2.6/dist-packages/Trac-1.0.1-py2.6.egg
Processing dependencies for Trac==1.0.1
Searching for Genshi==0.7
Best match: Genshi 0.7
Processing Genshi-0.7-py2.6-linux-i686.egg
Genshi 0.7 is already the active version in easy-install.pth
 
Using /usr/local/lib/python2.6/dist-packages/Genshi-0.7-py2.6-linux-i686.egg
Searching for distribute==0.6.10
Best match: distribute 0.6.10
Adding distribute 0.6.10 to easy-install.pth file
Installing easy_install script to /usr/local/bin
Installing easy_install-2.6 script to /usr/local/bin
 
Using /usr/lib/python2.6/dist-packages
Finished processing dependencies for Trac==1.0.1

2、使用trac建立工程

sudo mkdir /data/www/trac/;
sudo chown -R www-data:www-data /data/www/trac/;
sudo trac-admin /data/www/trac/ initenv;
//输入项目名称
//输入数据库 mysql://root:123456@localhost:3306/trac
 
//创建其他服务调用脚本如wsgi
sudo trac-admin /data/www/trac deploy /data/www/trac/deploy;
 
//修改其他配置
sudo vi /data/www/trac/conf/trac.ini
 
//用trac自带的tracd启动测试
sudo -u www-data tracd --port 8000 /data/www/trac

3、使用apache2+wsgi调用python

 
sudo a2enmod wsgi;
 
<VirtualHost *:88>
 
  ServerAdmin webmaster@example.com
 
 
 
WSGIScriptAlias /trac /data/www/trac/deploy/cgi-bin/trac.wsgi
 
<Directory /data/www/trac/deploy/cgi-bin>
WSGIApplicationGroup %{GLOBAL}
Order deny,allow
Allow from all
</Directory>
 
<Location /svn>
DAV svn
SVNPath "/usr/local/svn/repo1"
AuthType Basic
AuthName "subversion repository"
AuthUserFile "/usr/local/svn/apacheconf/passwd"
AuthzSVNAccessFile "/usr/local/svn/apacheconf/authz"
Require valid-user
</Location>
</VirtualHost>
//把admin用户增加TRAC_ADMIN管理权限
trac-admin /data/www/trac/ permission add admin TRAC_ADMIN
//删除Ticket
sudo trac-admin /data/www/trac/ ticket remove 1
Ticket #1 and all associated data removed.

原创文章,转载请注明: 转载自海波无痕

本文链接地址: ubuntu安装trac

文章的脚注信息由WordPress的wp-posturl插件自动生成

此条目发表在server分类目录,贴了标签。将固定链接加入收藏夹。

发表评论

电子邮件地址不会被公开。 必填项已用*标注

评论链接可以 移除 nofollow.