BitNami Trac

    Trac is an enhanced wiki and issue tracking system for software development projects. Trac uses a minimalistic approach to web-based software project management. The project’s mission is to help developers write great software while staying out of the way. Trac should impose as little as possible on a team’s established development process and policies. It provides an interface to Subversion, an integrated Wiki and convenient reporting facilities.

    Please, take a look to the Quick Start Guide to know the basic use of this Stack.

    How to start/stop the servers?

    Graphical tool

    The Stacks include a graphical tool to manage the servers easily. You can find the "manager-windows.exe", "manager-osx" or "manager-linux" tool in your installation directory. Using this tool, you can Start, Stop or Restart the servers and check the log files. You can click on the icon to start it.

    manager-servers.png

     

    manager-osx.png

     

     

     

     

     

     

     

     

     


    win_platform.png

    On Windows: You can also start the Manager tool from shortcuts: Start -> Program Files -> BitNami Stack -> Manager tool

    Command line tool

    If you prefer, you can use the "ctlscript.sh" utility from the command line. This script is in the installation directory.

    linux_platform.png

    On Virtual Machines and Cloud images:

    $ sudo /opt/bitnami/ctlscript.sh start

    A native installer on Linux:

    $ cd ~/application-version
    $ ./ctlscript.sh start
    

    mac_platform.png

     

    On OS X: You can start the Manager tool from the installation directory or you can use the "ctlscript.sh" utility from a Terminal.

    host:~ user$ cd /Applications/application-version
    host:~ user$ ./ctlscript.sh start

    How to add a new project to the Bitnami Trac setup?

    First, load the environment settings by typing from the command line:

    on Linux  linux_platform.png  and OS X mac_platform.png

    $ cd installdir
    $ ./use_trac
    

    on Windows win_platform.png

    Start Menu —> BitNami Trac Stack —> Use BitNami Trac Stack

    Now, to create the project, type

    trac-admin <path_to_project> initenv
    

     
    substituting <installation directory> and <path_to_project> accordingly.

    In order to make your project automatically appear in the "Available Projects" web page, assure that the <path_to_project> is a location directly placed under your BitNami Trac Stack projects folder.

    Where can I find the trac.ini file?


    You will find the trac.ini file for each project in the project directory in the conf folder.
     

    How to upgrade Trac python package?

    Open the BitNami Console to load the Bitnami environment if you are using the Native Installer. If you are using the Virtual Machine or the Cloud Image is not necessay.

    On Linux and Mac OS X execute:

    easy_install -a --prefix="installdir/apps/trac" -d "installdir/apps/trac/lib" -s "installdir/apps/trac/Scripts" --upgrade Trac==X.Y.Z

    On Windows execute:

    easy_install -a --prefix="installdir\apps\trac" -d "installdir\apps\trac\Lib\site-packages" -s "installdir\apps\trac\Scripts" --upgrade Trac==X.Y.Z
    

    Notice that installdir refers to the installation directory which in virtual machines and cloud images is /opt/bitnami.

     
    Then you'll have to upgrade your project:
    trac-admin "path/to/your/project" upgrade
    trac-admin "path/to/your/project" wiki upgrade
    
     

    How can I remove the list of available projects page?

    Native Installer

    By default BitNami Trac Stack is configured so you can see the list of available projects in http://your_domain:port/trac. If you plan to run Trac in a single-project mode you can hide this page. You will need to make changes in /installdir/apps/trac/conf/trac.conf file and in /installdir/apps/trac/scripts/trac.wsgi file.

    Edit  /installdir/apps/trac/conf/trac.conf file removing "/[^/]+" from the LocationMatch directive.

    #<LocationMatch "/trac/[^/]+/login">
    <LocationMatch "/trac/login">
      AuthType Basic
      AuthName "Trac"
      AuthUserFile "/installdir/apps/trac/conf/htpasswd"
      Require valid-user
    </LocationMatch>
    

    Then edit /installdir/apps/trac/scripts/trac.wsgi and replace the TRAC_ENV_PARENT_DIR definition with TRAC_ENV poiting to your project folder.

    #os.environ['TRAC_ENV_PARENT_DIR'] = '/installdir/apps/trac/trac_projects'
    os.environ['TRAC_ENV'] = '/installdir/apps/trac/trac_projects/Project'
    

    After these changes restart your Apache server.

    Virtual Machine

    By default BitNami Trac Stack is configured so you can see the list of available projects in http://your_domain:port/trac. If you plan to run Trac in a single-project mode you can hide this page. You will need to make changes in /opt/bitnami/apps/trac/conf/trac.conf file and in /opt/bitnami/apps/trac/scripts/trac.wsgi file.

    Edit  /opt/bitnami/apps/trac/conf/trac.conf file removing "/[^/]+" from the LocationMatch directive.

    $ sudo nano /opt/bitnami/apps/trac/conf/trac.conf
    

     

    #<LocationMatch "/trac/[^/]+/login">
    <LocationMatch "/trac/login">
      AuthType Basic
      AuthName "Trac"
      AuthUserFile "/opt/bitnami/apps/trac/conf/htpasswd"
      Require valid-user
    </LocationMatch>
    

     

    Then edit /opt/bitnami/apps/trac/scripts/trac.wsgi and replace the TRAC_ENV_PARENT_DIR definition with TRAC_ENV poiting to your project folder.

    $ sudo nano /opt/bitnami/apps/trac/scripts/trac.wsgi
    

     

    #os.environ['TRAC_ENV_PARENT_DIR'] = '/opt/bitnami/apps/trac/trac_projects'
    os.environ['TRAC_ENV'] = '/opt/bitnami/apps/trac/trac_projects/Project'
    

     

    After these changes restart your Apache server.

    Cloud Image/BitNami Hosting

    By default BitNami Trac Stack is configured so you can see the list of available projects in http://your_domain:port/trac. If you plan to run Trac in a single-project mode you can hide this page. You will need to make changes in /opt/bitnami/apps/trac/conf/trac.conf file and in /opt/bitnami/apps/trac/scripts/trac.wsgi file.

    Edit  /opt/bitnami/apps/trac/conf/trac.conf file.

    $ sudo nano /opt/bitnami/apps/trac/conf/trac.conf
    

    You can also edit this file from your favorite FTP program. For instance, if you are using winSCP to connect to your instance you can do the following for edit files as root user. You can click on "Advanced options" -> "Environment" -> "SCP/Shell" -> "sudo su -". Please note that you have to choose SCP protocol in the main WinSCP session window.

     

    Remove "/[^/]+" from the LocationMatch directive.
     

    #<LocationMatch "/trac/[^/]+/login">
    <LocationMatch "/trac/login">
      AuthType Basic
      AuthName "Trac"
      AuthUserFile "/opt/bitnami/apps/trac/conf/htpasswd"
      Require valid-user
    </LocationMatch>
    

    Then edit /opt/bitnami/apps/trac/scripts/trac.wsgi and replace the TRAC_ENV_PARENT_DIR definition with TRAC_ENV poiting to your project folder.

    $ sudo nano /opt/bitnami/apps/trac/scripts/trac.wsgi
    

     

    #os.environ['TRAC_ENV_PARENT_DIR'] = '/opt/bitnami/apps/trac/trac_projects'
    os.environ['TRAC_ENV'] = '/opt/bitnami/apps/trac/trac_projects/Project'
    

     

    After these changes restart your Apache server.

    Tabs end

    How to change the default URL?

    Automatic Approach

    This approach is based on the Bitnami Configuration Tool (bnconfig).

    Bitnami Cloud Hosting

    The best way to change your URL in BCH is to go to your application tab and modify it there. In the Bitnami Cloud Hosting console, select Servers, choose your server, Manage and go to the Applications tab. Press there the pencil next to the application which URL you want to modify and choose .

    Cloud Images and Virtual Machines

    Moving the application to /

     If your application is running in "/trac" you can remove the prefix from the URL executing the following command:

    $ sudo /opt/bitnami/apps/trac/bnconfig --appurl /
    

    (use --help to check if that option is available for your application)

    Now you will be able to access to the application at http://YOUR_DOMAIN instead of http://YOUR_DOMAIN/trac.

    Updating the IP or hostname

    Some applications require to update the IP/domain if the machine IP/domain changes. The bnconfig tool also has an option which updates the IP automatically during boot, called machine_hostname (use --help to check if that option is available for your application). Note that this tool changes the URL to http://NEW_DOMAIN/trac

    sudo /opt/bitnami/apps/trac/bnconfig --machine_hostname NEW_DOMAIN
    

    If you already moved your application to the root URL you should include both options at the same time.

    sudo /opt/bitnami/apps/trac/bnconfig --appurl / --machine_hostname NEW_DOMAIN

     

    If you have configured your machine to use an static domain name or IP, you should rename or remove the "/opt/bitnami/apps/trac/bnconfig" file.

    sudo mv /opt/bitnami/apps/trac/bnconfig /opt/bitnami/apps/trac/bnconfig.disabled

     

    Native Installer

    Remember to use your actual installation directory instead of installdir.

    Moving the application to /

    If your application is running in "/trac" you can remove the prefix from the URL executing the following command:

    On Linux,

    installdir/apps/trac/bnconfig --appurl /
    

    On Mac OS X, 

    installdir/apps/trac/bnconfig.app/Contents/MacOS/installbuilder.sh --appurl /
    

    On Windows,

    installdir/apps/trac/bnconfig.exe --appurl /
    

    (use --help to check if that option is available for your application)

    Now you will be able to access to the application at http://YOUR_DOMAIN instead of http://YOUR_DOMAIN/trac.

    Updating the IP or hostname

    Some applications require to update the IP/domain if the machine IP/domain changes. The bnconfig tool also has an option which updates the IP automatically during boot, called machine_hostname (use --help to check if that option is available for your application). Note that this tool changes the URL to http://NEW_DOMAIN/trac.

    installdir/apps/trac/bnconfig --machine_hostname NEW_DOMAIN
    

    If you already moved your application to the root URL you should include both options at the same time.

    installdir/apps/trac/bnconfig --appurl / --machine_hostname NEW_DOMAIN
    

     

    If you have configured your machine to use an static domain name or IP, you should rename or remove the "/opt/bitnami/apps/trac/bnconfig" file.

    mv installdir/apps/trac/bnconfig installdir/apps/trac/bnconfig.disabled
    

    Tabs end

    Manual Approach

    Native Installer

    By default BitNami Trac Stack is configured so you can see the list of available projects in http://your_domain:port/trac. If you want to change the default URL from http://your_domain:port/trac to http://your_domain:port, you should modify the "DocumentRoot" in the httpd.conf file to point to the "trac_projects" folder.

    The default Apache document root directory is /installdir/apache2/htdocs folder. You can change the document root in the /installdir/apache2/conf/httpd.conf file:

    ...
    #
    # DocumentRoot: The directory out of which you will serve your
    # documents. By default, all requests are taken from this directory, but
    # symbolic links and aliases may be used to point to other locations.
    #
    DocumentRoot "/installdir/apache2/htdocs"
    ...
    
    

     

    You also need to modify /installdir/apps/trac/conf/trac.conf file removing  /trac from the url in the LocationMatch and WSGIScriptAlias directives . 

    #<LocationMatch "/trac/[^/]+/login">
    <LocationMatch "/[^/]+/login">
      AuthType Basic
      AuthName "Trac"
      AuthUserFile "/installdir/apps/trac/conf/htpasswd"
      Require valid-user
    </LocationMatch>
    
    ### TRAC MOD_WSGI_CONFIGURATION ###
    #WSGIScriptAlias /trac "/installdir/apps/trac/scripts/trac.wsgi"
    WSGIScriptAlias / "/installdir/apps/trac/scripts/trac.wsgi"
    
    

     

    After these changes restart your Apache server.

    Virtual Machine

    By default BitNami Trac Stack is configured so you can see the list of available projects in http://your_domain:port/trac. If you want to change the default URL from http://your_domain/trac to http://your_domain, you should modify the "DocumentRoot" in the httpd.conf file to point to the "trac_projects" folder.

    The default Apache document root directory is /opt/bitnami/apache2/htdocs folder. You can change the document root in the /opt/bitnami/apache2/conf/httpd.conf file:

    $ sudo nano /opt/bitnami/apache2/conf/httpd.conf
    

    and edit the following line:

    ...
    # 
    # DocumentRoot: The directory out of which you will serve your
    # documents. By default, all requests are taken from this directory, but
    # symbolic links and aliases may be used to point to other locations.
    # 
    DocumentRoot "/opt/bitnami/apache2/htdocs"
    

    You also need to modify /opt/bitnami/apps/trac/conf/trac.conf file removing  /trac from the url in the LocationMatch and WSGIScriptAlias directives . 

    $ sudo nano /opt/bitnami/apps/trac/conf/trac.conf
    

     

    #<LocationMatch "/trac/[^/]+/login">
    <LocationMatch "/[^/]+/login">
      AuthType Basic
      AuthName "Trac"
      AuthUserFile "/opt/bitnami/apps/trac/conf/htpasswd"
      Require valid-user
    </LocationMatch>
    
    ### TRAC MOD_WSGI_CONFIGURATION ###
    #WSGIScriptAlias /trac "/opt/bitnami/apps/trac/scripts/trac.wsgi"
    WSGIScriptAlias / "/opt/bitnami/apps/trac/scripts/trac.wsgi"
    
    

     

    After these changes restart your Apache server.

    Cloud Image/BitNami Hosting

    By default BitNami Trac Stack is configured so you can see the list of available projects in http://your_domain:port/trac. If you want to change the default URL from http://your_domain/trac to http://your_domain, you should modify the "DocumentRoot" in the httpd.conf file to point to the "trac_projects" folder.

    The default Apache document root directory is /opt/bitnami/apache2/htdocs folder. You can change the document root in the /opt/bitnami/apache2/conf/httpd.conf file:

    $ sudo nano /opt/bitnami/apache2/conf/httpd.conf
    

    You can also edit this file from your favorite FTP program. For instance, if you are using winSCP to connect to your instance you can do the following for edit files as root user. You can click on "Advanced options" -> "Environment" -> "SCP/Shell" -> "sudo su -". Please note that you have to choose SCP protocol in the main WinSCP session window.

    This is the exact line that you should modify.

    ...
    # 
    # DocumentRoot: The directory out of which you will serve your
    # documents. By default, all requests are taken from this directory, but
    # symbolic links and aliases may be used to point to other locations.
    # 
    DocumentRoot "/opt/bitnami/apache2/htdocs"
    ...
    

     

    You also need to modify /opt/bitnami/apps/trac/conf/trac.conf file removing  /trac from the url in the LocationMatch and WSGIScriptAlias directives . 

    $ sudo nano /opt/bitnami/apps/trac/conf/trac.conf
    

     

    #<LocationMatch "/trac/[^/]+/login">
    <LocationMatch "/[^/]+/login">
      AuthType Basic
      AuthName "Trac"
      AuthUserFile "/opt/bitnami/apps/trac/conf/htpasswd"
      Require valid-user
    </LocationMatch>
    
    ### TRAC MOD_WSGI_CONFIGURATION ###
    #WSGIScriptAlias /trac "/opt/bitnami/apps/trac/scripts/trac.wsgi"
    WSGIScriptAlias / "/opt/bitnami/apps/trac/scripts/trac.wsgi"
    
    

     

    After these changes restart your Apache server.

     

    Tabs end

    How to enable SSL?

    You can see how to configure Apache to enable SSL connections at How to enable SSL to access through https?

    How to debug errors?

    Once Apache starts, it will create two log files, the access_log and the error_log /installdir/apache2/logs directory or in /var/log/httpd if you are using Amazon Linux or Red Hat Enterprise cloud images.

    In Virtual Machines, Cloud Images and Ubuntu based Bitnami Cloud Hosting images installdir is /opt/bitnami.

    The access_log file is used to track client requests. When a client requests a document from the server, Apache records several parameters associated with the request in this file, such as: the IP address of the client, the document requested, the HTTP status code, and the current time.

    The error_log file is used to record important events. This file includes error messages, startup messages, and any other significant events in the life cycle of the server. This is the first place to look when you run into a problem when using Apache.

    If no error is found, you will see a message similar to:

    Syntax OK
    /installdir/ctlscript.sh : httpd started
    

    How to configure the email settings of Trac?

    You can configure the SMTP settings of your Trac projects in their trac.ini file, which you can find in /opt/bitnami/apps/trac/trac_projects/Project/conf/trac.ini (change /opt/bitnami for your installation directory).

    In the notification section, modify the fields according to your SMTP provider. In the Gmail case, the configuration should be similar to this

     

    [notification]
    smtp_enabled = true
    use_tls = true
    mime_encoding = base64
    smtp_server = smtp.gmail.com
    smtp_port = 587
    smtp_user = user
    smtp_password = password
    

     

    Where user and password are your Gmail credentials.

    Tag page (Edit tags)
    Page statistics
    34963 view(s), 11 edit(s) and 17231 character(s)

    Comments

    You must login to post a comment.

    Attach file

    Attachments