Install trac dependencies
what we did was :
| # apt-get install trac |
this installs trac and app its dependencies
then
| # apt-get remove trac |
:P
Install the new trac from trac SVN repository
goto to your favourite source download place
| # cd /usr/local/src |
do the subversion check out
| # svn co http://svn.edgewall.org/repos/trac/trunk trac |
go into the newly created directory
| # cd trac |
run the install file
| # python setup.py install |
Now create your trac project environment
We have decided to put our project in /var/trac
Thus we that's where we create our files.
| # trac-admin /var/trac |
go there
| # cd /var/trac |
Install Your Plugins
Trac without plugins is like a coconut without a kernel :P:P:P
We installed Trac Account Manager plugin (from the trac subversion directly)
| # easy_install http://trac-hacks.org/svn/accountmanagerplugin/trunk |
User Creation Steps
In /var/trac or some other good place
| # touch create.py |
it should contain :
#!/usr/bin/python
from optparse import OptionParser
import md5
# build the options
usage = "usage: %prog [options]"
parser = OptionParser(usage=usage)
parser.add_option("-u", "--username",action="store", dest="username", type = "string",
help="the username for whom to generate a password")
parser.add_option("-p", "--password",action="store", dest="password", type = "string",
help="the password to use")
(options, args) = parser.parse_args()
# check options
if (options.username is None) or (options.password is None):
parser.error("You must supply both the username and password")
# Generate the string to enter into the htdigest file
realm = 'gnowledge.org'
kd = lambda x: md5.md5(':'.join(x)).hexdigest()
print ':'.join((options.username, realm, kd([options.username, realm, options.password])))
create the admin user
1st give the trac admin root" access over your project
| # trac-admin /var/trac permission add admin TRAC_ADMIN |
The script must be executable by the current user at the very least.
| # chmod 0755 create.py |
Now we finally create the user
| # python create.py -u admin -p my_obnoxiousnly_complex_password |
and you see something like this :
admin:gnowledge.org:5880b01bdad1853347e8302109121b65
Please append this line to your /var/trac/.htdigest file
That's It. Now restart trac and click Login.
Then enjoy!!!
