Changes between Initial Version and Version 1 of Quick-Start

Jan 25, 2021, 8:24:10 AM (17 months ago)



  • Quick-Start

    v1 v1  
     1==How to quickly get started with Trac on a new machine==
     3This will set up a Trac system at localhost/trac/foo and a SVN repository at localhost/svn/foo with a test user named bar.
     4You can change foo and bar to the names of your choosing, or create additional repositories and trac sites in parallel directories in the same manner.
     61. Get the .iso file for MX Linux. You can find it at DistroWatch. Many other distros would work but this was chosen because it's currently the top listed there, and because Mint had problems installing python modules.
     82. Get Virtualbox. You can get it at for free and install it and create a new virtual machine with it and install the .iso file. You now have a fresh operating system installation on the new virtual machine.
     103. Issue the following commands (you probably don't need all of these packages. Someone with time to eliminate the unnecessary ones and test please do so and shorten the list. This has not been tested since being generified)
     13sudo apt update -y
     14sudo apt full-upgrade -y,
     15sudo apt-get -y install g++ trac default-jdk figlet apache2 subversion gufw libapache2-mod-python libapache2-mod-svn apache2-utils python-subversion libsvn-java openssh-server dconf-editor glogg tree traceroute curl apparmor apparmor-utils libapache2-mod-svn python-setuptools python-jinja2 python3-pip jq python-configparser python-tk certbot python3-certbot-apache
     16sudo apt autoremove -y
     17sudo mkdir -m 2660 /srv/auth /var/www/svn /var/www/trac
     18sudo svnadmin create /var/www/svn/foo
     19sudo trac-admin /var/www/trac/foo initenv
     20sudo chmod -R g+rw /var/www/trac/
     21sudo chmod +x svn trac
     22sudo trac-admin /var/www/trac/foo config set components "tracopt.versioncontrol.svn.*" enabled
     23sudo trac-admin /var/www/trac/foo config set trac permission_policies AuthzSourcePolicy,ReadonlyWikiPolicy,DefaultPermissionPolicy,LegacyAttachmentPolicy
     24sudo trac-admin /var/www/trac/foo config set trac authz_file /srv/auth/authz
     25sudo trac-admin /var/www/trac/foo config set trac repository_dir /var/svn/foo
     26sudo trac-admin /var/www/trac/shared permission add bar
     28sudo reboot
     314. If you're running an actual system rather than a test site, you will want get a certificate for your domain name if you don't already have one. Then issue this command
     34certbot --apache
     37Enter your email, confirm, choose to redirect to https
     39As a result, you will visit the site at https:// with the domain name that you own instead of http:
     415. Create file files using the (sudo featherpad commmand)
     45  <Location /svn>
     46    AuthName                        "Auth"
     47    SVNParentPath      /var/www/svn
     48    SVNListParentPath  on
     49    AuthUserFile       /srv/auth/htpasswd
     50    AuthzSVNAccessFile /srv/auth/authz
     51    DAV svn
     52    AuthType Basic
     53    Require valid-user
     54  </Location>
     55  <Location /trac>
     56    SetHandler mod_python
     57    PythonHandler trac.web.modpython_frontend
     58    PythonOption TracUriRoot                  /trac
     59    PythonOption TracEnvParentDir /var/www/trac
     60  </Location>
     61  <Location /trac/foo/login>
     62    AuthType Basic
     63    AuthName "trac"
     64    AuthUserFile /srv/auth/htpasswd
     65    Require valid-user
     66  </Location>
     72* = r
     73bar = rw
     766. Issue these commands
     79sudo chown www-data:www-data -R /var/www/*
     80sudo htpasswd -c /var/www/auth/htpasswd  bar
     81sudo a2ensite trac.conf
     82sudo apache2ctl restart
     857. Browse the website at http://localhost/trac for the trac site, and https://localhost/svn for the svn site.
     87(Someone can add here an example of checking in some documents and browsing them, creating a trac ticket, etc. for first time users to follow, and change the script to create the files above using heredoc so the user only needs to paste a script and run it on a fresh install.)