Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1091481
  • 博文数量: 120
  • 博客积分: 887
  • 博客等级: 准尉
  • 技术积分: 1883
  • 用 户 组: 普通用户
  • 注册时间: 2010-04-05 21:10
个人简介

RHCE,CCNA,熟悉shell脚本

文章分类

全部博文(120)

文章存档

2015年(16)

2014年(20)

2013年(48)

2012年(20)

2011年(16)

分类: LINUX

2011-10-27 10:53:22

Ubuntu安装Trac+svn+apache+ldap认证

权限全为www-data:www-data

apt-get install libapache2-svn libsvn-perl libsvn1 libldap-2.4-2 libldap2-dev trac libapache2-mod-python libapache2-mod-python-doc apache2-mpm-prefork

####trac default use sqlite database to deposit project database

####but you can use other database software “mysql,postgresql


root@wikiserver:/etc/apache2/mods-available# vi dav_svn.conf###没配置

root@wikiserver:/etc/apache2/mods-available# vi ../apache2.conf


Order allow,deny

Deny from all


ServerTokens Full

ServerSignature On


root@wikiserver:/etc/apache2/mods-available# vi ../httpd.conf


Redirect permanent /

Redirect permanent /


SetHandler mod_python

PythonInterpreter main_interpreter

PythonHandler trac.web.modpython_frontend

PythonOption TracEnvParentDir /srv/trac/projects

PythonOption TracUriRoot /Projects


AuthType Basic

AuthName "projects"

AuthBasicProvider "ldap"

AuthLDAPURL "ldap://scidc02.domainname.com:3268/Dc=domainname,dc=com?sAMAccountName?sub?(objectClass=user)"

AuthLDAPBindDN trac@domainname.com

AuthLDAPBindPassword "123456"

authzldapauthoritative Off

require valid-user CN=Users,dc=domainname,dc=com


SetHandler mod_python

PythonInterpreter main_interpreter

PythonHandler trac.web.modpython_frontend

PythonOption TracEnv /srv/trac/projects/project

PythonOption TracUriRoot /project


AuthType Basic

AuthName "project"

AuthBasicProvider "ldap"

AuthLDAPURL "ldap://scidc02.domainname.com:3268/Dc=domainname,dc=com?sAMAccountName?sub?(objectClass=user)"

AuthLDAPBindDN trac@domainname.com

AuthLDAPBindPassword "123456"

authzldapauthoritative Off

require valid-user CN=Users,dc=domainname,dc=com


SetHandler mod_python

PythonInterpreter main_interpreter

PythonHandler trac.web.modpython_frontend

PythonOption TracEnv /srv/trac/projects/project

PythonOption TracUriRoot /Sandbox


AuthType Basic

AuthName "project"

AuthBasicProvider "ldap"

AuthLDAPURL "ldap://scidc02.domainname.com:3268/Dc=domainname,dc=com?sAMAccountName?sub?(objectClass=user)"

AuthLDAPBindDN trac@domainname.com

AuthLDAPBindPassword "123456"

authzldapauthoritative Off

require valid-user CN=Users,dc=domainname,dc=com


DAV svn

SVNParentPath /srv/svn_repo

aUTHtype Basic

AuthName "Subversion repository"

AuthBasicProvider "ldap"

AuthLDAPURL "ldap://scidc02.domainname.com:3268/Dc=domainname,dc=com?sAMAccountName?sub?(objectClass=user)"

AuthLDAPBindDN trac@domainname.com

AuthLDAPBindPassword "123456"

authzldapauthoritative Off

require valid-user CN=Users,dc=domainname,dc=com


SetHandler mod_python

PythonInterpreter main_interpreter

PythonHandler mod_python.testhandler


###enable python

a2enmod python

###enable ldap auth

a2enmod authnz_ldap


trac配置项目:

root@SHTRAC01:/srv/trac/projects# pwd

/srv/trac/projects

root@SHTRAC01:/srv/trac/projects# ls

projects projects projects


svn项目:

root@SHTRAC01:/srv/svn_repo# ls

AeSwExchg Samsung TD-Project

root@SHTRAC01:/srv/svn_repo# pwd

/srv/svn_repo


###############################################

###if you use other database software like mysql:

登陆MySQL
#mysql mysql -u root -p
创建用户trac
mysql>GRANT ALL PRIVILEGES ON *.* TO trac@'%' IDENTIFIED BY 'password' WITH GRANT OPTION;

mysql> flush privileges;

###############################################


创建trac项目环境:

root@SHTRAC01:~# trac-admin eee initenv

Creating a new Trac environment at /root/eee

Trac will first ask a few questions about your environment

in order to initialize and prepare the project database.

Please enter the name of your project.

This name will be used in page titles and descriptions.

Project Name [My Project]> eee

Please specify the connection string for the database to use.

By default, a local SQLite database is created in the environment

directory. It is also possible to use an already existing

PostgreSQL database (check the Trac documentation for the exact

connection string syntax).

Database connection string [sqlite:db/trac.db]>

###############################################

#Database connection string [sqlite:db/trac.db]>mysql://trac:password@localhost:1521/project //这里我们用MySQL数据库,如果用SQLite直接回车即可   

###############################################

Please specify the type of version control system,

By default, it will be svn.

If you don't want to use Trac with version control integration,

choose the default here and don't specify a repository directory.

in the next question.

Repository type [svn]>

Please specify the absolute path to the version control

repository, or leave it blank to use Trac without a repository.

You can also set the repository location later.

Path to repository [/path/to/repos]>


####start apache

/etc/init.d/apache2 start/restart/stop

阅读(2748) | 评论(0) | 转发(1) |
给主人留下些什么吧!~~