8.2. Filesystem Layout

 < Day Day Up > 

In the next sections and chapters, we'll dive into RT's internals to get a better sense of how RT is put together. As you're reading, it may be useful to refer to RT's source code. All the paths we talk about will be relative to your RT installation path. By default, RT is installed into /opt/rt3, but you or your system administrator may have installed it elsewhere. Some flavors of Unix such as Debian Linux and FreeBSD package RT and install its code and configuration files into locations that fit system policy.


lib/

Standard Perl libraries live in lib/. RT.pm contains RT's basic initialization routines. It reads RT's configuration file, sets up connections to the database and logging system, and loads system-internal objects.

RT's other Perl libraries live inside the RT/ subdirectory of lib. To add RT-specific behavior, both RT/Record.pm and RT/SearchBuilder.pm subclass DBIx::SearchBuilder and DBIx::SearchBuilder::Record::Cachable, respectively. RT/Interface/Web.pm handles many of the details of initialization of RT's Mason handler and provides a number of helper functions for the Mason Interface. RT/Interface/REST.pm provides helper functions for RT's REST-based web services framework. RT/Interface/Email.pm provides routines for handling incoming email messages and converting them into RT's preferred formats and encodings.

Standard lexicon files live in lib/RT/I18N/. Lexicon files contain translations of RT into languages other than English. They're in the extended GNU Gettext format that Locale::Maketext::Lexicon supports.


share/html/

Standard Mason components live in share/html/.


bin/

Executable RT programs live in bin/. rt is the RT command-line tool. It talks to your RT server via HTTP or HTTPS. You can copy it to other servers or your desktop to run. rt-crontool lets you script actions like escalations or reminder email using your system's cron facility. You can use rt-mailgate to funnel incoming email into RT. Like rt, it can run on any server (such as your mail server) that has Perl installed. webmux.pl is the mod_perl handler for RT. mason_handler.fcgi is the FastCGI handler for RT. standalone_httpd is a full RT webserver in a single tiny Perl script. It's useful for testing out RT or for your development environment. Because it's a non-forking, non-threaded Perl script, it might not stand up to full-scale production use.


sbin/

RT system programs live in sbin/. These tools are used during initial installation of RT. They should almost never be needed during regular use of RT. rt-test-dependencies is a tool to help verify that you've installed all the Perl modules RT needs to run and to help you install any that you happen to be missing. rt-setup-database is the RT helper script that sets up a database schema, ACLs, and data for RT or any RT extensions that touch the database.


var/

Mason cache data lives in var/mason_data/. Under some database backends, session data and locks may be stored under var/session_data/. If you are using the SQLite backend, its database is under var/ by default, such as the file var/rt3.


etc/

Configuration files live in etc/. RT_Config.pm lists out all of RT's default configuration parameters. Database configuration parameters are set automatically by RT's configure script, but just about everything else is the factory default.

When RT starts up, it looks in RT_Config.pm and then overrides the defaults it finds there with local configuration from RT_SiteConfig.pm. This way, you can add any RT configuration you want to RT_SiteConfig.pm, rather than hand-editing the RT_Config.pm file and merging changes every time you upgrade.

The initial database schema also lives in etc/, in multiple different schema.* files customized for each database platform.


local/

Site-local Perl libraries live in local/lib/. Site-local Mason components live in local/html/. Site-local lexicon files live in local/po/.

     < Day Day Up > 


    RT Essentials
    RT Essentials
    ISBN: 0596006683
    EAN: 2147483647
    Year: 2005
    Pages: 166

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net