Talk:DreamTracInstall

python path error + solution
I kept running into some issues with the pythonpath in the install

the reason is that the instructions have : bash- export PYTHONPATH="$HOME/packages/lib/python2.3/site-packages" install- $HOME/trac

the fix? install- $HOME/packages

that will put trac in $HOME/packages/trac

(feb 28, 2008)

other
Great script - worked perfectly for me!

It would be nice if there was an additional script or instructions on creating additional trac sites on the same account.

Checking variables would be good
I'm no Linux wiz, so I can't help others with that.

I got frustrated because I misspelled one lowercase character in my SVN project Name, and I had a hard time to roll it back. it would be great for novices if the script could check whether the the project, username and domain variables are correct and abort in case they're not.

thanks

Documentation - remeber to create shell script!
High the documentation which is otherwise great - does not explicity say yu need to copy the Python shell script found on the page and create a file in the $HOME directory called DreamTracInstall.sh

Version 0.3
Script prompts for svn project name, dreamhost user name, and trac domain. After entering variables they will be asked to confirm if what they entered is correct. Have fun.

Couple of caveats about vars and path
Yeha. Finally got this to work. I had the following issues:


 * project name: the script asks for the svn 'project name' but, afaict, requires the 'project id' (from dreamhost panel/goodies/subversion).
 * user name: i was putting in the subversion user, but it seems to need the unix user under which the script is running.

And finally:
 * the trac domain folder is assumed to be directly under the home folder (i am in the habit of putting subdomains under their parent domain, ie /home/username/domain.com/trac.domain.com - so i had to move it up)

thanks for the script, -- born-again noob (Baxrob 18:19, 3 Nov 2006 (PST))

Died for me
on Avalon:

In file included from /usr/include/python2.3/Python.h:8, from subversion/bindings/swig/python/core.c:80: /usr/include/python2.3/pyconfig.h:868:1: warning: "_XOPEN_SOURCE" redefined :8:1: warning: this is the location of the previous definition make: *** [subversion/bindings/swig/python/core.lo] Killed --Kingboyk 05:27, 24 Nov 2006 (PST)


 * Try running it on server Avalon instead of home Avalon; or vice versa. ;-) --UserFriendly 08:28, 24 Nov 2006 (PST)
 * Lol. No, I can definitely confirm I couldn't get Trac running on Dreamhost's Avalon. I have it working on my own box, but that's not so good as my svn repositories are at Dreamhost. Anyway nevermind, I think Trac isn't quite what I need at the moment so I'll come back to it when it's a bit more mature. --Kingboyk 04:11, 26 Nov 2006 (PST) PS If anyone else reading this can't get Trac to work on Dreamhost one-click install of Trac is a feature request in the Dreamhost control panel. You can vote for it.

Also died for me
on caesar:

running build running build_py running build_ext running install_lib copying build/lib.linux-i686-2.3/pysqlite2/__init__.py -> /usr/lib/python2.3/site-packages/pysqlite2 error: could not delete '/usr/lib/python2.3/site-packages/pysqlite2/__init__.py': Permission denied

sed failure (right after trac installed)
on guilder

Thank you for choosing Trac 0.9.6. Enjoy your stay!

sed: can't read -: No such file or directory [guilder]$

I'm not exactly sure what sed was trying to replace so I can't pick it up from there. Help?

Module Time?
When the script reached $ python -c "from svn import client" this error occured. make: warning: Clock skew detected. Your build may be incomplete. Traceback (most recent call last): File " ", line 1, in ? File "/home/dhstephan/packages/lib/svn-python/svn/client.py", line 19, in ? from libsvn.client import * File "/home/dhstephan/packages/lib/svn-python/libsvn/client.py", line 29, in ? import core File "/home/dhstephan/packages/lib/svn-python/libsvn/core.py", line 2903, in ? import threading File "/home/dhstephan/packages/lib/python2.3/threading.py", line 12, in ? from time import time as _time, sleep as _sleep ImportError: No module named time No idea what would help in diagnosing this. I redid the builds just before the above python call (make install and make install-swig-py  in $HOME/install_files/subversion-1.3.2) and didn't get the clock-skew message back again.

Having problems with module time as well. Tried re-doing those builds and then the rest of the script line by line. When I get to python -c "from svn import client" though, I get the above error exactly, starting at "Traceback". No make warnings, obviously. I tried  since I found that   didn't properly point to the one in , but even when it does, I get the same error.

If I try moving to the next step (trac-admin), I get ImportError: No module named trac.scripts.admin .

--Henrik 14:36, 4 April 2007 (PDT)

Expected Format Error
SubversionException: ("Expected format '3' of repository; found format '5'", 165                                                 005) Exception exceptions.AttributeError: "'SubversionRepository' object has no attri                                                 bute 'log'" in > ignored

anyone have any thoughts? some google research says that this is due to python using 1.3.x bindings and the repository being created in 1.4.x. This is true. The script does download 1.3.x and dream host now uses 1.4.x. Any ideas on workaround?

Expected Format Error
I am also having the "Expected format '3' of repository; found format '5'" problem.

I attempted to modify the installation script with an updated SVN (1.4.2) version. While I did not get the same error, I ran into problems with SVN building correctly:

--- error message --- checking for Apache module support via DSO through APXS... no WARNING: skipping the build of mod_dav_svn --with-apxs or --with-apache must be used configure: Apache Portable Runtime (APR) library configuration checking for APR... no configure: WARNING: APR not found The Apache Portable Runtime (APR) library cannot be found. Please install APR on this system and supply the appropriate --with-apr option to 'configure' or get it with SVN and put it in a subdirectory of this source: svn co \ http://svn.apache.org/repos/asf/apr/apr/branches/0.9.x \ apr Run that right here in the top level of the Subversion tree, then run autogen.sh again. Whichever of the above you do, you probably need to do something similar for apr-util, either providing both --with-apr and --with-apr-util to 'configure', or getting both from SVN with: svn co \ http://svn.apache.org/repos/asf/apr/apr-util/branches/0.9.x \ apr-util configure: error: no suitable apr found --- end error message ---

Then attempted to pull down apr and re-run the script; no luck:

--- error message --- "No such file or directory configure failed for apr" --- end error message ---


 * I had this error message while configuring Subversion 1.4.2. Using  told me that DreamHost has version 0.9.6, while Subversion wants at least 0.9.7. I did the   that the error message suggested. Now, I also get the error above:
 * ~/install_files/subversion-1.4.2/apr/configure: No such file or directory
 * Running, as suggested by the error message, gives this new error:
 * autoconf not found. You need autoconf version 2.50 or newer installed.
 * Following the instructions below (ie, downloading subversion-deps), I was finally able to build Subversion.
 * -- Arthaey 02:35, 28 November 2007 (PST)
 * autoconf not found. You need autoconf version 2.50 or newer installed.
 * Following the instructions below (ie, downloading subversion-deps), I was finally able to build Subversion.
 * -- Arthaey 02:35, 28 November 2007 (PST)
 * -- Arthaey 02:35, 28 November 2007 (PST)
 * -- Arthaey 02:35, 28 November 2007 (PST)

Thanks Arthaey
Your fix inspired me to use this to deal with the APR issue: ./configure PYTHON=/usr/bin/python --prefix=$HOME/packages --with-swig=$HOME/packages/bin/swig --without-berkeley-db --with-ssl --with-zlib --with-apr=/usr/local/dh/apache2/template/bin but it generated this warning: /usr/bin/install -c -d subversion/bindings/java/javahl/classes /usr/bin/install -c -d subversion/bindings/java/javahl/include configure: WARNING: we have configured without BDB filesystem support

You don't seem to have Berkeley DB version 4.0.14 or newer installed and linked to APR-UTIL. We have created Makefiles which will build without the Berkeley DB back-end; your repositories will use FSFS as the default back-end. You can find the latest version of Berkeley DB here: http://www.sleepycat.com/download/index.shtml so I'm not sure if this is why I get this error: [scorpion]$ cd subversion-1.4.3 [scorpion]$ svn co http://svn.apache.org/repos/asf/apr/apr/branches/0.9.x apr svn: Mismatched RA version for 'http': found 1.4.3, expected 1.4.2

Format Error Fixed - My Solution
I was finally able to install trac. Here's what I had to do that is different from the script:

1. I used http://natmaster.com/articles/installing_trac_0.10.php for my instructions.

2. I had to download the subversion utils and unzip into the subversion install_files dir:

wget http://subversion.tigris.org/downloads/subversion-deps-1.4.3.tar.gz tar zxf subversion-deps-1.4.3.tar.gz

3. Build neon seperately and then move out of the subversion instal_files dir:

(from within neon)

./configure --with-ssl --enable-shared --with-pic --prefix=$HOME/packages make clean make make install cd .. mv neon ..

4. build svn with shared libs

./configure PYTHON=/usr/bin/python --prefix=$HOME/packages \ --with-swig=$HOME/packages/bin/swig --without-berkeley-db \ --with-ssl --with-zlib --with-libs=/$home/packages

Voila...finally works; 4 hrs down the tubes.

Script currently broken
Script is currently broken, we get this following error:

Any ideas? --Locutus 11:47, 11 June 2007 (PDT)
 * Fixed. --Locutus 12:02, 11 June 2007 (PDT)

Problems not in Article
This is an absolutely great script, but I did notice a few things were left out of the instructions on getting it running. Here's what I had to do outside of the directions to get it running.

First off, the username you use for the trac site and the subversion domain should be the same. Not only that but when you create the subversion repository (in the goodies section), they must be the same at that time. This isn't absolutely necessary, but by default you'll need it. In the trac.ini file there will be a repository_dir path to your repo. This is in the form /home/username/svn/reponame, so if subversion doesn't exist at the same place you'll have to work around it. I'm sure it's possible, but since it's not mentioned in the document it's just easier to have everything under the same username.

You must upload the DreamTracInstall.sh script to your home directory.

I had to create the /packages/lib/python-2.23/site-packages folder manually. Otherwise the install script would fail when it got to that point.

When you run the uninstall script, you still have to clean out the mysql database. Also you'll have to recreate that /packages/lib folder in the previous step.

At a number of places in the script and article it mentions the "database table". This should just be database. The trac setup script will populate this database full of the trac tables needed.

Setting up more Tracs seems incomplete
I used this script to set up a trac domain and it worked great! Thanks to all the contributors...

The section on setting up more tracs (http://wiki.dreamhost.com/DreamTracInstall#Setting_up_more_Tracs) seems to suggest that you just need to call trac admin to set up more Tracs. I haven't tried this myself but it seems like you would also need a bunch of other stuff from the end of the script... It tells you to create a new domain and then you don't reference this anywhere. I think that a copy of the second half of the script is necessary to create a further Trac install - is this right?

I haven't the need to create additional Tracs right now but when I do I will look into it if no-one has answered this comment... Also I think it's possible to have multiple tracs on one domain (maybe even sharing the same DB) but with different users etc. Any ideas on this?

Be careful of special characters in your MySQL setup!
I ran into trouble when my (randomly generated) MySQL password contained an "@" sign. This caused the script to fail when trying to init the Trac project environment. I had to hack the script up a few times to get it to keep going once I had fixed the password. It would be nice if the script could scan for these characters during the verify process.

So, good rule of thumb - Don't use any of @ (ampersand) or : (colon) characters in any of your MySQL configurations (db name, username, password, etc.) --Xangelusx 20:58, 6 September 2007 (PDT)

No dice on Chiclet
Even though the script completes OK, my Trac install returns HTTP 500 server errors, and my log files just say that fcgi returned incompleted headers. Any tips on this?

Also, is this correct: I set up an svn.mydomain.com subdomain, then created a new subversion project at svn.mydomain.com/mysvnproject. I then created a trac.mydomain.com subdomain which is where I installed the script to. Is this the proper setup? I tried it once with a single subdomain (resources.mydomain.com) for both Trac and SVN but couldn't get that to work either. --Xangelusx 22:18, 6 September 2007 (PDT)

Update: Still can't get the install working on Chiclet, even with some help from the Dreamhost support team. --Xangelusx 19:21, 26 September 2007 (PDT)

Update: Dreamhost made changes so that FCGI fails for 99% of its users. Switch to CGI and it will work fine. --akutz 23:28, 5 Jan 2008 (CST)

Trac-Hacks down, use mirror
I'm trying to run the script on an account on Tempest instead, but now Trac-Hacks.org is down. I found a mirror at https://trachacks.coderanger.net/svn/accountmanagerplugin/0.10/ which you can use in the interim. --Xangelusx 19:21, 26 September 2007 (PDT)

Scratch that, the mirrored svn site isn't 100% compatible as a drop-in replacement for the real trac-hacks.org repository. --Xangelusx 19:50, 26 September 2007 (PDT)

Me again, this link works: https://trachacks.coderanger.net/svn/accountmanagerplugin/trunk --Xangelusx 21:05, 27 September 2007 (PDT)

script fails for me...
Unpacking files, please wait...

Starting compilation

./DreamTracInstall.sh: line 226: unexpected EOF while looking for matching `''

[dingdong]$

Line 14 seems to be wrong
As of January 23th 2008 line 14 of the script, which reads:

if [ $1 == "" ]

Should be, instead:

if [ "$1" == "" ]

Otherwise you won't be prompted to enter values for all the options available - the script will simply skip that and create lots of directories inside your $HOME directory.


 * I've fixed a few problems with the script, but it's still broken. Anyone with more time is welcomed to fix it. --Locutus 18:25, 27 January 2008 (PST)

Fixed
Works like a charm! --Da3rX 10:21, 3 March 2008 (PST)

Authentication information not available
After installing I went to http://trac.mydomain.com/.

I clicked on the Login link and received a screen which said (nicely formatted as a trac page, not like a 500 error):

Internal Error Authentication information not available. Please refer to the installation documentation.

What's missing in my install? The installation instructions didn't say anything about configuring a login.

My experience setting up Trac on bruno
Hi all, just adding my experiences setting up trac on Dreamhost (server: bruno)

My configuration...


 * Trac version 0.11
 * not using MySQL
 * python system version 2.4.4

The attached script did not work for me because it attempted to install python 2.3 packages when the system (on bruno at least) has python 2.4.4, to fix this I edited DreamTracInstall.sh and changed all references to 2.3 to read 2.4.

e.g. line 197 (among others) changes from:

WEBADMIN=http://trac.edgewall.org/attachment/wiki/WebAdmin/TracWebAdmin-0.1.2dev_r4240-py2.3.egg.zip?format=raw

to

WEBADMIN=http://trac.edgewall.org/attachment/wiki/WebAdmin/TracWebAdmin-0.1.2dev_r4240-py2. 4 .egg.zip?format=raw

Additionally line 250 needs to specify the install dir as python 2.4, see below:

#Create site-packages directory. Script will fail if this directory doesn't exist. mkdir -p ${PKG}/lib/python2.4/site-packages

echo "Setup Tools" #Setup Tools python ez_setup.py --install-dir=${PKG}/lib/python2.4/site-packages

Because I've installed to the python2.4 directory my .bash_profile has the following... export PYTHONPATH="$HOME/packages/lib/python2.4/site-packages" export LD_LIBRARY_PATH="$HOME/packages/lib" export PATH="$HOME/packages/bin:$PATH"

After Install
After the install completed, going to my trac page resulted in a rather disappointing HTTP 500 server error. Examining the server logs (error.log) showed the following error...

[Wed Aug 06 13:33:09 2008] [error] [client 12.34.56.78] suexec policy violation: see suexec log for more details

Turns out that suexec is picky about file permissions. See http://wiki.dreamhost.com/Perl#Perl_debugging for more details. My solution (perhaps heavy handed) was to:

chmod -R 755 trac_sites chmod -R 755 packages

After that my trac page was finally accessible from the web! Seems to be working so far, thanks to everyone who has contributed to these instructions.

-- Xar 01:39, 8 August 2008 (UTC)