You need a standard GNU development environment with
C compiler (for example the GNU C Compiler gcc)
Depending on your distribution, several development packages might be needed to provide a fully functional C development environment.
Note for developers: if you want to regenerate the .pot template from the source files, you will need xgettext with Python support. This is available in gettext >= 0.12.
Python >= 2.5 from http://www.python.org/ with zlib support
runit >= 1.3 from http://smarden.org/runit/
Optional but recommended (used by ImageSize and ImageReducer modules) Python Imaging Library (PIL) from http://www.pythonware.com/products/pil/
Optional but recommended (speedup for i386 compatible PCs) Psyco from http://psyco.sourceforge.net/ [http://sourceforge.net/projects/psyco/files/psyco/1.6/psyco-1.6-src.tar.gz/download]
Optional (used by VirusFilter module) ClamAv from http://www.clamav.net/
Optional (used for NTLM authentication) Python Crypto Module from http://www.amk.ca/python/code/crypto.html
Direct download links are in brackets.
Install Python >= 2.5 from http://www.python.org/ [http://www.python.org/ftp/python/2.6.4/python-2.6.4.msi]
Install Python for Windows Extensions from http://sourceforge.net/projects/pywin32/ [http://sourceforge.net/projects/pywin32/files/pywin32/Build%20214/pywin32-214.win32-py2.6.exe/download]
To run Pythonwin, you may need a copy of the Microsoft MFC DLLs. You should only install these files if the install process tells you the DLL can not be found, or if Pythonwin fails to start due to this DLL missing. You can download at http://www.dll-files.com/dllindex/dll-files.shtml?mfc71 Download this file and save it to your Windows System32 directory.
Optional but recommended (used by ImageSize and ImageReducer modules) Install Python Imaging Library (PIL) from http://www.pythonware.com/products/pil/ [http://effbot.org/media/downloads/PIL-1.1.6.win32-py2.6.exe]
Optional but recommended (used for SSL connections) Install OpenSSL and PyOpenSSL for Windows from http://www.shininglightpro.com/products/Win32OpenSSL.html [http://www.shininglightpro.com/download/Win32OpenSSL-0_9_8o.exe] and http://pyopenssl.sourceforge.net/ [http://pypi.python.org/packages/2.6/p/pyOpenSSL/pyOpenSSL-0.10.winxp32-py2.6.msi]
Optional but recommended (speedup for i386 compatible PCs) Psyco from http://psyco.sourceforge.net/ [http://www.voidspace.org.uk/downloads/psyco-1.6.win32-py2.6.exe]
Optional (used for NTLM authentication) Download Python Crypto Module from http://www.amk.ca/python/code/crypto.html [http://www.voidspace.org.uk/downloads/pycrypto-2.0.1.win32-py2.6.exe]
Optional (used by VirusFilter module) ClamAv from http://code.google.com/p/clamav-sosdg/ [http://clamav-sosdg.googlecode.com/files/clamav-0.95-1a.exe]
Only needed if you compile from source: install the MinGW suite from http://www.mingw.org. Be sure to install in the given order:
Be sure to have installed all required Unix/Linux software listed above.
Run ./configure --enable-shared && make to compile the included C libraries. Run python setup.py build to compile the Python files. For help about the setup.py script options, run python setup.py --help. The CC environment variable is checked before compilation, so you can change the default C compiler with export CC=myccompiler. If you work from CVS, you must run ./autogen.sh first to generate the configure and Makefile files.
Installation as root
Run su -c 'python setup.py install' to install the proxy. Run su -c 'webcleaner-certificates install' to install the certificates. Run su -c 'make installservice' to install the runit service.
Installation as a normal user
Run python setup.py install --home $HOME. Note that you have to adjust your PATH and PYTHONPATH environment variables, eg. by adding the commands export PYTHONPATH=$HOME/lib/python and export PATH=$PATH:$HOME/bin to your shell configuration file.
For more information look at the Modifying Python’s search path documentation.
Now run webcleaner-certificates install to install the SSL certificates. After that read the runsvdir(8) documentation on how to setup a local runit service.
If you downloaded Psyco please read the psyco installation docs.
WebCleaner is now installed as a runit service and will start automatically in 5 seconds. See the main page on how to configure the proxy filters.
Be sure to have installed all required windows software listed above.
Register the Python service control.
Change to the directory where PythonService.exe is located, which is usually c:\python25\Lib\site-packages\win32, and execute c:> PythonService.exe /register. This has to be done only once after installing the Python for Windows Extensions.
Execute the webcleaner-x.xx.win32-py2.5.exe file and follow the instructions.
Be sure to have installed all required windows software listed above. Note that a ‘c:\>’ prompt describes a command shell launched via cmd.exe, a ‘% ‘ prompt describes a MSYS shell.
If you do not want to recompile the PyOpenSSL installer yourself, skip to step 3. Otherwise read ahead.
Compile and install PyOpenSSL
Change to the directory where you installed the Win32OpenSSL software into (for example c:\OpenSSL). Now fix the library names for the mingw compiler: c:\OpenSSL> cd lib\MinGW && move ssleay32.a libssleay32.a && move ssleay32.def libssleay32.def
Extract pyOpenSSL-0.6.tar.gz and change into the generated directory (for example c:\pyOpenSSL-0.6). Open a text editor for setup.py and replace ‘libeay32’ with ‘eay32’. Then run: c:\pyOpenSSL-0.6> python setup.py build_ext -c mingw32 -I c:\OpenSSL\include -L c:\OpenSSL\lib\MinGW bdist_wininst
This generates a binary installer dist\pyOpenSSL-0.6.win32-py2.5.exe which you just have to execute.
Generate the WebCleaner installer
Change to the webcleaner-X.Y directory and run c:> python setup.py sdist --manifest-only and c:> python setup.py build -c mingw32 bdist_wininst.
This generates a binary .exe installer dist\webcleaner-X.Y.win32-py2.5.exe. Read above on how to install the binary .exe installer.
If you installed Psyco please read the psyco installation docs.
WebCleaner is now downloaded and started as a regular Windows service. See the main page on how to configure the proxy filters.
You can search the webcleaner-users archive if your problem has already been reported.
Errors are logged in the runit log file located at /var/service/webcleaner/log/main/current
Make sure the proxy is started. First look at the system event logger where startup errors are logged. Do this by executing Settings -> Control Panel -> Administrative Tools -> Event Viewer and look at the “Application Log” events. There should be an entry saying The WebCleaner service has started.
Then start a DOS command prompt and execute c:> netstat -a -n -p TCP. In the listing there should be an entry like TCP 0.0.0.0:8080 0.0.0.0:0 LISTENING which tells you that the WebCleaner proxy port 8080 is ready to accept incoming connections.
A proxy restart can take a while. If the web configuration site refreshes itself after a restart the proxy might just not be up and running again. Just wait and press the Reload button in your browser until the webpage can be displayed.
Take a look in the WebCleaner log file. It is located at c:\python25\share\webcleaner\config\webcleaner.log where c:\python25 should be replaced with the directory you installed Python into.
The log file has more detailed information as the application event log. The line WebCleaner listening on *:8080 tcp tells you that the proxy is running. You can also turn on debugging by replacing INFO with DEBUG in the file c:\python25\share\webcleaner\config\logging.conf. After a restart, the log should be filled with debug statements.
Make sure firewall rules allow proxy connections. If you have enabled a firewall, make sure that connections to and from the proxy are allowed. Most firewall products have a log file where you can see disallowed connection attempts.