Install trac + svn + apache2 in linux

Source: Internet
Author: User
Install trac + svn + apache2 in linux-Linux Enterprise Application-Linux server application information. For details, refer to the following section. Environment:
I686 P4 3.0G
1024 MB
Gentoo kernel 2.6.17-gentoo-r7
Gcc 4.1.1
Glibc 2.4-r3
Trac uses sqlite svn to use berkleydb

1. installation will not be too troublesome, follow below the link can be, http://trac.edgewall.org/wiki/TracInstall
The main reason is that the configuration after installation is a headache.
Write it down. There may be omissions.
# USE = "berkdb" emerge python
# USE = "apache2 ssl" emerge apache
# Emerge sqlite
# Emerge pysqlite
# Emerge BerkeleyDB (this is also installed, but it seems that it is not berkeleydb4, but a perl interface)
# USE = "python zlib" clearsilver
# USE = "cgi fastcgi sqlite" emerge trac
# USE = "apache2 berkdb python" emerge subversion

Modify: berkeleydb should be sys-libs/db
# Emerge db
2. Create a svn repository (in/var/svn/test)
# Svnadmin create/var/svn/test

3. Create a trac Project
# Trac-admin/var/trac/test initenv
Some prompts will appear:
Project Name [My Project]> enter the Project Name
Database connection string [sqlite: db/trac. db]> press enter directly because sqlite is used before.
Repository type [svn]> Repository type svn press ENTER
Path to repository [/path/to/repos]> enter the/var/svn/test file in the repository Path and change it to your own.
Templates directory [/usr/share/trac/templates]> template path, or press ENTER
.....
Congratulations!

4. Configure the web server to run in trac-cgi Mode
# Vi/etc/apache2/httpd. conf
Add the following content at the end
### Trac settings
Alias/trac/chrome/common/usr/share/trac/htdocs

Order allow, deny
Allow from all

# Mod_cgi
ScriptAlias/trac/usr/share/webapps/trac/0.10.1/hostroot/cgi-bin/trac. cgi

# Mod_cgi
SetEnv TRAC_ENV_PARENT_DIR "/var/trac"
SetEnv TRAC_ENV_INDEX_TEMPLATE/var/trac/test/templates/index. cs


5. More detailed settings can be checked http://trac.edgewall.org/wiki/TracCgi

6. Configure DAV_SVN
# Vi/etc/apache2/modules. d/47_mod_dav_svn.conf
Add the following content

DAV svn
AuthType Basic
AuthName "Subversion repository"
SVNParentPath/var/svn
SVNListParentPath on
SVNAutoversioning on


# Vi/etc/conf. d/apache2
Add-d dav-D DAV_FS-d svn-D AUTHZ_SVN to "" After APACHE2_OPTS"
The last two of BTW are not the default ones. You can check IfDefine in/etc/apache2/modules. d/47_mod_dav_svn.conf.
If this is not the case, set/etc/apache2/modules. d/45_mod_dav.conf and/etc/apache2/modules. d/47_mod_dav_svn.conf.
Inside Commented out

7. Permission Configuration
Because the root account is used in the previous work, apache may not be able to write to the web server account.
Change the directory owner Group of the trac and svn projects to apache
# Chown apache. apache/var/trac-R
# Chown apache. apache/var/svn-R

8. Start apache2
# Apache2ctl start

9 for trac, visit http: // localhost/trac
Svn can access http: // localhost/svn in the browser or use svn co http: // localhost/svn/
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.