Version 7 (modified by Fran Boon, 12 years ago) ( diff )


Trac Upgrade

Build new Server from CD on temporary IP

Upgrade to Squeeze

apt-get install openssh-server sudo lrzsz psmisc apt-file subversion python-setuptools python-docutils python-pygments bzr libapache2-mod-wsgi postgresql-8.4 python-psycopg2
a2enmod ssl
a2enmod rewrite
a2enmod deflate
a2enmod headers
a2enmod expires
dpkg-reconfigure exim4-config

Copy users:

adduser xxx
less /etc/shadow

(copy & paste password)

Local Repo:

mkdir -p /home/sahana/bzr
cd /home/sahana/bzr
bzr branch lp:sahana-eden trunk
vim /home/sahana/bzr/update 
cd /home/sahana/bzr/trunk
bzr pull
bzr export /home/sahana/bzr/eden.tar.gz /home/sahana/bzr/trunk

vim /etc/crontab
0 */6   * * *   root    /home/sahana/bzr/update


mkdir ~/release
tar zxvf Fabric-0.9.3.tar.gz
cd Fabric-0.9.3
python install
cd ..
tar zxvf pexpect-2.4.tar.gz
cd pexpect-2.4
python install
cd ..
cp /home/sahana/bzr/trunk/static/scripts/tools/ .
(restore from backup)
cp sahana_release* /root/.ssh

Install Trac 0.12.1 & Plugins:

easy_install Babel==0.9.5 Genshi==0.6
easy_install Trac
svn co accountmanagerplugin 
cd accountmanagerplugin
python install
cd ..
svn co recaptcharegisterplugin 
cd recaptcharegisterplugin
python install
cd ..
bzr branch trac-bzr 
cd trac-bzr 
python install
cd ..
svn co mathcaptchaplugin 
cd mathcaptchaplugin
python install
cd ..
svn co sectioneditplugin 
cd sectioneditplugin
python install
cd ..
svn co translatedpagesmacro 
cd translatedpagesmacro
python install
cd ..
svn co tocmacro 
cd tocmacro 
python install
cd ..
svn co externallinksnewwindowplugin 
cd externallinksnewwindowplugin 
python install
cd ..
svn co screenshotsplugin 
cd screenshotsplugin 
python install
cd ..


svn co pydotorgtheme
cd pydotorgtheme 
python install


cd /usr/local/lib/python2.6/dist-packages/TracPyDotOrgTheme-2.0-py2.6.egg/pydotorgtheme/htdocs/
rm pydotorg.css
(replace from backup)
vim /usr/local/lib/python2.6/dist-packages/Trac-0.12.1-py2.6.egg/trac/htdocs/css/ticket.css +118
#comment { margin-left: -1px; margin-right: -1px; padding: 0; /* width: 100% */}

Shutdown old server

apache2ctl stop

Copy data:

cd /home/sahana
tar cvf trac.tar trac
gzip -9 trac.tar
scp .
cd /home/sahana
rm -rf trac
tar zxvf trac.tar.gz
rm -rf /home/sahana/trac/eggs/*


trac-admin /home/sahana/trac upgrade
trac-admin /home/sahana/trac wiki upgrade
trac-admin /home/sahana/trac repository resync '*'

IP in Apache (SSL) as well as system (after shutting down old server):

vim /etc/apache2/sites-available/trac
vim /etc/network/interfaces
Note: See TracWiki for help on using the wiki.