Install CMUCL or CLISP or ClozureCL (or some combination of the above). Also ensure you have perl, gcc, zlib, and all necessary header files installed.
Download Antiweb, extract it, and cd into the Antiweb directory:
$ tar zxf antiweb-X.tar.gz
$ cd antiweb-X
OPTIONAL: Modify the build options at the top of build.lisp. Alternatively, create a local.lisp file.
Build Antiweb. This depends on your lisp environment. For CMUCL, use this command:
$ lisp -quiet -load build.lisp
For CLISP, use this command
$ clisp -q build.lisp
For ClozureCL, use this command
$ ccl64 -Q -l build.lisp
When finished, the build script should inform you it has saved your lisp image.
Antiweb will not rudely scatter files around your filesystem without telling you. cd into the bin directory and review the install.sh script:
$ cd bin
$ cat install.sh
Once satisfied, become root and run the install script (make sure you are in the bin directory):
$ su
Password:
# ./install.sh
For information on the files that are installed, see filesystem.
If using CMUCL, you will now need to repeat the build and install process a second time (go back to step 4). This is because when your image is saved, the libantiweb32.so shared library must be available as a system library. For more details, see this FAQ entry.
Antiweb should now be installed. Next create a hub directory:
# antiweb -skel-hub-dir 20000 /var/aw
The first argument to -skel-hub-dir (20000 above) is the UID that you plan to run the hub as. OPTIONAL: If you have a user created, you can give the user name instead of a UID number.
The hub directory you specified should have been created. OPTIONAL: You can now edit the created hub.conf file (ie /var/aw/hub.conf).
You now need to create one or more worker conf files. They can be stored anywhere, but a good place is along with the hub.conf file in the hub directory:
# antiweb -skel-worker-basic > /var/aw/worker.conf
Antiweb Tip
-skel-worker-basic is just one of the possible worker skeletons. To see a list of all of them, run antiweb with no arguments. You will now need to edit the created worker conf (ie /var/aw/worker.conf). At a minimum, you must specify the hub directory created in the previous step, the UID this worker should run as, the virtual hosts this worker should handle, and the location of the HTML root for this worker. For complete details on the config file format, see the worker conf file reference.
IMPORTANT: No conf files should ever be owned or writeable by a UID that a hub or worker runs as. The conf files don't even need to be readable to them (but a worker's current conf file is stored in memory so making it unreadable only prevents other workers from reading it.).
Finally, launch the hub and worker processes:
# antiweb -hub /var/aw
# antiweb -worker /var/aw/worker.conf
You may also want to ensure that these launch commands are run at start-up. They must be run by root.
- If anything goes wrong, the first place to look is at the bottom of the syslog file (ie /var/aw/aw_log/syslog).