Set up a SQUIN service using the install packages
From squin
This page gives a description on how to set up a SQUIN service using the installation packages provided on the project page. If you want to compile SQUIN yourself, you can also set up a SQUIN service using the sources.
Contents |
Requirements
Make sure you have Java 1.6 installed on your machine. You can check that by typing
java -version
in a shell.
Download & Unpack
Download the installation packages from the SQUIN project page on SourceForge.net. You should get a file called SQUIN-Standalone-*.zip that contains SQUIN bundled with the Java servlet container Jetty. By unzipping this file you get a directory that contains everything you need to set up a SQUIN service. Move this new SQUIN directory somewhere on your webserver, for example to code>/opt/squin</code>. Change to that directory.
Configure
Usually, no configuration is needed. However, if there is already a service running on port 8080 (for example Tomcat), you have to adjust the configuration file etc/jetty.xml in the SQUIN directory. Find the line that says
<Set name="port"><SystemProperty name="jetty.port" default="8080"/></Set>
Change the port number 8080 in this line to a port not used by another service in your system. Don't forget to safe the file.
Furthermore, you may want to set configuration options for your SQUIN service.
Launch
- Unix-like OS: In the SQUIN directory execute the shell command
./bin/squin.sh startto launch the SQUIN service. - Windows OS: Open the command line interface, enter the SQUIN directory, and call
java -DOPTIONS=default,plus -jar start.jar.
Check Installation
Navigate to the URL http://example.com:8080/SQUIN/ to see your SQUIN service in action. Replace example.com with your host name / IP address. If you changed the port number in etc/jetty.xml you, additionally, have to replace 8080 by your port number.
Autostart SQUIN
If you are using Linux, you may want to set up the SQUIN service for automatic startup during system boot. You need root privileges in order to do so.
Copy the file bin/squin.sh from the SQUIN directory to /etc/init.d/squin:
cp <... your SQUIN dir. ...>/bin/squin.sh /etc/init.d/squin
Open the new file /etc/init.d/squin in an editor and uncomment the third line.
#!/bin/bash # Changes for SQUIN distribution JETTY_HOME=/opt/squin [...]
The variable JETTY_HOME refers to the SQUIN directory (which is /opt/squin in the example). If you have moved the SQUIN directory to another location, use this path instead of /opt/squin. Don't forget to save the file.
Finally, you have to add the SQUIN service to your runlevel. On Debian Linux as well as on Unbuntu you can do this with the following command:
update-rc.d squin start 99 5 .
Troubleshooting
If anything goes wrong (e.g. nothing happens upon opening the URL) you may want to check the SQUIN log files in the subdirectory logs/ of the the SQUIN directory.
