Table of Contents

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

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:

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:

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

Update Redpeaks Cockpit

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.

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

sudo firewall-cmd --zone=public --add-port=9888/tcp --permanent
sudo firewall-cmd --zone=public --add-port=9443/tcp --permanent
sudo firewall-cmd --reload
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

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;