- Download RTx-Foundry:
  http://search.cpan.org/dist/RTx-Foundry/
  # "make dist" makes a new release
- Download RT:
  Run Makefile.PL in RTx-Foundry.
  $ svn co http://svn.autrijus.org/104/trunk/rt/
  - Difference with Vanilla RT:
   - RTx-TabbedUI
    - html/{Edit,Work,function,img,stylesheet}
   - RTx-Workflow
    - lib/RT/Workflow*
   - RTx-Attribute
    - Core in 3.2 and 3.3
- Install RT (Jail2):
  $ autoconf
  $ ./configure --help |less   # see README too
  $ ./configure
  Default:
  - mysql (need 4.0.x+)
  - "rt3" database at localhost
  - Install to /opt/rt3
  - "rt" group for files, "www" user for web access
  For personal use:
  $ ./configure --enable-layout=inplace \
                --with-my-user-group \
                --with-db-type=SQLite
- Fix dependencies
  $ sudo make fixdeps
  $ make install
  $ make initialize-database
- Run in standalone http server:
  $ perl bin/standalone_httpd
  $ sudo perl bin/standalone_httpd 80
- To run in Apache2 + ModPerl2 + LibApreq2:
  http://search.cpan.org/dist/mod_perl/
  http://search.cpan.org/dist/libapreq2/
  http://search.cpan.org/dist/MasonX-Apache2Handler/
  http://search.cpan.org/dist/Apache-DBI/
- See README for httpd.conf for mod_perl*
  - But consider Include RTx-Foundry/etc/httpd.conf.modperl2 instead
- Back to RTx-Foundry's Makefile.PL (Jail1, Jail2)
  - It should detect RT installation
  - Set $ENV{RTHOME}
  - sudo make install
  - make initdb # for first install: insert etc/initialdata
    - Insert "guest" user
    - Make "system function" queues
    - Add CF and CFs for system functions
    - Add BatchReply email templates
      etc etc 
  - To dump existing database:
    $ perl sbin/rt-dump-database
- Kwiki (Jail2), SVN::Web (Jail2), VCP (Jail1)
  - Comes with RTx-Foundry
  - Kwiki in html/Foundry/Project/Wiki/lib
  - SVN::Web in html/Foundry/Project/Source/lib
  - VCP in sbin/openfoundry-vcp
- CVS (Jail1) # comes with the system
- Sympa (Jail2):
  # For now, install from here
  https://bazaar.iis.sinica.edu.tw/svn/Bazaar/trunk/Sympa-elixus
  $ ./configure
  # Default install to /home/sympa, change with --prefix
  $ sudo make # for dependencies
  $ sudo make install
- SVN (Jail1, Jail2)
  http://subversion.tigris.org/
  # Recommended 1.1.x
  # Compile with --swig-languages=perl --with-perl
- SSHDCVS (Jail1)
  https://bazaar.iis.sinica.edu.tw/svn/Bazaar/trunk/Fluid/sshdcvs
  # Unavailable for non-FreeBSD systems
  # May need to manually patch OpenSSH
- Run OpenFoundry Setup 
  $ sudo perl /opt/rt3/sbin/foundry-setup INIT_VCP=yes # Jail1
  $ sudo perl /opt/rt3/sbin/foundry-setup INIT_WWW=yes # Jail2
  # or all at once:
  $ sudo perl /opt/rt3/sbin/foundry-setup INIT_ALL=yes
  # Output goes to /usr/local/etc/foundry.conf
  # Also, will configure PostFix for you
- Mail alias setup (in /etc/aliases):
    rt:         "|/opt/rt3/bin/rt-mailgate --queue NewUser --action correspond --url http://localhost/"
    rt-comment: "|/opt/rt3/bin/rt-mailgate --queue NewUser --action comment --url http://localhost/"
- Details of foundry-setup
  # Only for first-time setup; hand-modify foundry.conf afterwards
  - /usr/local/etc/foundry.conf
    - Hints for runtime Foundry to find connecting components
  - Postfix
    - Alias map for username@openfoundry => RT3.Users.EmailAddress
  - Sympa
    - Set color theme to agree with OpenFoundry
  - PAM (for SSHDCVS)
- Restart HTTP Daemon
- To install without jail:
  - If install in a single system, no problem
  - If install in two systems (VCP and WWW)
    - All machines must be able to connect to the RT database
    - Make sure that the SVN repository root is shared
      (NFS, Samba, etc, or even rsync...)
- DNS (in /etc/namedb):
  in example.org.:
  CNAME * rt.example.org # the WWW host
- To modify auto-login authentication logic:
  # disable the 'guest' part in it.
  html/Callbacks/Foundry/autohandler/Auth
- Alternatively, use Apache Authentication
  Set($WebExternalAuth , 1);
  Set($WebExternalAuto , 1);
  # Set($WebExternalGecos , undef);
- Inline regression tests # This really belongs to RTx
 - Use Test::Inline syntax to write unit test in .pm files
 - Use T::I's bundled utility "pod2test" to convert to .t files
 - Run the .t files using "prove"
 - "make regression"
- Convert bdb to fsfs:
 - svnadmin create --fs-type=fsfs repos.new
 - svnadmin dump -q repos | svnadmin load -q repos.new
 - mv repos repos.old ; mv repos.new repos
 - svnadmin verify
