Skip to content
Search

Trac:HowToInstall

lastmod 2020-08-26created 2015-04-237 edits

Notes on how to install TRAC.

WARNING

When integrating with httpd, use mod_wsgi instead of mod_python. 1

CentOS7 install

Install the Python development package and setuptools.

$ yum install python-devel
$ yum list search python-setuptools

Install Pip, then install Genshi for HTML rendering and Trac.

$ wget https://bootstrap.pypa.io/get-pip.py
$ sudo python get-pip.py
$ sudo pip install -U setuptools
$ sudo pip install Genshi
$ sudo pip install trac

Reconnect to the shell, then create a TRAC project.

$ mkdir /repo/trac/
$ cd /repo/trac/
$ trac-admin [PROJECT_NAME] initenv

Add a permission for administrator login.

$ sudo trac-admin </path/to/projenv> permission add <ID> TRAC_ADMIN

To integrate with httpd, install mod_wsgi and then integrate TRAC. See here for how.

Use chcon to adjust the SELinux security settings.

$ chcon -R -t httpd_sys_content_t /repo/trac
$ chcon -R -t httpd_sys_rw_content_t /repo/trac
$ chcon -R -t httpd_sys_content_t /repo/trac.egg
$ chcon -R -t httpd_sys_rw_content_t /repo/trac.egg

Of course, you also need to change the user and permissions to Apache.

$ chown -R apache:apache /repo/trac

See also

Favorite site

References