Edgewall Software

Changes between Version 6 and Version 7 of PostgresqlRecipe


Ignore:
Timestamp:
Mar 7, 2006, 2:02:33 AM (18 years ago)
Author:
byrnejb@…
Comment:

Added TracApacheRecipe`link

Legend:

Unmodified
Added
Removed
Modified
  • PostgresqlRecipe

    v6 v7  
    1 == Recipe Trac and PostgreSQL ==
     1== Recipe Installing Trac with PostgreSQL on CentOS4.2 ==
    22
    33
    44HOWTO:
    5 Install trac-0.9.4 on Centos4 (RH-ES4) with PostgreSQL-8.1.3 using psycopg2-2.
     5Install trac-0.9.4 on Centos4.2 (RH-ES4) with PostgreSQL-8.1.3 using psycopg2-2.
    66
    77You should refer to the trac documentation wiki for current details respecting installing trac at [wiki:TracInstall]. 
     
    3434# more INSTALL
    3535# ./configure
     36...
    3637
    3738}}}
     
    4243
    4344{{{
    44 #
     45...
    4546# <optional build and install of subversion>
    4647...
     
    9293# more README
    9394# more INSTALL
    94 #
     95...
    9596}}}
    9697
     
    100101
    101102{{{
     103...
    102104# python ./setup.py install
    103105#
     
    119121/usr/local/lib/svn-python
    120122
    121 and place this somewhere in python's default load path.  The file name is not important, but the .pth extension is. You can determine
    122 the default path thus:
     123and place this somewhere in python's default load path.  The file name is not important, but the .pth extension is. You can determine the default path thus:
    123124
    124125
     
    146147{{{
    147148#
    148 # echo /usr/local/lib/svn-python > \
    149 # /usr/lib/python2.3/site-packages/trac_svn.pth
    150 #
    151 # cat /usr/lib/python2.3/site-packages/trac_svn.pth \
    152 # /usr/local/lib/svn-python
     149# echo /usr/local/lib/svn-python > /usr/lib/python2.3/site-packages/trac_svn.pth
     150#
     151# cat /usr/lib/python2.3/site-packages/trac_svn.pth
     152/usr/local/lib/svn-python
    153153#
    154154# python
     
    168168
    169169
    170 Now trac-admin, apache and tracd should all find the necessary bindings
    171 and run without any further ado.
    172 
    173 8.  At this point everything is wired up and ready to go with tracd as the
    174 server and SQLite3 as the backend database.  You can create your first
    175 trac environment by issuing the following command:
     170We can see that /usr/local/lib/svn-python has been added to python's search path. The only thing to note is that a version upgrade of python will require that we move trac_svn.pth to the new site-packages directory.  Now trac-admin, apache and tracd should all find the necessary bindings and run without any further ado.
     171
     1728.  At this point everything is wired up and ready to go with tracd as the server and SQLite3 as the backend database.  You can create your first trac environment by issuing the following command:
    176173
    177174
     
    183180
    184181
    185 and answering the questions regarding the database connection and
    186 subversion repository. To use a different DB backend you must first
    187 initialize the alternative database environment before runing trac-admin initenv. 
    188 
    189 9.  To use postgresql as the backend one must first setup a target
    190 database user and a database instance to pass to trac-admin when it asks for a connection string.  The postgresql command line utilities for this are createuser(1) and createdb(1).
     182You must answer the questions regarding the database connection and subversion repository. To use a different DB backend you must first initialize the alternative database environment before runing "trac-admin /path/to/trac_project_env initenv". 
     183
     1849.  To use postgresql as the backend one must first setup a target database user and a database instance to pass to trac-admin when it asks for a connection string.  The postgresql command line utilities for this are createuser(1) and createdb(1).
    191185
    192186
     
    205199{{{
    206200#
    207 # createuser --username superuser --password --pwprompt --createdb
    208 --createrole --echo trac_db_admin
    209 
     201# createuser --username superuser --password --pwprompt --createdb --createrole --echo trac_db_admin
    210202Enter password for new role:
    211203Enter it again:
     
    244236
    245237
    246 You have to provide the connection password again as above, but this time
    247 you use the password for trac_db_admin since this was used to establish
    248 the connection.  You can of course use any established postgresql
    249 user/role that has CREATEDB priviliges instead.
    250 
    251 10.  With trac and postgresql all set up you must now determine the
    252 absolute path to the subversion repostor(y/ies) that you wish to use with trac.  This is a manual task.  A typical repository path might look
    253 like "/var/data/svn" or "/var/svn".
    254 
    255 11.  With the information obtained above, the postgresql database name,
    256 the path to the trac directory, and the path to the subversion repository,
    257 we now invoke trac-admin to create the environment.
    258 
    259 #
    260 {{{
    261 
     238You have to provide the connection password again as above, but this time you use the password for trac_db_admin since this was used to establish the connection.  You can of course use any established postgresql user/role that has CREATEDB priviliges instead.
     239
     24010.  With trac and postgresql all set up you must now determine the absolute path to the subversion repostor(y/ies) that you wish to use with trac.  This is a manual task.  A typical repository path might look like "/var/data/svn" or "/var/svn".
     241
     24211.  With the information obtained above, the postgresql database name, the path to the trac directory, and the path to the subversion repository, we now invoke trac-admin to create the environment.
     243
     244
     245{{{
     246#
    262247# trac-admin /var/data/trac initenv
    263248Creating a new Trac environment at /var/data/trac
     
    364349try running the Trac standalone web server `tracd`:
    365350
    366 # tracd --port 3000 /var/data/trac
     351# tracd --port 8000 /var/data/trac
    367352
    368353Then point your browser to http://localhost:8000/trac.
     
    425410Well, everything seems to work.
    426411
    427 12.  You will now need to customize your trac installation to suite your
    428 project needs.  Configuration is carried out either through the
    429 trac-admin command line interface (adding and removing trac users, adding,
    430 changing or removing priority and severity codes, adding and removing
    431 milestones, etc.) or by directly editing the .trac/conf/trac.ini file (setting email, and default values for the web interface. See [wiki:TracIni]
     41212.  You will now need to customize your trac installation to suite your project needs.  Configuration is carried out through both the trac-admin command line interface (adding and removing trac users, adding, changing or removing priority and severity codes, adding and removing milestones, etc.) and by directly editing the .trac/conf/trac.ini file (setting email and default values for the web interface). See [wiki:TracIni]
    432413
    433414To find out more about trac-admin just run it:
     
    444425Or visit [wiki:TracAdmin]
    445426
    446 More advanced customatization can be accomplished by modifying or
    447 replacing the stylesheets in .trac/templates.
    448 
    449 13.  You WILL, at some point, wish to use trac plugins.  To employ plugins
    450 you must install or upgrade setuptools for python.  The easiest way to do
    451 this is to obtain ez_setup.py from
    452 [http://peak.telecommunity.com/DevCenter/setuptools] and run it as root
    453 "#python ez_setup.py".  You can get more information about plugins for
    454 trac  at [wiki:TracPlugins].
    455 
    456 This completes our broadcast day.  For information on configuring Apache to run trac see [wiki:TracModPython].  For alternative methods for installing on Red Hat type systems, particularly Fedora Core see [wiki:TracOnFedoraCore].
     427More advanced customization is accomplished by modifying or replacing the stylesheets in .trac/templates.
     428
     42913.  You WILL, at some point, wish to use trac plugins.  To employ plugins you must install or upgrade setuptools for python.  The easiest way to do this is to obtain ez_setup.py from [http://peak.telecommunity.com/DevCenter/setuptools] and run it as root "#python ez_setup.py".  You can get more information about plugins for trac  at [wiki:TracPlugins].
     430
     431This completes our broadcast day.  For information on configuring Apache to run trac see [wiki:TracModPython] or for my specific [wiki:TracApacheRecipe].  For alternative methods for installing on Red Hat type systems, particularly Fedora Core see [wiki:TracOnFedoraCore].
    457432
    458433Regards,