Installing & Configuring Webware on Debian (sarge)
Date: Sept. 8, 2005
OS: Debian GNU/Linux 3.1 (sarge) on x86 (865 chipset)
Webserver: Apache/1.3.33
Python: 2.3.5
Webware: 0.8.1
NOTE: Referenced files hosted here have a '.txt' extension, but will not have that on your server.
Install Apache Packages
Webware/WebKit installation requires Debian packages:
- apache
- apache-dev (for apxs)
root@box:/etc/apt# apt-get install apache root@box:/etc/apt# apt-get install apache-dev
Install Webware
I decided to install the Webware source stuff in /opt.
root@box:/# cd opt root@box:/opt# tar xzf ./Webware-0.8.1.tar.gz root@box:/opt# rm Webware-0.8.1.tar.gz root@box:/opt# cd Webware-0.8.1/
Call the installation script and bypass password prompt.
root@box:/opt/Webware-0.8.1# python install.py --password-prompt=no
Create and activate the runtime directory.
root@box:/opt/Webware-0.8.1# cd /usr/local/gary root@box:/usr/local/gary# mkdir wk root@box:/usr/local/gary# cd /opt/Webware-0.8.1/bin/ root@box:/opt/Webware-0.8.1/bin# ./MakeAppWorkDir.py /usr/local/gary/wk/
Install mod_webkit
Install the Apache-native module. First, edit Makefile to point to proper apxs.
root@box:/opt/Webware-0.8.1/WebKit/Adapters/mod_webkit# pico MakefileSpecifically, fix the line:
APXS=/usr/sbin/apxs
... and point to:
APXS=/usr/bin/apxs
View Makefile.
root@box:/opt/Webware-0.8.1/WebKit/Adapters/mod_webkit# make root@box:/opt/Webware-0.8.1/WebKit/Adapters/mod_webkit# make install
Configure Apache
Edit the Apache config to add Location directive (root location doesn't work).
root@box:/opt/Webware-0.8.1/WebKit/Adapters/mod_webkit# cd /etc/apache/ root@box:/etc/apache# pico httpd.confAdd this part (outside any other directive):
<Location /wk>
WKServer localhost 8086
SetHandler webkit-handler
</Location>
View sample httpd.conf. This is Debian's default httpd.conf file with the Location directive added; note that the LoadModule and AddModule directives were automatically added to this file when mod_webkit was compiled.
Start Webkit on Boot
Set up the webkit start script. Edit first, then add to rc.d.
root@box:/opt/Webware-0.8.1/WebKit# pico webkitSpecifically, change these lines to match the location(s) of the runtime directory and its PID file:
# Configuration section WEBKIT_DIR=/usr/local/gary/wk PID_FILE=$WEBKIT_DIR/appserverpid.txtView sample webkit start script.
Add to init scripts.
root@box:/opt/Webware-0.8.1/WebKit# cp webkit /etc/init.d/ root@box:/etc/rc.d/init.d# cd /etc/init.d/ root@box:/etc/init.d# update-rc.d webkit defaults
Configure Default Context
Create and setup the default context for webkit to use.
root@box:/usr/local/gary/wk# mkdir ui root@box:/usr/local/gary/wk/Configs# pico Application.configSpecifically, change the "Contexts" section of this file appropriately.
'Contexts': {
'Admin': '%(WebKitPath)s/Admin',
'Examples': '%(WebKitPath)s/Examples',
'Testing': '%(WebKitPath)s/Testing',
'MyContext': 'MyContext',
'ui': 'ui',
'default': 'ui',
},
View sample Application.config file. This is the default file with only the "Contexts" section altered, and the admin. password obfuscated.
Reboot and hit http://localhost/wk/ which will serve Main.py (or index.py) from the filesystem at /usr/local/gary/wk/ui/.