Toggle navigation

Trac Image Guide

Version 1.2.2

Websoft9 Trac is a pre-configured, ready to run image for running Trac on Alibaba Cloud.

Trac is a minimalistic approach to web-based management of software projects. Its goal is to simplify effective tracking and handling of software issues, enhancements and overall progress.All aspects of Trac have been designed with the single goal to help developers write great software while staying out of the way and imposing as little as possible on a team’s established process and culture.

Application Software(Trac1.2.2,SVN)
Trac poject directory: /data/trac
Trac configuration file: /data/trac/conf/trac.ini
Trac static resources directory: /data/wwwroot/trac

Application Server(Apache2.4,Subversion1.9.3,Python2.7)
Apache2-mod-Python: /etc/apache2/mods-available/dav_svn.conf
Apahce2-Trac configuration file: /etc/apache2/sites-available/trac.conf
SVN Warehouse directory: /data/svn
Apache Log Files:/var/log/apache2

Database(SQLLite3)
Database install directory: /usrb/python2.7/sqlite3
Database data directory: /data/trac/db

After the installation of Image,please verify it

  • Login on Alibaba Cloud console,get you Internet IP Address
  • Open you Chrome or Firefox on your local PC,visit the http://Internet IP Address/
  • If verify successfully,you can enter the Apache default welcome page of this Image
  • If no response from browser,please check the Security Group settings to ensure that port 80 is been allowed

Using Chrome or Firefox to visit: http://Internet IP Address/ to start using this application.Following is the steps:

  1. Visit http://Internet IP Address or http://yourdomain to enter the login in page directly(User Name is: admin,Password is admin)
  2. Click the “OK” and Log in to backend of Trac below:

Three usernames and passwords are required for application installation, application using, andapplication maintenance:

1、Trac:Username is admin password is admin
Backend URL:http://Internet IP Address/trac
3、Linux Server:Username is root,Password is set by youself when buying.You can reset the password through console and restart the Server if you have forgotten it.Please Using the Putty for Remote and WinSCP for SFTP

Plugin is the functions enhancement for application,how to use Trac’s plugin?

  1. Visit https://trac.edgewall.org/wiki/PluginList and download the plugin you want to use
  2. Login the Trac as Administrator,admin->Plugins,Browse the plugin pack(.egg) and Install it

Routine backup (archives) of the database and application setup is essential to ensure failover is smooth.

Backup is based on the server snapshot automatic backup and manual local backup in two ways, both of which have their own advantages and disadvantages, it is recommended to use together

Automatic Backup by Snapshot of Server

IaaS provider have the “snapshot” function for Server, the snapshot is for the server disk. Snapshot tool can record the specified point in time the hard disk data, all backed up, and can achieve a key recovery.

If you have an automatic snapshot of the disk settings, the following scenes you can be more calm face:

  • Work a few days of the results, was mistakenly deleted
  • Hackers damage your site
  • The content has been messed up

Done a snapshot backup, a key to restore to the backup point of time state. That is, on-site reduction, very good function.

Different cloud vendor snapshot settings slightly different, specific reference:

Manual Backup

Trac backups are a copied snapshot of the entire /data/trac directory, including the database. Backups can be created using the hotcopy command of trac-admin.

Note: Trac uses the hotcopy nomenclature to match that of Subversion, to make it easier to remember when managing both Trac and Subversion servers.

Backup

Create a backup of a live TracEnvironment by running:

$ trac-admin /data/trac hotcopy /data/backupdir

The database will be locked while hotcopy is running.

The resulting backup directory is safe to handle using standard file-based backup tools like tar or dump/restore.

Please note, the hotcopy command will not overwrite a target directory. When the target exists the operation will end with an error

Restoring a Backup

To restore an environment from a backup, stop the process running Trac, ie the web server or tracd, restore the contents of your backup to your project environment directory and restart the process.

 

Before upgrade you should put the site down for maintenance and always Backup your code, data and config files.

It is highly recommended to temporarily disable any third party themes and user CSS customizations before upgrading. Don’t forget to empty your browser cache if you experience weird bugs right after upgrading.

Note that you should upgrade to the latest version available, installing intermediate releases sequentially is not needed.

More details:https://trac.edgewall.org/wiki/TracUpgrade

Using the follow command,you can add new user for Trac

~# htpasswd -c /etc/apache2/dav_svn.passwd user_name #add user/modify password
~# sudo vim /etc/apache2/dav_svn.authz
 [/]
 user_name=rw
#enable the read and write authority of user_name for SVN warehouse
~#service apache2 restart #restart apache

 

You can use the command to manage the services for Server.Please choose the corresponding command mode according to different types of operating system

Ubuntu Linux

Apache Restart

~# systemctl restart apache2.service

If you want use Domain for this application,you should complete below steps:

  • Domain resolution if you want to use (Add an A record to the Internet IP Address of Server from your Domain Control Panel)
  • Add ServerName or ServerAlias to the Apache Trac configuration file: /etc/apache2/sites-enabled/trac.conf,
    ServerName www.mydomain.com 
    ServerAlias mydomain.com
  • Restart the services

When install new extension from back-end it will not successful,may be the permissions of file and folder is not appropriate,you should change it

Web site root permissions to follow:
file 644,folder 755 ,Permissions Users and groups www-data
If there is a file permissions problem, execute the following three commands:

chown -R www-data.www-data /data/wwwroot/weblate
find /data/wwwroot/default/weblate -type d -exec chmod 755 {} \;
find /data/wwwroot/default/weblate -type f -exec chmod 644 {} \;