玄箱のDebianにtracを導入しました。
tracリポジトリの作成
$ cd /var/trac/home $ sudo trac-admin . initenv Creating a new Trac environment at /var/trac/home 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]> 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/subversion/svn 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]> ... 省略 ... You may now configure the environment by editing the file: /var/trac/home/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/home Then point your browser to http://localhost:8000/home. 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:Congratulations! $The Trac Project
オーナの変更
Apacheを使うのでオーナを変更しておきます。
$ sudo chown -R www-data:www-data home $ ls -l 合計 0 drwxr-xr-x 10 www-data www-data 142 2007-06-10 17:51 home $
Apache2の設定
http://サーバ/prjs/でアクセスできるように設定します。
$ cat /etc/apache2/sites-available/trac Alias /trac "/usr/share/trac/htdocs/" <Location "/prjs"> SetHandler mod_python PythonHandler trac.web.modpython_frontend PythonOption TracEnv /var/trac/home </Location> $ sudo a2ensite trac $ sudo /etc/init.d/apache2 reload
これでアクセスできるようになりました。