Edgewall Software

Installing Trac on OpenSolaris

Note: OpenSolaris has been discontinued post the purchase by Oracle in 2009.

Note that you should also read the TracInstall documentation file present in the source distribution. If you're upgrading an already installed environment, please also read TracUpgrade.

Prerequisites

  • OpenSolaris 134
    tjyang@os132:~$ cat /etc/release
                           OpenSolaris Development snv_134 X86
               Copyright 2010 Sun Microsystems, Inc.  All Rights Reserved.
                            Use is subject to license terms.
                                 Assembled 01 March 2010
    

To install Trac on OpenSolaris, the following software packages must be installed:

  • Getting Trac-0.11.7.tar.gz
    wget http://ftp.edgewall.com/pub/trac/Trac-0.11.7.tar.gz
    
  • Python, version ≥ 2.3.
    tjyang@os132:~$ python --version
    Python 2.6.4
    tjyang@os132:~$
    
  • setuptools, version ≥ 0.6, OpenSolaris snv134 doesn't have setuptool bundled.
    /usr/bin/wget http://peak.telecommunity.com/dist/ez_setup.py
    
  • Genshi, version ≥ 0.5
  • Subversion, version ≥ 1.1.x
    tjyang@os132:~$ svn --version --quiet
    1.6.5
    
  • and the Subversion SWIG Python bindings (not PySVN, that's something different).
  • One of the following Python bindings, depending on the database used:
    • pysqlite version 2.x for SQLite 3.x, part of the standard library starting with Python 2.5
    • psycopg2 version 2.0.x for the PostgreSQL database
    • MySQLdb, version 1.2.2 for the MySQL database
  • A web server capable of executing CGI/FastCGI scripts, or Apache HTTPD with mod_python or mod_wsgi. Trac also comes with a standalone server, tracd.

Any of the above python libraries can be installed using easy_install, which itself can be installed using the following bootstrap script:

  $ wget http://peak.telecommunity.com/dist/ez_setup.py
  $ python ez_setup.py

After that, you can do for example easy_install Genshi:

tjyang@os132:~$ sudo easy_install Genshi
Searching for Genshi
Best match: Genshi 0.5.1
Processing Genshi-0.5.1-py2.6-solaris-2.11-i86pc.egg
Genshi 0.5.1 is already the active version in easy-install.pth

Using /usr/lib/python2.6/site-packages/Genshi-0.5.1-py2.6-solaris-2.11-i86pc.egg
Processing dependencies for Genshi
Finished processing dependencies for Genshi

If you're using Python 2.3 or 2.4 and need pysqlite, you can download from http://code.google.com/p/pysqlite/downloads/list the Windows installers or the tar.gz archive for building from source:

  $ tar xvfz <version>.tar.gz
  $ cd <version>
  $ python setup.py build_static install

That way, the latest SQLite version will be downloaded and built into the bindings.

Installing Trac

The command:

  $ python ./setup.py install 

will byte-compile the python source code and install it in the site-packages directory of your python installation. The directories cgi-bin, templates, htdocs and wiki-default are all copied to $prefix/share/trac/.

The script will also install the trac-admin command-line tool, used to create and maintain project environments. Trac-admin is the command center of Trac.

Note: you'll need root permissions or equivalent for this step.

To install Trac in a different location, or use other advanced installation options, run:

  $ python ./setup.py --help 

Creating a Project Environment

A Trac environment is the backend storage format where Trac stores information like wiki pages, tickets, reports, settings, etc. A Trac environment consists of the environment configuration file (trac.ini), custom templates, log files, and more.

A new Trac environment is created with trac-admin:

  $ trac-admin /path/to/projectenv initenv 

Note: The user account under which the web server is run needs write permission to the environment directory and all the files inside.

trac-admin will prompt you for the name of the project, where your subversion repository is located, what database you want to use, etc.

Running the Standalone Server

After having created a Trac environment, you can easily try the web interface by running the standalone server tracd:

  $ tracd --port 8000 /path/to/projectenv 

Then, fire up a browser and visit http://localhost:8000/. You should get a simple listing of all environments that tracd knows about. Follow the link to the environment you just created, and you should see Trac in action.

Using Trac

Once you have your Trac site up and running, you should be able to browse your subversion repository, create tickets, view the timeline, etc.

Keep in mind that anonymous (not logged in) users can by default access most but not all of the features. You will need to configure authentication and grant additional permissions to authenticated users to see the full set of features.

For further documentation, see the TracGuide wiki page.

Last modified 10 years ago Last modified on Jan 26, 2015, 9:58:54 PM
Note: See TracWiki for help on using the wiki.