User Tools

Site Tools


products:cockpit:1.0:installguide:installredpeakscockpit

Install Redpeaks Cockpit

The application can be installed on most common Linux distributions running systemd. The syntax of the commands described below might change from one distribution to another.

You run Pro.Monitor Cockpit on Tomcat 9 today: do not use this page, follow Migrate Pro.Monitor Cockpit to Redpeaks Cockpit.

Prerequisites

  • A root shell on the server.
  • Java 21 or later. Check with java -version. When Java is missing or older, see Install JAVA. The installer stops when Java is missing or too old.

Install

Download the install package and extract it in an empty folder of your home directory. Do not copy the archive in /opt folder

mkdir ~/cockpit-install && cd ~/cockpit-install
tar -xzf Redpeaks-Cockpit-<version>_<build>.tar.gz

This will create the following files:

  • Redpeaks-Cockpit.tar.gz : The application package
  • install.sh : The install script
  • update.sh : The update script
  • install_java.sh : The Java install script
  • migrate.sh : The migration script from Pro.Monitor Cockpit, see Migrate Pro.Monitor Cockpit to Redpeaks Cockpit
  • dump-databases.sh and restore-databases.sh : The MySQL backup and restore scripts of the migration

Run the install script:

./install.sh

The script asks:

Question Default
Do you want to use this directory? /opt. Answer no to give another folder
Do you want to use this user? redpeaks-cockpit, created when missing. Answer no to give another user
Enter the HTTP port 9888
Enter the HTTPS port 9443, must differ from the HTTP port
Proceed with installation? yes, after reading the summary
Do you want to start the service now? yes

The installer:

  • extracts the application in /opt/Redpeaks-Cockpit-<version>_<build>
  • creates the link /opt/redpeaks-cockpit to this folder
  • writes the ports in /opt/redpeaks-cockpit/bin/setenv.sh
  • creates and enables the service redpeaks-cockpit, so the application starts at boot

The installer stops without any change when /opt/redpeaks-cockpit already exists: the application is already installed, use the update.

To start the application later:

systemctl start redpeaks-cockpit

Service management:

systemctl start redpeaks-cockpit
systemctl stop redpeaks-cockpit
systemctl status redpeaks-cockpit

This page uses the default service name redpeaks-cockpit. To install under another name, edit SERVICE at the top of install.sh before the install. Then adapt every systemctl command and path of this page, and set the same name in SERVICE of update.sh before each update.

User access

  • The installer creates a dedicated system user redpeaks-cockpit to run the application.
  • For security reasons, do not run the application as root
  • Please follow the policy of least privilege for all access granted to run or maintain the application.

Update Redpeaks Cockpit

  • It is easier to update Redpeaks Cockpit from the web superadmin UI, with the delivery zip Redpeaks-Cockpit-<version>_<build>.zip.
  • The web superadmin UI updates only the application, the zip holds no Tomcat. When a new Tomcat version has been embedded (vulnerabilities, …) you must update from the OS with update.sh.

Update from the OS

Extract the new install package in an empty folder, then run the update script:

mkdir ~/cockpit-update && cd ~/cockpit-update
tar -xzf Redpeaks-Cockpit-<version>_<build>.tar.gz
./update.sh

The script asks to stop the application, then to start it again at the end.

  • It refuses to install the same version again and refuses a downgrade.
  • It refuses a Pro.Monitor Cockpit installation: use the migration instead.
  • It creates a new folder for the new version and switches the link /opt/redpeaks-cockpit to it.
  • It carries over your data, conf/tomcat-users.xml and the HTTP and HTTPS ports.

update.sh delivers a new bin/setenv.sh and a new conf/server.xml. Only the ports are carried over. The old server.xml is kept as conf/server.xml.bak. After each update from the OS, report your custom changes by hand: memory settings, keystore, other Tomcat settings.

Older versions are not deleted during an update from the OS. Once the new version is validated, delete the old version folders manually:

rm -rf /opt/Redpeaks-Cockpit-<old version>_<old build>

How to change the HTTP/HTTPS ports

The ports are asked by the installer. To change them later, edit port.http.nonssl and port.http.ssl in /opt/redpeaks-cockpit/bin/setenv.sh

systemctl stop redpeaks-cockpit
vi /opt/redpeaks-cockpit/bin/setenv.sh   # change the appropriate port
systemctl start redpeaks-cockpit

Memory tuning

Change the -Xms and -Xmx values in /opt/redpeaks-cockpit/bin/setenv.sh to define minimum and maximum allocated memory. Example to raise the maximum from 2 GB to 4 GB:

systemctl stop redpeaks-cockpit
sed -i 's/-Xmx2048m/-Xmx4096m/' /opt/redpeaks-cockpit/bin/setenv.sh
### ALTERNATIVE: vi /opt/redpeaks-cockpit/bin/setenv.sh
grep -o -- '-Xm[sx][0-9]*[mg]' /opt/redpeaks-cockpit/bin/setenv.sh
systemctl start redpeaks-cockpit

An update from the OS resets these values, report them again after update.sh.

Manage firewall settings

  • Application ports must be open:
    • 9888 for HTTP
    • 9443 for HTTPS
  • Example on Red Hat / CentOS:
sudo firewall-cmd --zone=public --add-port=9888/tcp --permanent
sudo firewall-cmd --zone=public --add-port=9443/tcp --permanent
sudo firewall-cmd --reload
  • Other example for different Linux distributions:
sudo iptables -I INPUT -p tcp -m tcp --dport 9888 -j ACCEPT
sudo iptables -I INPUT -p tcp -m tcp --dport 9443 -j ACCEPT
sudo service iptables save

Reverse proxy

  • If you intend to install the application behind a NGINX reverse proxy, you need to add the below parameters to the location section:
proxy_pass http://<LOCAL SERVER>:<LOCAL PORT>;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
products/cockpit/1.0/installguide/installredpeakscockpit.txt · Last modified: by sfidan