Trac インストール(日本語版)


2.python バージョン確認

[root@lion Trac-0.11.4.ja1]# python -V
Python 2.5.1
[root@lion Trac-0.11.4.ja1]#


[king@lion Trac-0.11.4.ja1]$ ./
Traceback (most recent call last):
File “./”, line 15, in <module>
from setuptools import setup, find_packages
ImportError: No module named setuptools


[root@lion Trac-0.11.4.ja1]# wget
[root@lion Trac-0.11.4.ja1]# python
error: invalid Python installation: unable to open /usr/lib/python2.5/config/Makefile (No such file or directory)
[root@lion Trac-0.11.4.ja1]#



[root@lion Trac-0.11.4.ja1]# yum -y install python-devel


[root@lion Trac-0.11.4.ja1]# python
Processing setuptools-0.6c9-py2.5.egg
Copying setuptools-0.6c9-py2.5.egg to /usr/lib/python2.5/site-packages
Adding setuptools 0.6c9 to easy-install.pth file
Installing easy_install script to /usr/bin
Installing easy_install-2.5 script to /usr/bin

Installed /usr/lib/python2.5/site-packages/setuptools-0.6c9-py2.5.egg
Processing dependencies for setuptools==0.6c9
Finished processing dependencies for setuptools==0.6c9
[root@lion Trac-0.11.4.ja1]#

7.trac インストール再実行

[root@lion Trac-0.11.4.ja1]# ./ install

8.trac プロジェクト作成

[king@lion www]$ trac-admin trac initenv
Creating a new Trac environment at /var/www/trac

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

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/yuansu

Creating and Initializing Project
Installing default wiki pages
TracReports imported from /usr/lib/python2.5/site-packages/Trac-0.11.4.ja1-py2.5.egg/trac/wiki/default-pages/TracReports
TracSupport imported from /usr/lib/python2.5/site-packages/Trac-0.11.4.ja1-py2.5.egg/trac/wiki/default-pages/TracSupport
WikiDeletePage imported from /usr/lib/python2.5/site-packages/Trac-0.11.4.ja1-py2.5.egg/trac/wiki/default-pages/WikiDeletePage
SandBox imported from /usr/lib/python2.5/site-packages/Trac-0.11.4.ja1-py2.5.egg/trac/wiki/default-pages/SandBox
TracWiki imported from /usr/lib/python2.5/site-packages/Trac-0.11.4.ja1-py2.5.egg/trac/wiki/default-pages/TracWiki
Indexing repository
Project environment for ‘trac’ created.

You may now configure the environment by editing the file:


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/www/trac

Then point your browser to http://localhost:8000/trac.
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


[king@lion www]$

9.httpd.conf 設定

Alias /trac “/var/www/html/trac/”
<Location /trac>
SetHandler mod_python
PythonHandler trac.web.modpython_frontend
PythonOption TracEnv /var/www/html/trac
PythonOption TracUriRoot /trac
<Location /trac/login>
AuthType Basic
AuthName “Gedero Trac”
AuthUserFile /var/www/html/trac/auth/.htpasswd
Require valid-user

10.mod_python インストール

[root@lion html]# yum -y install mod_python


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s