Tutorial
nemilya <nemilya-JGs/[email protected]> Sat, 15 Nov 2003 00:57:51 +0500
| Newsgroups | gmane.comp.web.syncato.general |
|---|---|
| Organization | home |
| Message-ID | <[email protected]> |
Tutorial (for one day study of webware+syncato)
Python2.2, win2000
Installation Webware
--------------------
First of all - about Webware.
You need to install it, in folder Webware-0.8.1:
python install.py
You have to understund that Webware is ApplicationServer,
for work it need Web-server, f.e. Apache, and need adapter to work
with them.
For this purposes in WW there is WebKit, where there are some
adapters.
I have used: 'mod_webkit' for installed apache1.3.17
in folder 'WebKit/Adapters/mod_webkit' there is file 'apache.conf'
part of apache's configuration. This file is needed to add to main
httpd.conf file:
> LoadModule webkit_module modules/mod_webkit.so
> AddModule mod_webkit.c
>
> AddType text/psp .psp
> AddHandler psp-handler .psp
>
> <Location /WKMod>
> WKServer localhost 8086
> SetHandler webkit-handler
> </Location>
You have to copy file 'WebKit/Adapters/mod_webkit/mod_webkit.dll' to
folder 'modules' of your apache installation, and rename to 'mod_webkit.so'
(or change directive LoadModule)
You can note at directive 'Location' that prefix 'WKMod' in url, will
redirect requests to the handler 'webkit-handler' which is 'mod_webkit',
also there is parameter 'WKServer' which define ip and port of
application server.
Then we start Apache (web-server), and start WebWare (application
server), they are communicate by ip and port (directive 'WKServer').
In reality this programms can be runned on different machines.
For start Webware we run: WebKit/AppServer.bat
Then we open our web-browser and enter url:
http://localhost/WKMod
we will see Webware start page, where possible to see examples.
Installation syncato
--------------------
(You need to have instaled libxml, libxslt and python bindings)
In file README.txt is nice described what to do.
Rename '/WKMod' to '/WK' in httpd.conf ('Location').
Adding authentification if needed.
For win installation copy file 'WebKit/AppServer.bat' (from Webware)
to 'syncato-0.6/webware' folder.
Then configure 'syncato-0.6/webware/Launch.py' file.
webwarePath = '/Volumes/Home/kstaken/Workspace/Webware'
will be:
webwarePath = 'd:\\work\\Webware-0.8.1'
where I untar archive of webware.
appWorkPath = '/Volumes/Home/kstaken/Workspace/Book/Blog/webware'
will be:
appWorkPath = 'd:\\work\\syncato-0.6\\webware'
possible:
sys.path.append('../dist/scripts/lib')
sys.path.append('../dist/client')
to:
sys.path.append('..\\dist\\scripts\\lib')
sys.path.append('..\\dist\\client')
Configuration syncato's xml-config:
file 'syncato-0.6/config/config.xml'
change 'base-url', 'admin-url', 'content-url' if you apache server is
runned not in 80 port.
Note: copy file 'syncato-0.6/syncato.css' to the apache's root, where
this file will be accessible.
Create directories (relative '..' of Launch.py)
'syncato-0.6/data/file-data'
'syncato-0.6/data/cache'
For python22 change cgi.py module ('python22/Lib/cgi.py')
add function:
def unescape(s, quote=None):
s = s.replace("<", "<")
s = s.replace(">", ">")
if quote:
s = s.replace('"', '"')
s = s.replace("&", "&")
return s
Restart apache, and start 'syncato-0.6/webware/AppServer.bat'
And try to go to url:
http://localhost/WK/blog - to see blog, and
http://localhost/WK/Admin/admin - to see admin part
added posts are stored in 'syncato-0.6/data/file-data' as separate
xml file.
It's all.
Suggestions (spell corrections) are welcomed :)
Ilya
-------------------------------------------------------
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from
any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl