Freitag, 30. Januar 2009

(very) simple howto for updating laconi.ca

that's how i usually do it on my ubuntu slice @ slicehost:
# stop the machines
apache2ctl stop
/var/www/scripts/stopdaemons.sh
# make room for new code
mkdir /root/lacolatest
cd /root/lacolatest
# get new code
# according to evans mail on january 30 2009.
#
git clone http://git.gitorious.org/laconica/mainline.git
# create bakup dir
mkdir /root/bakup-laco-onebeforelatest
# copy old code there
cp /var/www/* -R /root/bakup-laco-onebeforelatest/
# bakup the db
mysqldump -u root --password=[password] -c -t --hex-blob laconica > /root/bakup-laco-onebeforelatest/db-laco-onebeforelatest.sql
# make way for the new one
rm /var/www/* -R
# move new code to web directory
cp /root/lacolatest/mainline/* -R /var/www/
#
# move over old config file
cp /root/bakup-laco-onebeforelatest/config.php /var/www/
#
# NOW as new features appear in config.php.sample:
# compare
# /var/www/config.php
# with
# /var/www/config.php.sample
# and add in
# /var/www/config.php
# what is new in
# /var/www/config.php.sample
#
# prepare htaccess
cp /var/www/htaccess.sample /var/www/.htaccess
joe /var/www/.htaccess
change /mublog/ to where your laconica-base is. mine is /
# move over the existing avatars to the new dir
cp /root/bakup-laco-onebeforelatest/avatar/* /var/www/avatar/
# make avatar-dir writeable for apache
chgrp www-data /var/www/avatar
chmod g+w /var/www/avatar
# dump, drop, re-create and fill the db
/var/www/scripts/rebuilddb.sh root [password] laconica /var/www/db/laconica.sql
# if PEAR is already installed, elsewhere, as on my linux:
mv /var/www/extlib/PEAR.php /var/www/extlib/PEAR.php.depot
# back to business
apache2ctl start
/var/www/scripts/startdaemons.sh
# completely unnecessary:
reboot

Keine Kommentare: