Note: *The Hosted Apps platform was retired on 2014-06-19.
The SourceForge team has evaluated this issue and has determined that the Project web platform is not a viable option a Trac installation.
The rest of this document will remain for users that still want to try this regardless, however SourceForge will not assist with installation or maintenance tasks in accordance with our third party application policy for Project web.
BROKEN as of 2013-12-24
You will find a backup of your Trac data in your project's (or user's) web directory root. For a project named PROJECT these are:
/home/project-web/PROJECT/p_PROJECT_trac.sql.gz (the database dump) /home/project-web/PROJECT/p_PROJECT_trac.tar.gz (the web files)
For a user you will have /home/user-web/USER/u_USER_* files instead. You can copy these using rsync/scp/sftp from web.sourceforge.net using your sourceforge username and password.
Go to project home page e.g. http://sourceforge.net/projects/paintown
Select Project Admin => Features
Feature Settings page appears with Enabled Features table
In Project Database (MySQL) row, click Manage
MySQL Service page appears. This shows information including
Host name e.g. mysql-p
Database name prefix e.g. p261620_
Database users e.g. p261620ro, p261620rw, p261620admin
In what follows, replace the above with your own host name, name prefix or users
Enter passwords for the three MySQL user accounts, if you have not already done so
Click Set passwords
A green message will appear, "Password data recorded. Changed passwords will be available on the MySQL server in approximately five minutes."
In Allura, these same tools are available at.
Admin -> Tools -> Mysql
Make sure that you’ve set passwords for your various access accounts, and make note of your required database hostname and prefix for the following step.
Secure copy files to your SourceForge account
$ scp paintown_trac_mysqldump.sql email@example.com: firstname.lastname@example.org's password: paintown_trac_m 100% |*****************************| 2610 KB 00:01 $ scp paintown_trac_files.tar email@example.com: firstname.lastname@example.org's password: paintown_trac_f 100% |*****************************| 8540 KB 00:04
Log into the SourceForge secure shell
$ ssh -t sfuser,email@example.com create sfuser,firstname.lastname@example.org's password: Requesting a new shell for "sfuser" and waiting for it to start. queued... creating... starting... This is an interactive shell created for user sfuser,ogsa-dai. Use the "timeleft" command to see how much time remains before shutdown. Use the "shutdown" command to destroy the shell before the time limit. For path information and login help, type "sf-help". $
Create a database for Trac
Remember to replace mysql-p, p261620admin, p261620_ with your database prefix, database administrator user and database prefix as described in step 2
$ mysqladmin -h mysql-p -u p261620admin -p create p261620_trac Enter password:
Set UTF-8 encoding to created database
$ echo "ALTER DATABASE p261620_trac DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;" | mysql -h mysql-p -u p261620admin -p p261620_trac Enter password:
Load the database dump
$ mysql -h mysql-p -u p261620admin -p p261620_trac < ~/paintown_trac_mysqldump.sql Enter password:
(Alternately, you may use the web interface at https://mysql-t.sourceforge.net. Select the _trac database, select the "import" tab, upload the paintown_trac_mysqldump.sql and import it.)
$ rm ~/paintown_trac_mysqldump.sql
$ cd ~ $ wget http://pypi.python.org/packages/source/v/virtualenv/virtualenv-1.8.2.tar.gz $ tar -vzxf virtualenv-1.8.2.tar.gz $ mv virtualenv-1.8.2/virtualenv.py . $ rm -r virtualenv-1.8.2 $ rm virtualenv-1.8.2.tar.gz $ python2.6 virtualenv.py --system-site-packages /home/project-web/paintown/venv New python executable in /home/project-web/paintown/venv/bin/python Installing setuptools..............................done. Installing pip.....................done.
See Installing Trac without Root Privs for more detail on why you're doing this.
Install other prerequisites:
Go to your CGI directory, and install Trac with easy_install
cd /home/project-web/paintown/cgi-bin /home/project-web/paintown/venv/bin/pip install trac
cd /home/project-web/paintown/ tar -xvf ~/paintown_trac_files.tar mv paintown trac_env
Remove invalid link
Modify /home/project-web/PROJECTNAME/trac_env/conf/trac.ini and change database connection string. Also see if there's anything in there that you want to tweak.
[trac] database = mysql://p261620admin:PASSWORD@mysql-p:3306/p261620_trac
Be sure to replace the bolded variables with your project's mysql information from steps above.
Now, deploy the cgi script.
/home/project-web/paintown/venv/bin/trac-admin /home/project-web/paintown/trac_env deploy /home/project-web/paintown/ chmod +x /home/project-web/paintown/cgi-bin/trac.*
This step may fail due to missing mysql bindings. You can install these bindings via the process described at https://sourceforge.net/p/forge/community-docs/Migrating%20Trac%20from%20Hosted%20Apps/?limit=25&page=3#71f3 until such time as we have these bindings installed.
Trac should now be available at http://paintown.sourceforge.net/cgi-bin/trac.cgi