linux安装trac+svn+apache+wike,Ubuntu安装Trac+svn+apache+ldap+[mysql]认证

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

权限全为www-data:www-data

apt-get install libapache2-svn libsvn-perl libsvn1 libldap-2.4-2 libldap2-devtrac libapache2-mod-python libapache2-mod-python-docapache2-mpm-prefork

####trac default use sqlite database todeposit 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 / http:///

Redirect permanent / http:///

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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值