Setting up trac wiki

This document describes how to set up a trac.edgewall.org trac wiki.
== Values and examples in this tutorial ==
The values tracadmin, example.com, secret and various paths and project names used in this tutorial are just examples. In most cases you can change them to something that suits you.
== Basic Trac installation and configuration ==
=== Installing Trac ===
Update apk repository and install 
=== Creating a Project Environment ===
We need to initiate a new environment
* Enter some project name when prompted
* Leave default sqlite DB (just press enter)
=== Configuring Authentication/Security ===
==== Create password-file ====
Initially you need to manually create a password file containing this information
 
Run the following command in case you are curious how the file looks like
(You should see something that looks like tracadmin:example.com:72842d9ffe3f4f63306a06756d2953ee)
==== Assign admin-rights ====
Next is to give admin-rights to your tracadmin account
=== Testing the Standalone Server ===
Lets test if your password-file and other configurations worked as they are supposed to.<BR>
In case something is broken, this test would give you a hint on what's wrong.
Try connect to trac with webbrowser on http://ip.of.the.box
If it works as expected, you can kill the above command (using CTRL+C in the terminal where the command was started) and continue reading this tutorial.
=== Configuration/Startup ===
==== Startup configuration ====
 needs to be edited in order for tracd to start.
==== File/folder permissions ====
Set file/folder permissions for the tracd user.
=== Manually start ===
Now it's time to fire up your trac.
(By this time you should be able to browse your tracd with a webbrowser pointed to http://ip.of.the.box)
=== Atomatically start at next boot ===
Make it start during boot.
=== Save your configuration ===
Now would be a good time make sure your configuration stays permanent. You wouldn't want to loose everything at next reboot.<BR>
Depending on how you setup your alpine host, this procedure is done differently.
==== When running from CD ====
If you are running alpine from a CD (as I did when writing this tutorial) you might want to save your configuration to a USB-mem.<BR>
But in order to backup the projects you would need to tell apk to take a copy of the running project(s). (see Alpine local backup#Execute a script as part of a backup about details on how such scripts are created)
In short: We create with the following content
And then we make the script executable
==== When running from HDD install ====
When using a HDD installed alpine, everything is written to HDD so you would not need to take any extra steps to save it permanent (except you might want to take backups in case your HDD gets broken).
=== Finished installing a basic trac system ===
If you only want a basic trac system you have now reached your goal.<BR>
Everything from now on is more or less optional.<BR>
If you are not in too much hurry I would suggest you continue reading below - you might find some things useful!
== Backup ==
To create a backup of a live TracEnvironment, simply run:
== Additional configuration and modifications ==
=== Advanced settings ===
 holds various settings that you might want to go through.<BR>
In order for those changes to take effect you would need to restart tracd
=== Running single or multiple projects ===
==== Multiple projects ====
Follow the steps mentioned in the above Creating a Project Environment and Configuring Authentication/Security sections to create a new project.<BR>
You might also need to change permissions for your newly created project - see File/folder permissions section for details.
Next you would need to modify in order to have multiple projects running on your trac server.<BR>
Personally I just added a line with the new TRACD_OPTS pointing to my new project:
When running as single-env you will automatically be routed to your trac-project instead of being presented a list of the available projects.
=== Install useful addons (trac hacks) ===
==== Prerequisites ====
In order to install trac-hacks you would need to install some additional applications.
===== During installation =====
During installation of a trac hack, you might get prompted about some certificate validity. Accept it to continue installation.
==== After applying a trac hack ====
When a trac hack is installed you will need to restart tracd before you can start configuring and using it.
===== Configuring a trac hack =====
When the trac hack is installed and tracd is rebooted you can browse to tracd and logon with your tracadmin account.<BR>
You should see a [Admin] option in the menu.<BR>
From the 'Admin' console you will find 'Plugins' from the Administration menu.
Start managing your plugins (you would most likely need to consult https://trac-hacks.org when doing your modifications/configuration of the various trac hacks).
==== Account Manager Plugin ====
Account Manager Plugin is used to manage accounts by using tracd interface instead of manually modify the file as we did when installing trac (https://trac-hacks.org/wiki/AccountManagerPlugin)
==== TracGit ====
GIT version control plugin for Trac 0.12 (https://trac-hacks.org/wiki/GitPlugin)
==== TracTags ====
Useful plugin to tag various pages/tickets/etc. You can use the 'tags' to find and sort your information (https://trac-hacks.org/wiki/TagsPlugin)
 
After you installed the plugin, restarted tracd and activated the plugin-components you will need to upgrade your project by issuing the following command
 
==== Other ====
There are lots of various plugins.<BR>
Have a look at https://trac-hacks.org/wiki#Hacks to find something that suits your needs.
=== Version control ===
Trac can do version control using subversion or git.
==== Subversion repository ====
We need to install 
Create a svn repository
Next we need to tell trac to view/show this repository.
Category:Server
Category:Programming