[CentOS] trac on CentOS 6

Fri Mar 7 00:29:33 UTC 2014
Paul Heinlein <heinlein at madboa.com>

On Thu, 6 Mar 2014, m.roth at 5-cent.us wrote:

> Paul Heinlein wrote:
>> On Thu, 6 Mar 2014, m.roth at 5-cent.us wrote:
>>
> Oh, sure: nothing special at all - I knew about it, but have never 
> set it up. Ah, the joys of Real pacakges and repositories - I did a 
> yum install trac-agilo-plugin, and everything's there.
>
> Now: I see it's added /etc/httpd/conf.d/trac.conf - does it really 
> have to be under /srv, or can I just create 
> /<real-path-to-web-stuff>/trac, and edit the trac.conf? Will that 
> get the basic up? Or, do I need to run trac-admin to create the 
> directory, or, again, do I create the directory and then run 
> trac-admin?

You can put your Trac(s) anywhere you like, of course. I put them in 
/srv:

/srv/trac/
├── bin
├── conf
├── plugins
├── share
├── sites
├── templates
└── tmp

The sites themselves live in sites/, while shared resources go in the 
other directories. I then adjust my selinux rules:

semanage fcontext -a -t httpd_sys_content_t "/srv/trac(/.*)?"
semanage fcontext -a -t httpd_sys_script_exec_t "/srv/trac/bin(/.*)?"
semanage fcontext -a -t httpd_config_t "/srv/trac/conf(/.*)?"

You need to run trac-admin to setup your site(s). Each site has its 
own conf/trac.ini file.

Trac's developers have seen fit to put some configuration bits into 
the trac.ini file, while some live in the database. If you like to 
keep your configuration files in a repository, then you'll need to do 
edit/push for trac.ini and web-based actions for the stuff that lives 
in the database.

Will you have an associated code repository (git or svn)? That calls 
for some other thinking.

-- 
Paul Heinlein
heinlein at madboa.com
45°38' N, 122°6' W