CGP: Difference between revisions

From Alpine Linux
m (→‎Install CGP: small fix)
(add pkg link and update package name)
 
(2 intermediate revisions by the same user not shown)
Line 8: Line 8:
Install the font package
Install the font package


{{Cmd|apk add ttf-dejavu}}
{{Cmd|# apk add {{pkg|font-dejavu}}}}


Create a folder named {{Path|webapps}}
Create a folder named {{Path|webapps}}


{{Cmd|mkdir -p /usr/share/webapps/}}
{{Cmd|# mkdir -p /usr/share/webapps/}}


Clone the CGP git repository
Clone the CGP git repository


{{Cmd|git clone git://github.com/pommi/CGP.git /usr/share/webapps/cgp}}
{{Cmd|# git clone <nowiki>git://github.com/pommi/CGP.git</nowiki> /usr/share/webapps/cgp}}


Change the folder permissions
Change the folder permissions


{{Cmd|chown -R lighttpd /usr/share/webapps/}}
{{Cmd|# chown -R lighttpd /usr/share/webapps/}}


Create a symlink to the {{Path|cgp}} folder
Create a symlink to the {{Path|cgp}} folder


{{Cmd|ln -s /usr/share/webapps/cgp/ /var/www/localhost/htdocs/cgp}}
{{Cmd|# ln -s /usr/share/webapps/cgp/ /var/www/localhost/htdocs/cgp}}


[[Category:Monitoring]] [[Category:PHP]]
[[Category:Monitoring]] [[Category:PHP]]

Latest revision as of 17:36, 20 September 2023

Collectd Graph Panel (CGP) is a graphical web front-end for Collectd written in PHP.

Install lighttpd and PHP

Basic Installation

For installing the additional packages first activate community packages and update the package index

Install the required packages:

# apk add lighttpd php82 fcgi php82-cgi

Configure Lighttpd

Edit lighttpd.conf (/etc/lighttpd/lighttpd.conf) and uncomment the line:

Contents of /etc/lighttpd/lighttpd.conf

... include "mod_fastcgi.conf" ...

Edit mod_fastcgi.conf (/etc/lighttpd/mod_fastcgi.conf), find and change /usr/bin/php-cgi to /usr/bin/php-cgi82.

Contents of /etc/lighttpd/mod_fastcgi.conf

... "bin-path" => "/usr/bin/php-cgi82" # php-cgi ...

Start lighttpd service and add it to default runlevel

# rc-service lighttpd start # rc-update add lighttpd default

Install CGP

Install the font package

# apk add font-dejavu

Create a folder named webapps

# mkdir -p /usr/share/webapps/

Clone the CGP git repository

# git clone git://github.com/pommi/CGP.git /usr/share/webapps/cgp

Change the folder permissions

# chown -R lighttpd /usr/share/webapps/

Create a symlink to the cgp folder

# ln -s /usr/share/webapps/cgp/ /var/www/localhost/htdocs/cgp