About: it’s an open-source tracker tool.

Step1. Install epel repository

yum install -y epel-release

Step2. Install Trac and mod_wsgi

yum install -y trac mod_wsgi

Step3. Allow on firewall

firewall-cmd --add-service=http --permanent
firewall-cmd --reload

Step4. Enable httpd in SELinux

setsebool -P httpd_unified on

Step5. Create a project root directory

mkdir /var/lib/trac
mkdir /var/www/html/trac
chown apache:apache /var/www/html/trac

Step6. Create a project

trac-admin /var/lib/trac/test initenv test sqlite:db/trac.db
trac-admin /var/lib/trac/test deploy /var/www/html/trac/test

Step7. Change ownership

chown -R apache:apache /var/lib/trac/test
chown -R apache:apache /var/www/html/trac/test

Step8. Allow httpd in SELinux

chcon -R -t httpd_sys_content_t /var/lib/trac/test

Step9. Create user

htdigest -c /var/lib/trac/test/.htdigest "test" admin

Step10. Add permission to admin

trac-admin /var/lib/trac/test permission add admin TRAC_ADMIN
htdigest /var/lib/trac/test/.htdigest "test" hiroom2

Step11. Create a virtual host file

cat /etc/httpd/conf.d/test.conf
WSGIScriptAlias /trac/test /var/www/html/trac/test/cgi-bin/trac.wsgi
<Location /trac/test>
AuthType Digest
AuthName "test"
AuthUserFile /var/lib/trac/test/.htdigest
Require valid-user
</Location> 

Step12. Restart apache

systemctl restart httpd

Step13. Access via browser

http://ip/trac/test

LEAVE A REPLY

Please enter your comment!
Please enter your name here