PhpSysInfo: Difference between revisions
Dubiousjim (talk | contribs) (Category:PHP) |
(replace /etc/init.d with rc-service) |
||
(11 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
[ | [https://phpsysinfo.sourceforge.net/ phpSysInfo] is a simple application that displays information about the host it's running on. | ||
The following stuff is shown | The following stuff is shown | ||
Line 11: | Line 11: | ||
* Video Information | * Video Information | ||
== Install lighttpd and PHP == | |||
{{:Setting_Up_Lighttpd_With_FastCGI}} | {{:Setting_Up_Lighttpd_With_FastCGI}} | ||
== Installation of pypSysInfo == | == Installation of pypSysInfo == | ||
Create a directory named {{Path|webapps}} | |||
{{Cmd|mkdir -p /usr/share/webapps/}} | {{Cmd|mkdir -p /usr/share/webapps/}} | ||
Line 20: | Line 23: | ||
{{Cmd|cd /usr/share/webapps/ | {{Cmd|cd /usr/share/webapps/ | ||
wget | wget https://downloads.sourceforge.net/project/phpsysinfo/phpsysinfo/3.2.5/phpsysinfo-3.2.5.tar.gz}} | ||
Unpack the archive in the current location | Unpack the archive in the current location | ||
{{Cmd|tar -xzf phpsysinfo-3. | {{Cmd|tar -xzf phpsysinfo-3.2.5.tar.gz && rm phpsysinfo-3.2.5.tar.gz}} | ||
A config.php is needed to run phpSysInfo. The fastest way is to make a copy of the template file. | A {{Path|config.php}} is needed to run phpSysInfo. The fastest way is to make a copy of the template file. | ||
{{Cmd|cp phpsysinfo/config.php.new phpsysinfo/config.php}} | {{Cmd|cp phpsysinfo/config.php.new phpsysinfo/config.php}} | ||
Line 34: | Line 37: | ||
{{Cmd|ln -s /usr/share/webapps/phpsysinfo/ /var/www/localhost/htdocs/phpsysinfo}} | {{Cmd|ln -s /usr/share/webapps/phpsysinfo/ /var/www/localhost/htdocs/phpsysinfo}} | ||
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 40: | Line 43: | ||
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/phpsysinfo | <nowiki>http://IP-ADDRESS/phpsysinfo</nowiki> | ||
[[Category:Monitoring]] [[Category:PHP]] | [[Category:Monitoring]] [[Category:PHP]] |
Latest revision as of 09:54, 17 November 2023
phpSysInfo is a simple application that displays information about the host it's running on.
The following stuff is shown
- Uptime
- CPU
- Memory
- SCSI, IDE, PCI
- Ethernet
- Floppy
- Video Information
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 pypSysInfo
Create a directory named webapps
mkdir -p /usr/share/webapps/
Now get the current release of phpSysInfo.
cd /usr/share/webapps/ wget https://downloads.sourceforge.net/project/phpsysinfo/phpsysinfo/3.2.5/phpsysinfo-3.2.5.tar.gz
Unpack the archive in the current location
tar -xzf phpsysinfo-3.2.5.tar.gz && rm phpsysinfo-3.2.5.tar.gz
A config.php is needed to run phpSysInfo. The fastest way is to make a copy of the template file.
cp phpsysinfo/config.php.new phpsysinfo/config.php
Create a symlink that point to the webserver directory.
ln -s /usr/share/webapps/phpsysinfo/ /var/www/localhost/htdocs/phpsysinfo
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/phpsysinfo