Tutorial on installing and configuring Trac in windows

Source: Internet
Author: User
Tags anonymous

All the friends who have submitted wordpress themes/plug-ins have seen Trac, which is known for its ugly interface, strong bug tracking, and convenient comments. However, Trac may be used less often, like me, the whole article may be confused in the cloud without a screenshot. Fortunately, after a day of hard work, we finally set up Trac. Here we will record the installation process so that you can check it later or give a prompt to any friends who encounter problems.

Environment Construction

I tested windows XP 32-bit (why haven't I upgraded it ......), Trac uses standalone (?) The Independent version is the version that has not been used on the server.

Trac is developed using python. Therefore, you need to have a python environment before installation. You will not need to talk about installing and setting variables. The official requirements are> = 2.5. I have no problem using 2.7 here.

In addition, Trac needs Genshi, a template generation tool developed by the same company. Click [here] to download and install Windows.

Possible error: UnicodeDecodeError: 'ascii 'codec can't decode byte 0xd7 in position 9: ordinal

Solution: add an error in the file header

#-*-Coding: gbk -*-

Import sys

Reload (sys)

Sys. setdefaultencoding ('gbk') # utf cannot work but can only be changed to gbk

Install Trac, go to the code directory from the command line, run python setup. py install, or install easy_install Trac directly (easy_install is required.

Configure Trac

Run the following command in cmd:

1. mkdir C: trac. This step is used to set an independent project location.

2. cd C: Python2xscripts

3. Select trac-admin trac initenv and press enter to display the environment configuration options. Enter the project name, database connection, svn, and default settings as prompted)

4. tracd-port 8000 C: trac

5. Visit http: // localhost: 8000

In this way, we can see what Trac looks like, but we still need to set it in some places, such as no login button and no plug-in configuration.

Install the account management plug-in

1. Click [here] to find the Stable Version and click download.

Run cmd to download the Account Manager Directory. install this plug-in python setup. py install.

2. Run cd in C: Python2xscripts (your own python installation directory), and enter trac-admin C: trac permission add anonymous TRAC_ADMIN to enable anonymous access control.

3. Open the project directory C: trac, find the conftrac. ini configuration file, and enter the following content in front of the [header_logo] line:

[Components]
Acct_mgr.admin.accountmanageradminpages = enabled
Acct_mgr.api.accountmanager = enabled
Acct_mgr.db.sessionstore = enabled
Acct_mgr.htfile.htdigeststore = enabled
Acct_mgr.pwhash.htdigesthashmethod = enabled
Acct_mgr.web_ui.accountmodule = enabled
Acct_mgr.web_ui.loginmodule = enabled
Acct_mgr.web_ui.registrationmodule = enabled
Trac. web. auth. loginmodule = disabled

Save and exit.

4. Create a blank file passwords.txt in the same directory.

5. Open cmd and enter tracd -- port 8000 C: trac to start. Open the browser and enter http: // localhost: 8000/trac/admin to go to the configuration page.

At this point, we can see that the management tag headed by Plugin is already on the left. Below are some settings.

(1) click Plugin on the left and select AccountManagerAdminPanel from the Component that appears on the right. Refresh the page and you will see the Accounts option on the left:

 

 

(2) click "Configuration" on the left to configure the account and keep it as follows:

 

 

(3) access Users in Configuration on the left, add a user, and set the permission to TRAC_ADMIN:

 

 

(4) remove anonymous management permissions:

 

 

After the above configuration, refresh the page again to log on to TRAC as an administrator.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.