Adding additional Trac and SVN users is relatively simple. With Trac you can do this under Admin when logged in as an administrator thanks to the WebAdmin and AccountManagerPlugins! For adding a new subversion user just use this command:
htpasswd /etc/apache2/dav_svn.passwd john_smith
This user will then have access to all of your subversion repositories because of the way this server has been setup.
Share bookmark
To create a new Trac project follow these steps:
sudo -s -H
trac-admin /var/trac/project initenv
trac-admin /var/trac/project permission add admin TRAC_ADMIN
chown -R www-data:www-data /var/trac/project
Now to setup the new Trac project with the same plugins as the example project. This also uses the same password file. So use unique usernames and users spanning multiple projects will have the same password!
nano /var/trac/project/conf/trac.ini
Add the following to the file:
[components]
trac.web.auth.loginmodule = disabled
webadmin.* = enabled
customfieldadmin.* = enabled
acct_mgr.* = enabled
acct_mgr.web_ui.RegistrationModule = disabled
[account-manager]
password_format = htpasswd
password_store = HtPasswdStore
password_file = /var/trac/trac.htpasswd
Then restart Apache!
Now you should be able to point your browser to this addresses to see the new project!
- http://servername/trac/project/
Share bookmark
To create a new Subversion repository follow these steps:
mkdir /var/svn/project
mkdir ~/project
mkdir ~/project/branches
mkdir ~/project/tags
mkdir ~/project/trunk
svnadmin create /var/svn/project
svn import ~/project file:///var/svn/project -m "Initial directory import"
After this you’ll see the three directories added.
rm -rf ~/project
chown -R www-data:www-data /var/svn/project
apache2 -k restart
Now you should be able to point your browser to either of these addresses to see the new repository!
- http://servername/svn/project/
- http://servername/websvn/listing.php?repname=project
Share bookmark
Particularly if you’re publishing your SVN and Trac over the internet, you should change the defaults passwords for these that were in the VM you downloaded. To change the Subversion password:
htpasswd /etc/apache2/dav_svn.passwd admin
To change the Trac password (one file is currently used for all trac projects) :
htpasswd /var/trac/trac.htpasswd admin
Share bookmark
For security reasons if you’re using any downloaded VM you should not leave the default root password as provided. To change the password:
You’ll then be asked to enter the original password, then asked twice to enter the new password.
Share bookmark
Obviously it’s a bad idea to have a server assigned a different IP address by your DHCP server when it comes up. So here are some basic instructions to set a static IP address on this Ubuntu server.
sudo -s -H
vi /etc/network/interfaces
Then change the following line:
to:
iface eth0 inet static
address 192.168.1.100
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.254
This is an example only - Obviously you’ll need to work out what to use for each yourself
Share bookmark