This guide describes how the Pineapple standalone web application is installed under Linux.
Download the client pineapple-standalone-web-client-VERSION.zip from the Downloads page.
Pineapple can be installed in different ways to reflect different usage patterns:
Pineapple will be run under the installing user with default directories.
Unzip pineapple-standalone-web-client-VERSION.zip to any directory. Some examples are:
Once unpacked a directory named pineapple-standalone-web-client-VERSION is created. Example: /opt/pineapple-standalone-web-client-1.8.0. This directory is called the Pineapple installation directory, and referred to as PINEAPPLE_INSTALL_DIR in the remaining part of this guide.
The unzipped archive contains the directory layout:
pineapple-standalone-web-client-VERSION | +--- runPineapple.cmd +--- runPineapple.sh | +--- bin | +- create-runtime-dirs.sh | +- install-service.sh | +- pineapple-service.sh | +- setup.sh | +- uninstall-service.sh | +--- conf | +--- log4j.properties | `--- jetty.xml | +--- webapps | `--- pineapple-web-application-war.war | +--- lib +--- pineapple-jetty-starter-1.0.jar +--- jetty-*.jar +--- log4j-*.jar `--- servlet-api-*.jar
If the PINEAPPLE_INSTALL_DIR/runPineapple.sh isn't executable then:
When Pineapple is started then it will look for configuration files in the Pineapple Home Directory. If no configuration files are found then it will a create a default configuration which allows the application to start and provides a starting point to using the supplied examples.
Pineapple will be installed as a service running under a default user and group. Pineapple will used directories common for services.
Once unpacked a directory named pineapple-standalone-web-client-VERSION is created. Example: /opt/pineapple-standalone-web-client-1.8.0. This directory is called the Pineapple installation directory, and referred to as PINEAPPLE_INSTALL_DIR in the remaining part of this guide.
The unzipped archive contains the directory layout:
pineapple-standalone-web-client-VERSION | +--- runPineapple.cmd +--- runPineapple.sh | +--- bin | +- create-runtime-dirs.sh | +- install-service.sh | +- pineapple-service.sh | +- setup.sh | +- uninstall-service.sh | +--- conf | +--- log4j.properties | `--- jetty.xml | +--- webapps | `--- pineapple-web-application-war.war | +--- lib +--- pineapple-jetty-starter-1.0.jar +--- jetty-*.jar +--- log4j-*.jar `--- servlet-api-*.jar
Rename the PINEAPPLE_INSTALL_DIR from pineapple-standalone-web-client-VERSION to pineapple:
Example:
mv /opt/pineapple-standalone-web-client-VERSION /opt/pineapple
Pineapple contains a script called setup.sh which creates the default user and directory setup for Pineapple. The script creates the setup:
Locate the script in the PINEAPPLE_INSTALL_DIR/bin directory, make it executable and and execute it as root:
chmod +x /opt/pineapple/bin/setup.sh /opt/pineapple/bin/setup.sh
If you require more information about the default setup or a customized setup, please follow these guidelines to Setup Linux users and directories for Pineapple clients.
When Pineapple is started then it will look for configuration files in the Pineapple Home Directory. If no configuration files are found then it will a create a default configuration which allows the application to start and provides a starting point to using the supplied examples.
If you want to use the default configuration then skip to the next installation step (Install as a service).
If you do not want to use the default configuration but want configure Pineapple with your own configuration files, then Pineapple contains a script called create-runtime-dirs.sh which creates the runtime directories used by Pineapple:
Locate the script in the PINEAPPLE_INSTALL_DIR/bin directory, make it executable and execute it as root:
chmod +x /opt/pineapple/bin/create-runtime-dirs.sh /opt/pineapple/bin/create-runtime-dirs.sh
Then add your own configuration files into the /confdirectory and set pineapple:pineapple as owner.
Pineapple contains a script called pineapple-service.sh which can be installed to run Pineapple as an OS service. Pineapple also contains a script called install-service.sh which can be used to install the service script. Locate the script in the PINEAPPLE_INSTALL_DIR/bin directory, make it executable and execute it as root:
chmod +x /opt/pineapple/bin/install-service.sh /opt/pineapple/bin/install-service.sh
Now Pineapple is installed and started as a service running under the user pineapple:pineapple. Pineapple is configured to listen on http://0.0.0.0:7099. The host and port are configured in the etc/init.d/pineapple service script. The used user and group is also configurable in the service script.
The service will use /home/pineapple/.pineapple as the Pineapple Home Directory.
The service can be controlled with the commands:
service pineapple start service pineapple status service pineapple stop service pineapple restart
The service script writes a PID file to /var/run/pineapple/pineapple.pid to capture its process ID.
The service script logs to /var/log/pineapple/pineapple-service.log.
Pineapple contains a script called uninstall-service.sh which can be used to uninstall the service. Locate the script in the PINEAPPLE_INSTALL_DIR/bin directory, make it executable and execute it as root:
chmod +x /opt/pineapple/bin/uninstall-service.sh /opt/pineapple/bin/uninstall-service.sh