[OS]/Embedded&Linux

trac 설치

하늘을닮은호수M 2007. 8. 1. 17:48
반응형

Web Server

  • A CGI-capable web server (see TracCgi), or
  • a FastCGI-capable web server (see TracFastCgi), or
  • Apache with mod_python 3.1.3+ (see TracModPython)
    • When installing mod_python the development versions of Python and Apache are required (actually the libraries and header files)
  • Apache with mod_wsgi (see TracModWSGI)
    • While mod_wsgi is very new and somewhat experimental, this should work with Apache 1.3, 2.0 or 2.2 and promises to deliver more performance than using mod_python.

For those stuck with Apache 1.3, it is also possible to get Trac 0.8.4 working with mod_python 2.7 (see TracModPython2.7). This hasn't been tested with Trac 0.9, so it may or may not work.

Installation

[root@localhost var]# trac-admin /var/trac/juliet initenv
Creating a new Trac environment at /var/trac/juliet

Trac will first ask a few questions about your environment
in order to initalize 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]> juliet

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]>

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]> /var/svn/juliet

Please enter location of Trac page templates.
Default is the location of the site-wide templates installed with Trac.

Templates directory [/usr/share/trac/templates]>

Creating and Initializing Project
Installing default wiki pages
/usr/share/trac/wiki-default/TracWiki => TracWiki
/usr/share/trac/wiki-default/TracGuide => TracGuide
/usr/share/trac/wiki-default/InterWiki => InterWiki
/usr/share/trac/wiki-default/TracLogging => TracLogging
/usr/share/trac/wiki-default/TracBrowser => TracBrowser
/usr/share/trac/wiki-default/SandBox => SandBox
/usr/share/trac/wiki-default/TracSyntaxColoring => TracSyntaxColoring
/usr/share/trac/wiki-default/TracAccessibility => TracAccessibility
/usr/share/trac/wiki-default/TracCgi => TracCgi
/usr/share/trac/wiki-default/InterMapTxt => InterMapTxt
/usr/share/trac/wiki-default/TracUnicode => TracUnicode
/usr/share/trac/wiki-default/TracSearch => TracSearch
/usr/share/trac/wiki-default/TracFastCgi => TracFastCgi
/usr/share/trac/wiki-default/TracRss => TracRss
/usr/share/trac/wiki-default/TracQuery => TracQuery
/usr/share/trac/wiki-default/WikiHtml => WikiHtml
/usr/share/trac/wiki-default/TracInstall => TracInstall
/usr/share/trac/wiki-default/TracUpgrade => TracUpgrade
/usr/share/trac/wiki-default/TracIni => TracIni
/usr/share/trac/wiki-default/WikiDeletePage => WikiDeletePage
/usr/share/trac/wiki-default/TracChangeset => TracChangeset
/usr/share/trac/wiki-default/TracAdmin => TracAdmin
/usr/share/trac/wiki-default/TracPlugins => TracPlugins
/usr/share/trac/wiki-default/WikiNewPage => WikiNewPage
/usr/share/trac/wiki-default/WikiFormatting => WikiFormatting
/usr/share/trac/wiki-default/TracStandalone => TracStandalone
/usr/share/trac/wiki-default/WikiRestructuredTextLinks => WikiRestructuredTextLinks
/usr/share/trac/wiki-default/TracReports => TracReports
/usr/share/trac/wiki-default/CamelCase => CamelCase
/usr/share/trac/wiki-default/TracEnvironment => TracEnvironment
/usr/share/trac/wiki-default/TracTicketsCustomFields => TracTicketsCustomFields
/usr/share/trac/wiki-default/TracRevisionLog => TracRevisionLog
/usr/share/trac/wiki-default/WikiMacros => WikiMacros
/usr/share/trac/wiki-default/InterTrac => InterTrac
/usr/share/trac/wiki-default/TracPermissions => TracPermissions
/usr/share/trac/wiki-default/WikiPageNames => WikiPageNames
/usr/share/trac/wiki-default/TracModPython => TracModPython
/usr/share/trac/wiki-default/TracLinks => TracLinks
/usr/share/trac/wiki-default/TracTimeline => TracTimeline
/usr/share/trac/wiki-default/TitleIndex => TitleIndex
/usr/share/trac/wiki-default/TracSupport => TracSupport
/usr/share/trac/wiki-default/TracRoadmap => TracRoadmap
/usr/share/trac/wiki-default/TracImport => TracImport
/usr/share/trac/wiki-default/RecentChanges => RecentChanges
/usr/share/trac/wiki-default/WikiRestructuredText => WikiRestructuredText
/usr/share/trac/wiki-default/TracNotification => TracNotification
/usr/share/trac/wiki-default/WikiProcessors => WikiProcessors
/usr/share/trac/wiki-default/WikiStart => WikiStart
/usr/share/trac/wiki-default/TracTickets => TracTickets
/usr/share/trac/wiki-default/TracBackup => TracBackup
/usr/share/trac/wiki-default/TracInterfaceCustomization => TracInterfaceCustomization
Indexing repository
[3]
---------------------------------------------------------------------
Project environment for 'juliet' created.

You may now configure the environment by editing the file:

/var/trac/juliet/conf/trac.ini

If you'd like to take this new project environment for a test drive,
try running the Trac standalone web server `tracd`:

tracd --port 8000 /var/trac/juliet

Then point your browser to http://localhost:8000/juliet.
There you can also browse the documentation for your installed
version of Trac, including information on further setup (such as
deploying Trac to a real web server).

The latest documentation can also always be found on the project
website:

http://trac.edgewall.org/

Congratulations!

권한 설정

$ sudo chown -R apache /var/trac
$ sudo chown -R apache /var/svn

$ sudo chcon -R -t httpd_sys_content_t /var/trac
$ sudo chcon -R -t httpd_sys_content_t /var/svn

환경 설정

# The Location is the part after the host (http://example.com) that
# you want to serve the Trac site

SetHandler mod_python
PythonHandler trac.web.modpython_frontend
# "/svn/trac/foobar" is the folder you gave to trac-admin initenv earlier
PythonOption TracEnv /var/trac/foobar
# "/trac" is the same as the Location above
PythonOption TracUriRoot /trac
# "/tmp" should be some writable temporary directory
SetEnv PYTHON_EGG_CACHE /tmp
# "trac" can be any string, but must be the same for all
# Trac instances on the same Apache install
PythonInterpreter trac


AuthType Basic
AuthName "alexandria"
AuthUserFile /var/trac/conf/trac.htpasswd
Require valid-user


반응형