Edgewall Software

Changes between Version 409 and Version 410 of TracInstall


Ignore:
Timestamp:
Apr 26, 2015, 12:32:24 AM (9 years ago)
Author:
Ryan J Ollos
Comment:

Partial revert of TracInstall@408. The $ are useful for indicating that the command is executed at a shell prompt.

Legend:

Unmodified
Added
Removed
Modified
  • TracInstall

    v409 v410  
    122122
    123123 - Install Trac 1.0:
    124    {{{#!sh
    125   easy_install Trac==1.0
    126    }}}
     124 {{{#!sh
     125$ easy_install Trac==1.0
     126}}}
    127127 - Install latest development version:
    128    {{{#!sh
    129   easy_install Trac==dev
    130    }}}
     128 {{{#!sh
     129$ easy_install Trac==dev
     130}}}
    131131   Note that in this case you won't have the possibility to run a localized version of Trac;
    132132   either use a released version or install from source.
     
    147147 -
    148148 {{{#!sh
    149 pip install trac psycopg2
     149$ pip install trac psycopg2
    150150}}}
    151151or:
    152152 -
    153153 {{{#!sh
    154 pip install trac mysql-python
     154$ pip install trac mysql-python
    155155}}}
    156156
     
    168168
    169169{{{#!sh
    170 python ./setup.py install
     170$ python ./setup.py install
    171171}}}
    172172
     
    178178If you install from source and want to make Trac available in other languages, make sure Babel is installed. Only then, perform the `install` (or simply redo the `install` once again afterwards if you realize Babel was not yet installed):
    179179{{{#!sh
    180 python ./setup.py install
     180$ python ./setup.py install
    181181}}}
    182182
     
    195195To install Trac to a custom location, or find out about other advanced installation options, run:
    196196{{{#!sh
    197 easy_install --help
     197$ easy_install --help
    198198}}}
    199199
     
    202202Specifically, you might be interested in:
    203203{{{#!sh
    204 easy_install --prefix=/path/to/installdir
     204$ easy_install --prefix=/path/to/installdir
    205205}}}
    206206
    207207or, if installing Trac on a Mac OS X system:
    208208{{{#!sh
    209 easy_install --prefix=/usr/local --install-dir=/Library/Python/2.5/site-packages
     209$ easy_install --prefix=/usr/local --install-dir=/Library/Python/2.5/site-packages
    210210}}}
    211211
     
    220220A new environment is created using [TracAdmin trac-admin]:
    221221{{{#!sh
    222 trac-admin /path/to/myproject initenv
     222$ trac-admin /path/to/myproject initenv
    223223}}}
    224224
     
    238238Finally, make sure the user account under which the web front-end runs will have '''write permissions''' to the environment directory and all the files inside. This will be the case if you run `trac-admin ... initenv` as this user. If not, you should set the correct user afterwards. For example on Linux, with the web server running as user `apache` and group `apache`, enter:
    239239{{{#!sh
    240 chown -R apache.apache /path/to/myproject
     240$ chown -R apache.apache /path/to/myproject
    241241}}}
    242242
     
    253253After having created a Trac environment, you can easily try the web interface by running the standalone server [TracStandalone tracd]:
    254254{{{#!sh
    255 tracd --port 8000 /path/to/myproject
     255$ tracd --port 8000 /path/to/myproject
    256256}}}
    257257
    258258Then, 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. If you only plan on managing a single project with Trac you can have the standalone server skip the environment list by starting it like this:
    259259{{{#!sh
    260 tracd -s --port 8000 /path/to/myproject
     260$ tracd -s --port 8000 /path/to/myproject
    261261}}}
    262262
     
    271271Alternatively, the variable can be set in the shell before executing `tracd`:
    272272{{{#!sh
    273 PKG_RESOURCES_CACHE_ZIP_MANIFESTS=1 tracd --port 8000 /path/to/myproject
     273$ PKG_RESOURCES_CACHE_ZIP_MANIFESTS=1 tracd --port 8000 /path/to/myproject
    274274}}}
    275275}}}
     
    291291There is, however, a bit of a chicken-and-egg problem. The [TracAdmin trac-admin] command requires an existing environment to function, but complains if the deploy directory already exists. This is a problem, because environments are often stored in a subdirectory of the deploy. The solution is to do something like this:
    292292{{{#!sh
    293 mkdir -p /usr/share/trac/projects/my-project
    294 trac-admin /usr/share/trac/projects/my-project initenv
    295 trac-admin /usr/share/trac/projects/my-project deploy /tmp/deploy
    296 mv /tmp/deploy/* /usr/share/trac
     293$ mkdir -p /usr/share/trac/projects/my-project
     294$ trac-admin /usr/share/trac/projects/my-project initenv
     295$ trac-admin /usr/share/trac/projects/my-project deploy /tmp/deploy
     296$ mv /tmp/deploy/* /usr/share/trac
    297297}}}
    298298
     
    319319Assuming the deployment has been done this way:
    320320{{{#!sh
    321 trac-admin /var/trac/env deploy /path/to/shared/trac
     321$ trac-admin /var/trac/env deploy /path/to/shared/trac
    322322}}}
    323323
     
    362362Of course, you still need to make the Trac `htdocs/common` directory available through the web server at the specified URL, for example by copying (or linking) the directory into the document root of the web server:
    363363{{{#!sh
    364 ln -s /path/to/trac/htdocs/common /var/www/static.example.org/trac-common
     364$ ln -s /path/to/trac/htdocs/common /var/www/static.example.org/trac-common
    365365}}}
    366366
     
    386386Grant admin rights to user admin:
    387387{{{#!sh
    388 trac-admin /path/to/myproject permission add admin TRAC_ADMIN
     388$ trac-admin /path/to/myproject permission add admin TRAC_ADMIN
    389389}}}
    390390