Linfo: Difference between revisions
mNo edit summary |
(replace /etc/init.d with rc-service) |
||
(5 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
[ | [https://linfo.sourceforge.net/ Linfo] is a simple PHP application that displays information about the host it's running on. It's similar to [[Phpsysinfo]]. | ||
The following stuff is shown | The following stuff is shown | ||
Line 19: | Line 19: | ||
== Installation of Linfo == | == Installation of Linfo == | ||
Create a directory named {{Path|webapps}} | |||
{{Cmd|mkdir -p /usr/share/webapps/}} | {{Cmd|mkdir -p /usr/share/webapps/}} | ||
Line 25: | Line 26: | ||
{{Cmd|cd /usr/share/webapps/ | {{Cmd|cd /usr/share/webapps/ | ||
wget | wget https://downloads.sourceforge.net/project/linfo/Linfo%20Stable%20Releases/linfo-2.0.3.tar.gz}} | ||
Unpack the archive in the current location | Unpack the archive in the current location and remove the archive afterwards. | ||
{{Cmd|tar -xzf linfo- | {{Cmd|tar -xzf linfo-2.0.3.tar.gz && rm linfo-2.0.3.tar.gz && mv linfo-2.0.3 linfo}} | ||
A config.inc.php is needed to run Linfo. The fastest way is to make a copy of the template file. | A {{Path|config.inc.php}} is needed to run Linfo. The fastest way is to make a copy of the template file. | ||
{{Cmd|cp linfo/sample.config.inc.php linfo/config.inc.php}} | {{Cmd|cp linfo/sample.config.inc.php linfo/config.inc.php}} | ||
Line 39: | Line 40: | ||
{{Cmd|ln -s /usr/share/webapps/linfo/ /var/www/localhost/htdocs/linfo}} | {{Cmd|ln -s /usr/share/webapps/linfo/ /var/www/localhost/htdocs/linfo}} | ||
Change permission of the directory. | Change the permission of the directory. | ||
{{Cmd|chmod -R 777 /usr/share/webapps/}} | {{Cmd|chmod -R 777 /usr/share/webapps/}} | ||
Line 45: | Line 46: | ||
Restart lighttpd | Restart lighttpd | ||
{{Cmd| | {{Cmd|rc-service lighttpd restart}} | ||
Now the page is up and running | Now the page is up and running | ||
http://IP-ADDRESS/linfo | <nowiki>http://IP-ADDRESS/linfo</nowiki> | ||
[[Category:Monitoring]] | [[Category:Monitoring]] | ||
[[Category:PHP]] | [[Category:PHP]] |
Latest revision as of 10:03, 17 November 2023
Linfo is a simple PHP application that displays information about the host it's running on. It's similar to Phpsysinfo.
The following stuff is shown
- CPU Type
- RAM Usage
- PCI/USB devices
- Hard drives
- File system mounts
- Network devices
- Temps/Voltages via hddtemp/mbmon
- Software raid arrays (either by mdadm or gmirror)
- System load / number of processes, threads
- Linux distribution, if possible
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
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
Start lighttpd
service and add it to default runlevel
# rc-service lighttpd start # rc-update add lighttpd default
Installation of Linfo
Create a directory named webapps
mkdir -p /usr/share/webapps/
Now get the current release of Linfo.
cd /usr/share/webapps/ wget https://downloads.sourceforge.net/project/linfo/Linfo%20Stable%20Releases/linfo-2.0.3.tar.gz
Unpack the archive in the current location and remove the archive afterwards.
tar -xzf linfo-2.0.3.tar.gz && rm linfo-2.0.3.tar.gz && mv linfo-2.0.3 linfo
A config.inc.php is needed to run Linfo. The fastest way is to make a copy of the template file.
cp linfo/sample.config.inc.php linfo/config.inc.php
Create a symlink that point to the webserver directory.
ln -s /usr/share/webapps/linfo/ /var/www/localhost/htdocs/linfo
Change the permission of the directory.
chmod -R 777 /usr/share/webapps/
Restart lighttpd
rc-service lighttpd restart
Now the page is up and running
http://IP-ADDRESS/linfo