Skip to content

Instantly share code, notes, and snippets.

@xvaara
Created April 6, 2012 10:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xvaara/2318748 to your computer and use it in GitHub Desktop.
Save xvaara/2318748 to your computer and use it in GitHub Desktop.
install webgui 8 on debian stable
#!/bin/sh
# run on a clean debian stable
# install webgui 8, using my little tweaks to get things going.
# xdanger
#percona mysql 5.5
gpg --keyserver hkp://keys.gnupg.net --recv-keys 1C4CBDCDCD2EFD2A
gpg -a --export CD2EFD2A | apt-key add -
echo "deb http://repo.percona.com/apt squeeze main" >> /etc/apt/sources.list
apt-get update
#Debian packages:
apt-get install perlmagick libssl-dev libexpat1-dev git percona-server-server-5.5 libmysqlclient18-dev curl build-essential
#webgui from github
mkdir /data
cd /data
git clone https://github.com/plainblack/webgui.git WebGUI
cd WebGUI
mkdir extlib
#fix version number to match create.sql
perl -p -i -e "s/8\.0\.1/8\.0\.0/g" lib/WebGUI.pm
#cpanm
curl -L http://cpanmin.us | perl - App::cpanminus
export PERL5LIB=/data/WebGUI/lib:/data/WebGUI/extlib/lib/perl5
#perl modules , the "-n" in the end means no tests are run, it's faster, but not safer
perl sbin/testEnvironment.pl --simpleReport | grep 'Checking for module'|grep -v 'Magick'| perl -ane 'print $F[3]. " "' | perl -pe 's/: / /g'|cpanm -n -L extlib
cp etc/WebGUI.conf.original etc/WebGUI.conf
cp etc/log.conf.original etc/log.conf
#get a working create.sql because someone messed up the one in repo
perl -p -i -e "s/TYPE=InnoDB CHARSET=utf8/ENGINE=InnoDB DEFAULT CHARSET=utf8/g" share/create.sql
perl -p -i -e "s/TYPE=MyISAM CHARSET=utf8/ENGINE=MyISAM DEFAULT CHARSET=utf8/g" share/create.sql
mysql --password --user=root -e "create database www_example_com"
mysql --password --user=root -e "grant all privileges on www_example_com.* to webgui@localhost identified by 'password'"
mysql --password=password --user=webgui www_example_com < share/create.sql
#run webgui. -- For faster server install "cpanm -L extlib Starman" and add " -s Starman --workers 10 --disable-keepalive" to plackup command
export PERL5LIB=/data/WebGUI/lib:/data/WebGUI/extlib/lib/perl5
extlib/bin/plackup app.psgi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment