2009 Jun 01 - Mon
Building WebGUI 7.7.8 on Debian Lenny
It is a couple of years since I built a
WebGUI server.
Last one I built was on a Fedora Linux box.
This article is about building the most recent beta WebGUI on a Debian Lenny Linux box.
The procedure is a bit long, but there is nothing complicated.
I start with a basic Debian build that has the 'Web Server' and 'Standard Build' options
selected.
There are a few packages to install first:
apt-get install ntpdate
ntpdate 0.pool.ntp.org
apt-get install ntp
apt-get install build-essential
apt-get install mysql-server-5.0
apt-get install imagemagick
apt-get install perlmagick
apt-get install exim4-daemon-light
apt-get install exim4-conf
apt-get install libcrypt-ssleay-perl libnet-ssleay-perl
apt-get install libxml-sax-perl
apt-get install libxml-sax-expat-perl
apt-get install libxml-simple-perl
apt-get install libsoap-lite-perl
apt-get install libtext-aspell-perl
apt-get install libapache2-mod-apreq2
apt-get install libapreq2-dev
apt-get install libapache2-request-perl
ln -s /etc/apache2/mods-available/apreq.load /etc/apache2/mods-enabled/apreq.load
Then using
perl -MCPAN -eshell
Install or confirm the installation of the following Perl packages:
install Bundle::CPAN
install Log::Log4perl
install Class::InsideOut
install Config::JSON
install Module::Find
install Tie::IxHash
install Net::Subnets
install Text::CSV_XS
install Tie::CPHash
install Net::LDAP
install Exception::Class
install POE::Component::IKC::ClientLite
install POE::Component::Client::HTTP
install Clone
install HTML::Packer
install Path::Class
install Scope::Guard
install HTML::TagFilter
install DateTime
install HTML::TagCloud
install DateTime::Format::Strptime
install DateTime::Format::Mail
install Class::C3
install MIME::Entity
install XML::FeedPP
install CSS::Minifier::XS
install Color::Calc
install Finance::Quote
install Net::DNS
install Crypt::SSLeay
install XML::Simple
install JavaScript::Packer
install JavaScript::Minifier::XS
install Archive::Any
install HTML::Template::Expr
install SOAP::Lite
install Weather::Com::Finder
install Image::Size
install Image::Info
install Template
install Image::ExifTool
install Business::Tax::VAT::Validation
install HTML::Highlight
install CSS::Packer
install Contextual::Return
force install Test::Class
install Test::MockObject
install Text::Aspell
Download and expand the current software from SourceForge:
cd /usr/src
wget http://voxel.dl.sourceforge.net/sourceforge/pbwebgui/webgui-7.7.8-beta.tar.gz
tar -zxvf webgui-7.7.8-beta.tar.gz
Move some files around:
mkdir /data
mv WebGUI /data/
cd /data/WebGUI/etc/
cp log.conf.original log.conf
touch /var/log/webgui.log
chown www-data.www-data /var/log/webgui.log
cp spectre.conf.original spectre.conf
mkdir -p /data/domains/www.example.com/public/extras
mkdir /data/domains/www.example.com/logs
cp WebGUI.conf.original www.example.com.conf
cp -R /data/WebGUI/www/uploads /data/domains/www.example.com/public/
chown -Rf www-data.www-data /data/domains/www.example.com/public/uploads
Append the following to /etc/rc.local:
cd /data/WebGUI/sbin
perl spectre.pl --daemon
Add the following to /etc/apache2/httpd.conf:
PerlSetVar WebguiRoot /data/WebGUI
PerlCleanupHandler Apache2::SizeLimit
PerlRequire /data/WebGUI/sbin/preload.perl
Add the following to /etc/apache2/sites-enabled/000-default:
ServerName www.example.com
ServerAlias www.example.com
DocumentRoot /data/domains/www.example.com/public
SetHandler perl-script
PerlInitHandler WebGUI
PerlSetVar webguiConfig www.example.com.conf
Alias /extras /data/WebGUI/www/extras
Alias /uploads /var/local/webgui/uploads
Check that all the Perl packages are loaded:
cd /data/WebGUI/sbin
./testEnvironment.pl
Create the MySQL Database:
cd /data/WebGUI/etc
mysql -e "create database www_example_com"
mysql -e "grant all privileges on www_example.com.* to webgui@localhost identified by 'password'"
mysql -e "flush privileges"
mysql -uwebgui -ppassword www_example_com < /data/WebGUI/docs/create.sql
The /data/WebGUI/etc/www.example.com.conf file may need updates:
"sitename" : ["www.example.com",example.com"],
"dsn" : "DBI:mysql:www_example_com",
"dbuser" : "webgui",
"dbpass" : "password",
"uploadsPath" : "/data/domains/www.example.com/public/uploads",
"spectreSubnets" : ["127.0.0.1/32", "123.123.123.123/32"],
Start up Spectre:
cd /data/WebGUI/sbin
perl spectre.pl --daemon
Restart the web server:
/etc/init.d/apache2 restart
Browse to www.example.com and get started!
If you would like a pre-configured WebGUI server capable of running on VMWare let me
know. I can even host Virtual Sessions.
Note: there is a problem with the "uploadsPath" thing.
Note: there is a problem with the "fileCacheRoot" thing.
|