Setting up trac wiki: Difference between revisions
(update to 1.10.6) |
(added instructions to install SVN and connect it in Trac installation) |
||
Line 5: | Line 5: | ||
You can use whatever settings you like. | You can use whatever settings you like. | ||
{| style="width: 450px; background-color: #f8f8f8; border: 1px #ccc solid;" | {| style="width: 450px; background-color: #f8f8f8; border: 1px #ccc solid;" | ||
|'''Path to project:''' | |'''Path to Trac project:''' | ||
|/var/lib/trac/myproject | |/var/lib/trac/myproject | ||
|- | |- | ||
Line 19: | Line 19: | ||
|'''Password file:''' | |'''Password file:''' | ||
|/var/lib/trac/myproject/users.realm | |/var/lib/trac/myproject/users.realm | ||
|- | |||
|'''Subversion path''' | |||
|/var/lib/subversion/myproject | |||
|} | |} | ||
== Installing Trac == | == Installing Trac == | ||
{{Cmd|apk add trac}} | {{Cmd|apk add trac}} | ||
== Create a Subversion repository == | |||
Next we create an SVN repository to be connected to Trac: | |||
{{Cmd|mkdir /var/lib/subversion}} | |||
{{Cmd|svnadmin create /var/lib/subversion/myproject}} | |||
== Creating a Project Environment == | == Creating a Project Environment == | ||
Line 28: | Line 36: | ||
{{Cmd|trac-admin /var/lib/trac/myproject initenv}} | {{Cmd|trac-admin /var/lib/trac/myproject initenv}} | ||
* Enter some project name when prompted | * Enter some project name when prompted | ||
* Leave default sqlite DB (just press enter) | |||
* Enter 'svn' as repository type | |||
* Enter subversion repository path: /var/lib/subversion/myproject | |||
== Configuring Authentication/Security == | == Configuring Authentication/Security == |
Revision as of 08:28, 16 July 2010
This document describes how to set up a Trac wiki. It is based on alpine 1.10.6 and should also be compatible with newer version.
General notes on this tutorial
In this tutorial we use these settings. These values will re-appear in various places in the upcoming example.
You can use whatever settings you like.
Path to Trac project: | /var/lib/trac/myproject |
Username: | tracadmin |
Realm: | example.com |
Password: | secret |
Password file: | /var/lib/trac/myproject/users.realm |
Subversion path | /var/lib/subversion/myproject |
Installing Trac
apk add trac
Create a Subversion repository
Next we create an SVN repository to be connected to Trac:
mkdir /var/lib/subversion
svnadmin create /var/lib/subversion/myproject
Creating a Project Environment
Now lets initiate the environment
trac-admin /var/lib/trac/myproject initenv
- Enter some project name when prompted
- Leave default sqlite DB (just press enter)
- Enter 'svn' as repository type
- Enter subversion repository path: /var/lib/subversion/myproject
Configuring Authentication/Security
Create password-file
You need to create a password file containing this information
echo -n "tracadmin:example.com:secret" | md5sum >> /var/lib/trac/myproject/users.htdigest
Now you need to edit the passwordfile '/var/lib/trac/myproject/users.htdigest' and append the username and realm in plaintext.
tracadmin:example.com:72842d9ffe3f4f63306a06756d2953ee
Admin-rights
Next is to give admin-rights to your 'tractester' account
trac-admin /var/lib/trac/myproject permission add tractester TRAC_ADMIN
Running/Testing the Standalone Server
Lets test if your password-file and other configurations worked as they are supposed to.
In case something is broken, this test would give you a hint on what's wrong.
tracd --port 8000 --auth=*,/var/lib/trac/myproject/users.htdigest,example.com /var/lib/trac/myproject
Try connect to trac with webbrowser on http://localhost:8000
Configuration/Startup
Edit '/etc/conf.d/tracd' and configure your variables
TRACD_PORT="80" TRACD_OPTS="--auth=*,/var/lib/trac/myproject/users.htdigest,example.com /var/lib/trac/myproject"
Set ownership to be tracd
chown -R tracd:tracd /var/lib/trac
Configuration/Startup
Now you could start customizing your trac by editing '/var/lib/trac/myproject/conf/trac.ini'.
Startup
Now it's time to fire up your trac.
/etc/init.d/tracd start
Backup
To create a backup of a live TracEnvironment, simply run:
trac-admin /var/lib/trac/myproject hotcopy /path/to/backupdir
Boot
Make it start during boot.
rc-update add tracd