====== **WARNING: THIS PAGE IS NOT APPROVED YET** ====== ====== Quick Install ====== This guide serves as a quick reference to remind you of the setup steps. For more detailed information, please refer to the general wiki ==== Common Linux Commands ==== * **Navigating Directories:** - **cd**: Change directory -> Ex: `//cd /path/ //` - **ls**: List directory contents -> Ex: `//ls -l//` (detailed list including file permissions) * **Viewing and Manipulating Files:** - **cat**: Display the contents of a file -> Ex: `//cat filename//` - **nano**, **vim**: Edit files using a text editor -> Ex: `//nano filename//`, `//vim filename//` - **tail**: View the last part of a file -> Ex: `//tail -f filename.log//` (continuously follow the file) - **grep**: Search for patterns within files -> Ex: `//grep 'pattern' filename//` * **Managing Processes:** - **ps**: Display running processes -> Ex: `//ps aux//` - **top**: Display real-time process -> Ex: `//top//` - **kill**: Send a signal to a process -> Ex: `//kill -9 PID//` * **File Permissions and Ownership:** - **chmod**: Change file permissions -> Ex: `//chmod 755 filename//` - **chown**: Change file owner and group -> Ex: `//chown user:group filename//` * **Package Management:** - **yum** (CentOS/RedHat) -> Ex: `//yum install packagename//` - **apt-get** (Debian/Ubuntu) -> Ex: `//apt-get install packagename//` * **System Services:** - **systemctl**: Manage and monitor system services (systemd) - Start -> Ex: `//systemctl start servicename//` - Status -> Ex: `//systemctl status servicename//` - Stop -> Ex: `//systemctl stop servicename//` - Enable at Boot -> Ex: `//systemctl enable servicename//` ==== Initial Setup ==== * **Install Global Dependencies:** - Check Java version with `//java -version//` ensure it's version 15 or higher. - Install Java on Red Hat/CentOS using `//yum install java-latest-openjdk-headless.x86_64//`. -> [[https://wiki.agentil-software.com/doku.php?id=products:promonitor:6.8:installguide:installjava |More information]] * **Install Cockpit:** - Do not unpack in `//opt//`. Use a separate directory. - Install [[https://wiki.agentil-software.com/doku.php?id=internal:support:install#dependencies_for_cockpit | dependencies for Cockpit]] - Unpack the cockpit with `//tar -zxvf Pro.Monitor-Cockpit-xxxx.tar.gz//` and run `//./install.sh//`. - Start the service with `//systemctl start promonitor-cockpit//`. * **Install Collector:** - Do not unpack in `//opt//`. Use a separate directory. - Run `//./install.sh//` - Start the service with `//systemctl start promonitor//`. ==== Dependencies for Cockpit ==== * **Installing MySQL:** //[[https://wiki.agentil-software.com/doku.php?id=products:cockpit:1.0:installguide:installmysql | More detail here]]// - **CentOS/RedHat:** - Install MySQL : `//yum install mysql-server//` - Start MySQL : `//systemctl start mysqld//` - Secure MySQL installation: `//mysql_secure_installation//` - **Debian:** - Update package index: `//apt-get update//` - Install MySQL: `//apt-get install mysql-server//` - Secure MySQL installation: `//mysql_secure_installation//` * **Installing VictoriaMetrics:** //[[https://wiki.agentil-software.com/doku.php?id=products:cockpit:1.0:installguide:installvictoriametrics | More detail here]]// - **Common Steps for CentOS/RedHat and Debian:** - Download the latest [[https://github.com/VictoriaMetrics/VictoriaMetrics/releases | VictoriaMetrics ]] - Exemple : `//wget https://github.com/VictoriaMetrics/VictoriaMetrics/releases/download/v1.100.1/victoria-metrics-freebsd-amd64-v1.100.1-cluster.tar.gz //` - Extract the tar.gz file using: `//tar -zxvf victoria-metrics*.tar.gz//` - Move the binaries to a suitable directory, such as `/usr/local/bin` - Create a systemd service file for VictoriaMetrics at `/etc/systemd/system/victoriametrics.service`: [Unit] Description=VictoriaMetrics After=network.target [Service] Type=simple ExecStart=/usr/local/bin/victoriametrics -storageDataPath /var/lib/victoria-metrics-data Restart=on-failure [Install] WantedBy=multi-user.target - Start VictoriaMetrics service: `//systemctl start victoriametrics//` - Enable VictoriaMetrics at boot: `//systemctl enable victoriametrics//` ==== Service Configuration ==== * **Setting Environment Variables:** - Use //cat setenv.sh// to view current environment settings. - Check //setenv.sh// script to establish necessary change. -Dport.http.nonssl=8888 <- Change HTTP port -Dport.http.ssl=8443 <- Change HTTPS port ==== Cleanup Operations ==== * **Remove Old version :** //Use this only if you can't update from old version// - Execute systemctl stop promonitor - Execute //rm -rf Pro.Monitor*// to remove outdated application versions. - Run //systemctl daemon-reload// to refresh the system daemon ==== Rebooting and Updates ==== * **Rebooting Services:** - To reboot cockpit -> `//systemctl restart promonitor-cockpit.service//` - To reboot monitor -> `//systemctl restart promonitor.service//`. * **Applying Updates with Cockpit:** - Remplace .war file with the new one - Login to SuperAdmin Cockpit - -> Updates - -> Collector Updates - Apply the update - Login to the Admin Tenant - -> Collector - -> ... (3dot) - -> Update - -> Apply