Open ximex opened 9 years ago
Uniliquid Install Script:
#!/bin/bash
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root, you may afterwards chroot everything..." 1>&2
exit 1
fi
path=`pwd`
prepare_packages()
{
apt-get update
apt-get upgrade
apt-get install git lua5.1 postgresql build-essential libpq-dev liblua5.1-0-dev lighttpd ghc imagemagick exim4
apt-get install libghc-parsec3-dev
apt-get install libghc6-parsec3-dev
su postgres -c "createuser -S -d -R www-data"
mkdir -p /opt/uniliquid_core
mkdir -p /opt/uniliquid_frontend
mkdir -p /opt/webmcp
mkdir -p /opt/uniliquid_statistics
mkdir -p /opt/uniliquid_dumps
mkdir -p /opt/rocketwiki-lqfb
}
developer=true
prepare_core()
{
echo "Are you planning to develop on this machine? (Yes means: clone via SSH, No means: clone via HTTPS)"
select yn in "Yes" "No"; do
case $yn in
Yes ) developer=true; break;;
No ) developer=false; break;;
esac
done
cd /opt/uniliquid_core
git clone https://github.com/uniliquid/core.git .
cp -f /opt/uniliquid_core/60-uniliquid.conf /etc/lighttpd/conf-available/60-uniliquid.conf
if [ $developer ]; then
git remote rename origin old
git remote add origin git@github.com:uniliquid/core.git
git remote rm old
fi
make
su www-data -c "createdb uniliquid"
su www-data -c "createlang plpgsql uniliquid"
su www-data -c "psql -v ON_ERROR_STOP=1 -f core.sql uniliquid"
cd $path
}
vwebmcp="1.2.5"
prepare_webmcp()
{
cd $path
wget http://www.public-software-group.org/pub/projects/webmcp/v$vwebmcp/webmcp-v$vwebmcp.tar.gz
tar -xvzf webmcp-v$vwebmcp.tar.gz
cd webmcp-v$vwebmcp
cp -f /opt/uniliquid_core/webmcp_Makefile.options Makefile.options
make
cp -fRL framework/* /opt/webmcp/
cd $path
}
vrocketwiki="0.4"
prepare_rocketwiki()
{
cd $path
wget http://www.public-software-group.org/pub/projects/rocketwiki/liquid_feedback_edition/v$vrocketwiki/rocketwiki-lqfb-v$vrocketwiki.tar.gz
tar -xvzf rocketwiki-lqfb-v$vrocketwiki.tar.gz
cd rocketwiki-lqfb-v$vrocketwiki
make
cp -f rocketwiki-lqfb rocketwiki-lqfb-compat /opt/rocketwiki-lqfb/
cd $path
}
prepare_frontend()
{
cd /opt/uniliquid_frontend
git clone https://github.com/uniliquid/frontend.git .
if [ $developer ]; then
git remote rename origin old
git remote add origin git@github.com:uniliquid/frontend.git
git remote rm old
fi
cd $path
cd /opt/uniliquid_frontend/locale
PATH=/opt/rocketwiki-lqfb:$PATH make
chown www-data /opt/uniliquid_frontend/tmp
}
prepare_services()
{
dpkg-reconfigure exim4-config
lighttpd-enable-mod uniliquid
cd /opt/uniliquid_frontend/config
cp -f example.lua myconfig.lua
su www-data -c "cd /opt/uniliquid_core && ./lf_update dbname=uniliquid && echo OK"
cd /opt/uniliquid_core/
chmod +x /opt/uniliquid_core/lf_update
chmod +x /opt/uniliquid_core/lf_notification_loop
cp -f lf_updated.d /etc/init.d/lf_updated
chmod +x /etc/init.d/lf_updated
update-rc.d-insserv lf_updated defaults
insserv lf_updated
service lf_updated start
cp -f lf_notification.d /etc/init.d/lf_notification
chmod +x /etc/init.d/lf_notification
update-rc.d-insserv lf_notification defaults
insserv lf_notification
service lf_notification start
service lighttpd restart
cd $path
}
cleanup()
{
rm -rf $path/webmcp-v$vwebmcp
rm -rf $path/webmcp-v$vwebmcp.tar.gz
rm -rf $path/rocketwiki-lqfb-v$vrocketwiki.tar.gz
rm -rf $path/rocketwiki-lqfb-v$vrocketwiki
}
prepare_packages
prepare_core
prepare_webmcp
prepare_rocketwiki
prepare_frontend
prepare_services
cleanup
Altes? Install-Script
https://github.com/PPOE/lqfb_install/blob/master/lq_install.sh
Anregungen im PPAT Pad
https://ppoe.piratenpad.de/LQFB-Anregungen