This guide was made primarily to help Hostmonster customers setup Trac. However, the setup is generic enough, that with only little modification, this guide can be applied to any shared-hosting setup running the Apache webserver (or if you want to use cgi for some reason). To work, you will need access to shell, and have basic understanding of text editing in shell. Hostmonster provides python2.3, and easy subversion repository setup - so these are assumed to already be in place.
Also, because I do not like the login hack described on the Hostmonster Trac Wiki, I have assumed that you will install one of the login plugins. However, if you have access to the Apache setup file and do not wish to use a login manager, you can use the account setup method outlined in the Trac wiki.
My installed Trac
Requirements
Please use fresh copy of the shared host, NUKE process will do that, ask it from support.
Warning:
When you copy a string from here make sure the correct syntax is there (Eg: ",` ... ).
In the "wget" some of them should have "" in the URL string make sure to put those too.
Python
I found installing a local copy of python to be unnecessary, as the extra modules can be installed in the trac's lib path. To assure access to these libs, the PYTHONPATH environment variable must reference the aforementioned path.
Environmental Variables
Add this to ~/.bash_profile:
export PYTHONPATH="$HOME/packages/lib/python2.3/site-packages"
export LD_LIBRARY_PATH="$HOME/packages/lib"
export PATH="$HOME/packages/bin:$PATH"
source ~/.bash_profile
Installation
Setup
I recommend making a special directory for the install files and packages; this makes it easier to manage, and you can delete the entire directory of install files at the end. I used ~/packages and ~/install_files personally, and will be using them throughout these instructions - so if you want to use another directory, just replace all references.
* cd
* mkdir install_files
* mkdir packages
* mkdir trac_sites
Install Trac (0.10.3)
* cd ~/install_files
* wget http://ftp.edgewall.com/pub/trac/trac-0.10.3.tar.gz
* tar zxf trac-0.10.3.tar.gz
* cd trac-0.10.3
* python setup.py install --prefix=$HOME/packages
Install Clearsilver (0.10.4)
* cd ~/install_files
* wget http://www.clearsilver.net/downloads/clearsilver-0.10.4.tar.gz
* tar zxf clearsilver-0.10.4.tar.gz
* cd clearsilver-0.10.4
sed -i "s@/usr/local/bin/python@/usr/bin/env python@g" \
scripts/document.py
PYTHON_SITE=`/home/{username}/packages/bin/python -c \
"import sys; print [path for path in sys.path if \
path.find('site-packages') != -1][0]"` \
./configure --with-python=/home/{username}/packages/bin/python \
--prefix=$HOME/packages \
--disable-ruby --disable-java --disable-apache --disable-csharp --disable-perl
* make
* make install
Install SQLite (3.3.13)
* cd ~/install_files
* wget http://www.sqlite.org/sqlite-3.3.13.tar.gz
* tar zxf sqlite-3.3.13.tar.gz
* cd sqlite-3.3.13
* ./configure --prefix=$HOME/packages
* make
* make install
* ln -s $HOME/packages/bin/sqlite3 $HOME/packages/bin/sqlite
Install PySQLite (2.3.3)
* cd ~/install_files
* wget http://initd.org/pub/software/pysqlite/releases/2.3/2.3.3/pysqlite-2.3.3...
* tar zxf pysqlite-2.3.3.tar.gz
* cd pysqlite-2.3.3
* In setup.py, change
include_dirs = [] to include_dirs = ['$HOME/packages/include']
and
library_dirs = [] to library_dirs = ['$HOME/packages/lib']
* python setup.py build
* python setup.py install --prefix=$HOME/packages
Install SWIG (1.3.31)
* cd ~/install_files
* wget http://dl.sourceforge.net/sourceforge/swig/swig-1.3.31.tar.gz
* tar zxf swig-1.3.31.tar.gz
* cd swig-1.3.31
* ./configure --prefix=$HOME/packages --with-python=/usr/bin/python
* make
* make install
Install Subversion (1.4.3)
* cd ~/install_files
* wget http://subversion.tigris.org/downloads/subversion-1.4.3.tar.gz
* tar zxf subversion-1.4.3.tar.gz
* cd subversion-1.4.3
* ./configure PYTHON=/usr/bin/python --prefix=$HOME/packages \
--with-swig=$HOME/packages/bin/swig --without-berkeley-db \
--with-ssl --with-zlib
* make
* make install
* make swig-py
* make install-swig-py
* cd ~/packages/lib/python2.3/site-packages
* echo $HOME/packages/lib/svn-python > subversion.pth
* ln -s ~/packages/lib/svn-python/libsvn
* ln -s ~/packages/lib/svn-python/svn
* Test it with python -c "from svn import client" (No errors should result.)
Setup Trac Environment
* trac-admin $HOME/trac_sites/{your trac project id} initenv
("{your trac project id}" can be anything you like. Putting all your Trac environments in your trac_sites directory allows for simpler backup!)
You will be asked for
o Project Name: {Whatever you want}
o Database connection string: {Accept the default (just hit return)}
o Type of version control: {Accept the default (just hit return)}
o Path to repository: /home/{yourusername}/svn/{your svn project id}
o Templates directory: {Accept the default (just hit return)}
* trac-admin $HOME/trac_sites/{your trac project id} will put you into interactive mode. You can issue a simple help at the prompt to see what you can do. There are lots of administrative actions in interactive mode that can make your life a little easier than it would be if you always had to go through the WebAdmin interface.
You should add at least one user with admin powers. To do this, in interactive mode:
o permission add admins TRAC_ADMIN
o permission add {username} admins
o exit (to quit interactive mode)
During interactive mode, permission list should show the new users on the list.
Make Trac Web Accessible
* cd ~/{my.domain.name}
* Make index.cgi (make sure to set the permissions so the webserver can read it - 775):
#!/bin/bash
export HOME="/home/{username}"
export TRAC_ENV="$HOME/trac_sites/{your trac project id}"
export PYTHONPATH="$HOME/packages/lib/python2.3/site-packages"
export PATH="$HOME/packages/bin:$PATH"
export LD_LIBRARY_PATH="$HOME/packages/lib"
exec $HOME/packages/share/trac/cgi-bin/trac.cgi
Then set the default by editing .htaccess:
DirectoryIndex index.cgi
Now direct your browser in to the {my.domain.name} you must see the Trac project page,if not go to the CPanel and PHP Config, and install PHP.ini Master file. That's all. :).
For any question contact me : heshanmw (at) gmail.com
Prettiness
Pretty URLs
Setup static mapping
This allows the common static files (images, CSS, javascript, etc) to be accessed directly, rather than mapping through the cgi script. (This makes Trac faster, while providing compatibility with the prettiness.)
* cd ~/{domain name}
* mkdir chrome
* ln -s $HOME/packages/share/trac/htdocs ./chrome/common
Setup Rewrite Rule
Edit .htaccess located in the {domain name} directory
DirectoryIndex index.cgi
Options ExecCGI FollowSymLinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.cgi/$1 [L]
This will prefix any failed request with index.cgi (to run it through Trac).
Hack the Trac base_url
This sets any links Trac generates to ignore the file generated from, and just start from the directory, rather than the file that processed the generation. (/blarg/foobar, instead of /blarg/index.cgi/foobar)
* cd $HOME/packages/lib/python2.3/site-packages/trac/web
* Backup the original api.py in case you want to revert.
cp api.py api.py.backup
* Edit api.py, change
base_path = property(fget=lambda self: self.environ.get('SCRIPT_NAME', ''),
doc='The root path of the application')
to base_path = property(fget=lambda self: os.path.dirname(self.environ.get('SCRIPT_NAME', '')),
doc='The root path of the application')
Plugins
Setup Tools
We'll be using this to install the other plugins; so it is necessary to install this to follow my steps.
* cd ~/install_files
* wget http://peak.telecommunity.com/dist/ez_setup.py
* python ez_setup.py --prefix=$HOME/packages
WebAdmin Plugin
* cd ~/install_files
* svn co http://svn.edgewall.com/repos/trac/sandbox/webadmin/
* cd webadmin
* python setup.py egg_info
* python setup.py bdist_egg
* cd dist
* easy_install --prefix=$HOME/packages *.egg
* Now tell trac to load the plugin by editing $HOME/trac_sites/{your trac project id}/conf/trac.ini and adding to the components section:
[components]
webadmin.* = enabled
AccountManager Plugin
NOT COMPATIBLE WITH DbAuth
This will make the htpasswd login method much more pleasing. New users can register on their own using the site, and they can change their passwords if necessary. This also allows login via form, rather than the HTTP authentication.
* cd ~/install_files
* svn co http://trac-hacks.org/svn/accountmanagerplugin/0.10 accountmanagerplugin
* cd accountmanagerplugin
* python setup.py bdist_egg
* cd dist
* easy_install --prefix=$HOME/packages *.egg
* You must add an initial user, to create the initial trac.htpasswd file:
htpasswd -c ~/trac_sites/trac.htpasswd {username}
You'll then enter the password twice.
* Now tell trac to load the plugin by editing $HOME/trac_sites/{your trac project id}/conf/trac.ini and adding to the components section:
[components]
trac.web.auth.LoginModule = disabled
acct_mgr.* = enabled
[account-manager]
password_format = htpasswd
password_file = /home/{your username}/trac_sites/trac.htpasswd
DbAuth Plugin
NOT COMPATIBLE WITH AccountManager
Makes more sense than the normal login method. However it does not support new user registration like AccountManager, rather, you are required to enter all users in manually using sqlite. Because of this, I use AccountManager instead.
* cd ~/install_files
* svn co http://trac-hacks.org/svn/dbauthplugin/0.10 dbauthplugin
* cd dbauthplugin
* python setup.py bdist_egg
* cd dist
* easy_install --prefix=$HOME/packages *.egg
* cd ../install
* cp dbauth.db ~/trac_sites
* chmod 775 ~/trac_sites/dbauth.db
* Now you need to add some users; you'll have to do this manually. You'll probably want to add the same username(s) as you setup earlier.
o sqlite ~/trac_sites/dbauth.db
o INSERT INTO trac_users VALUES ('all', 'username', 'passwd', 'email@email.com');
INSERT INTO trac_permissions VALUES ('all', 'username', 'admins');
o .quit
* Now tell trac to load the plugin by editing $HOME/trac_sites/{your trac project id}/conf/trac.ini and adding to the components section:
[components]
trac.web.auth.* = disabled
dbauth.* = enabled
#trac.userdir.* = enabled # only if you want to use this
[central]
database = /home/{your username}/trac_sites/dbauth.db
envroot = /home/{your username}/trac_sites/{your trac project id}
IniAdmin Plugin
Adds the ability to configure trac.ini via a web interface.
* cd ~/install_files
* svn co http://trac-hacks.org/svn/iniadminplugin/trunk/ iniadmin
* cd iniadmin
* python setup.py bdist_egg
* cd dist
* easy_install --prefix=$HOME/packages *.egg
* Now tell trac to load the plugin by editing $HOME/trac_sites/{your trac project id}/conf/trac.ini and adding to the components section:
[components]
iniadmin.* = enabled
TracNav Plugin
Adds ability to add navigation elements to wiki pages.
* cd ~/install_files
* svn co http://svn.ipd.uni-karlsruhe.de/repos/javaparty/JP/trac/plugins/tracnav/
* cd tracnav
* python setup.py bdist_egg
* cd dist
* easy_install --prefix=$HOME/packages *.egg
* Now tell trac to load the plugin by editing $HOME/trac_sites/{your trac project id}/conf/trac.ini and adding to the components section:
[components]
tracnav.* = enabled
Cleanup
Now that you have everything setup the way you want, you can go ahead and delete all those setup files, and switch to fast_cgi
Delete setup files
Since you won't be using those setup files after you're done, if you don't want all those setup files to take up hard drive space, you can delete them.
* cd
* rm -rf install_files
Reference : http://natmaster.com/articles/installing_trac_0.10.php
35 comments
I have a look at your article
I have a look at your article carefully and learn some useful information from it.mbt shoes
Welcome to our website for
Welcome to our website for your. Coach sunglasses here are made with high quality and stylish design juicy couture.What
is more, there are promotion activities here coach purses. That means you can buy low price coach sunglasses. Just have a look at our websites mbt shoes, I am sure you would find your ideal coach sunglasses.
Welcome to our website for
Welcome to our website for your. Coach sunglasses here are made with
high quality and stylish design juicy couture.What is more,
there are promotion activities here coach purses. That means you
can buy low price coach sunglasses. Just have a look at our websites mbt shoes, I am sure you would
find your ideal coach sunglasses.
Some amazing things air
Some amazing things air Jordan 5can be done with simple effects like air Jordan 6 stitching. Its one of those parts of the air Jordan 7construction that can either blend in air Jordan 8or stand out and for this new color air Jordan 9way of the Air Jordan 1 Phat Low it air Jordan 10definitely does the latter. air Jordan 11
Malkiel istennis sneakers one
Malkiel istennis sneakers one of just a fewcheap puma shoes men alive who haspuma shoes men profoundly affected modern investmentpuma shoes women thinking. And his position puma USAis straightforward.
They have supra tk society
They have supra tk society come up with supra society shoesnew selections supra tkfor the coming mbt running shoesfall collection mbt sandalsand one of these radii 420 top would be the Supra Pilot radii 420.
They have supra tk society
They have supra tk society come up with supra society shoesnew selections supra tkfor the coming mbt running shoesfall collection mbt sandalsand one of these radii 420 top would be the Supra Pilot radii 420.
http://www.salembtshoes.net
http://www.salembtshoes.net Mbthttp://www.salembtshoes.net Mbt Shoeshttp://www.salembtshoes.net Mbt Shoeshttp://www.salembtshoes.net Mbt outlethttp://www.salembtshoes.net Shoes Mbthttp://www.salembtshoes.net Mbts Shoeshttp://www.salembtshoes.net Mbt Shoehttp://www.salembtshoes.net Mbt schuhehttp://www.salembtshoes.net mbt shoes usahttp://www.salembtshoes.net Cheap Mbtshttp://www.salembtshoes.net Cheapest Mbt Shoeshttp://www.salembtshoes.net Mbt Shoes Cheaphttp://www.salembtshoes.net Discount Mbt Shoeshttp://www.salembtshoes.net Discount Mbtshttp://www.salembtshoes.net Mbt Shoes Best Priceshttp://www.salembtshoes.net Buy Mbt Shoeshttp://www.salembtshoes.net Mbts On Salehttp://www.salembtshoes.net Buy Mbtshttp://www.4unj.com NFL jerseys http://www.4unj.com cheap NFL jerseyshttp://www.4unj.com wholesale NFL jerseyshttp://www.4unj.com/Baltimore_Ravens_Jerseys.html Baltimore Ravens Jerseys http://www.salembtshoes.net Mbt Shoeshttp://www.salembtshoes.net Mbt outlethttp://www.salembtshoes.net Mbt shoes salehttp://www.salembtshoes.net Mbt shoes discounthttp://www.nflfansjersey.com cheap nfl jerseyshttp://www.nflfansjersey.com nfl football jerseyshttp://www.nflfansjersey.com nfl jerseyshttp://www.nflfansjersey.com youth nfl jerseyshttp://www.nflfansjersey.com nfl authentic jerseyshttp://www.nflfansjersey.com nfl throwback jerseyshttp://www.nflfansjersey.com nfl jerseyhttp://www.sellnfljersey.com nfl jerseys cheaphttp://www.sellnfljersey.com nfl kids jerseyshttp://www.sellnfljersey.com personalized nfl jerseyshttp://www.sellnfljersey.com throwback jerseyhttp://www.sellnfljersey.com cheap nfl jerseyshttp://www.sellnfljersey.com nfl jerseyhttp://www.ed-hardy.cc ed hardyhttp://www.ed-hardy.cc/ed-hardy-clothing.html ed hardy clothinghttp://www.ed-hardy.cc/ed-hardy-swim-trunks.html ed hardy swim trunkshttp://www.ed-hardy.cc/ed-hardy-t-shirts.html ed hardy t-shirtshttp://www.ed-hardy.cc/ed-hardy-swimwear.html ed hardy swimwearhttp://www.ed-hardy.cc/ed-hardy-woman-t-shirts.html ed hardy women t-shirtshttp://www.ed-hardy.cc/ed-hardy-tops.html ed hardy tops http://www.salembtshoes.net Mbt Shoes Saleshttp://www.salembtshoes.net Mbt Salehttp://www.salembtshoes.net Anti Shoes MBT http://www.salembtshoes.net mbt anti shoeshttp://www.salembtshoes.net mbt anti shoe http://www.salembtshoes.net Anti Mbt http://www.salembtshoes.net Anti Mbt Shoes http://www.salembtshoes.net Cheap Mbt Shoeshttp://www.salembtshoes.net Cheap Mbthttp://www.salembtshoes.net Mbt Walking Shoeshttp://www.salembtshoes.net Mbt Shoes Salehttp://www.salembtshoes.net Mbt footwearhttp://www.salembtshoes.net Walking Shoes http://www.salembtshoes.net Women's Mbt Shoes http://www.salembtshoes.net Men's Mbt Shoes http://www.salembtshoes.net Mbt For Sale http://www.salembtshoes.net Mbts For Sale http://www.salembtshoes.net masai barefoot technology
A....also real
A....also real replica
watches is command the father Omega
Seamaster 300M James Bond Collectors Edition Mens 212.30.41.20.01.001 for
sale of an harmonious grandstand Baume
& Mercier Baume and Mercier Riviera Mens 8467 sale play. The
economic strike Rolex
Oyster Perpetual Submariner Date Mens 16613-BLSO due to extensive devise
Patek
Philippe Gondolo 18kt Rose Gold Mens 5111R jewelry is often correlated
Cartier
Pasha Seatimer Steel Mens W31077M7 shelter the numeral of Bvlgari
B.zero1 Diamond Blue Mother-of-pearl Steel Bangle Ladies 101071
disposable buildup available. Middle Movado
Ladies Sports Edition 0605873 for sale class, the exquisite class, replica watches further coupled
increment households discount
replica watches break ground progression the majority....A
S.E.C. Pursuing More Cases
S.E.C. Pursuing More Cases Tied to Financial Crisis. 传奇私服 Days
after the Securities and Exchange Commission secured a $550 million
settlement from Goldman Sachs, 传奇私服 the agency’s chairwoman said on
Tuesday 传
奇世界 that the commission was pursuing several other 传奇私服
investigations related to the 2008 financial crisis. 传奇私服 The
chairwoman, Mary L. Schapiro, 传奇sf told reporters after a Congressional
hearing that 传奇私
服 the S.E.C. had “a number of cases coming out of 传奇私服
the financial crisis related to C.D.O.’s 传奇私服 and other products” and involving
Wall Street firms, 传奇世界 banks and other financial
institutions. 英雄合
击 C.D.O.’s, or collateralized debt obligations, 传世 were
the financial products at the 英雄合击 center of the Goldman Sachs
charges, 私服
which alleged that the bank misled investors 英雄合击 in a subprime mortgage product as
the housing market began to collapse. 英雄合击 Goldman settled the S.E.C.
complaint without 英雄合击 admitting or denying the
charges. 传世
Ms. Schapiro’s comments are the most direct signal yet that 私服传奇 the S.E.C. is
continuing to press for accountability and restitution for the upheaval
in financial and housing markets in 2007 and 2008, which led to the
sweeping regulatory bill that President Obama is scheduled to sign on
Wednesday.
Post new comment