PhpSysInfo: Difference between revisions

From Alpine Linux
(Initial version)
 
m (Update to 3.2.5)
(16 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Draft}}
[http://phpsysinfo.sourceforge.net/ phpSysInfo] is a simple application that displays information about the host it's running on.
 
[http://phpsysinfo.sourceforge.net/ phpSysInfo] is a simple apllication that displays information about the host it's running on.


The following stuff is shown
The following stuff is shown
Line 13: Line 11:
* Video Information
* Video Information


== Webserver configuration ==
== Install lighttpd and PHP ==
{{:Setting_Up_Lighttpd_With_FastCGI}}


Set up Lighttpd with PHP support...
== Installation of pypSysInfo ==


<!--{{Cmd|apk add php-xml php-mbstring}}-->
Create a directory named {{Path|webapps}}


== Installation of pypSysInfo ==
{{Cmd|mkdir -p /usr/share/webapps/}}


Now get the current release of phpSysInfo.
Now get the current release of phpSysInfo.


{{Cmd|wget http://downloads.sourceforge.net/project/phpsysinfo/phpsysinfo/3.0.11/phpsysinfo-3.0.11.tar.gz}}
{{Cmd|cd /usr/share/webapps/
wget http://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.0.11.tar.gz}}
{{Cmd|tar -xzf phpsysinfo-3.2.5.tar.gz && rm phpsysinfo-3.2.5.tar.gz}}


Copy all files to the webserver data directory or make a symlink (here all files are copied to the webserver directory)
A {{Path|config.php}} is needed to run phpSysInfo. The fastest way is to make a copy of the template file.


{{Cmd|cp -r phpsysinfo /var/www/localhost/htdocs/phpsysinfo}}
{{Cmd|cp phpsysinfo/config.php.new phpsysinfo/config.php}}


A config.php is needed to run phpSysInfo. The fastest way is to make a copy of the template file.
Create a symlink that point to the webserver directory.


{{Cmd|cp /var/www/localhost/htdocs/phpsysinfo/config.php.new /var/www/localhost/htdocs/phpsysinfo/config.php}}
{{Cmd|ln -s /usr/share/webapps/phpsysinfo/ /var/www/localhost/htdocs/phpsysinfo}}
 
Change the permission of the directory.
 
{{Cmd|chmod -R 777 /usr/share/webapps/}}


Restart lighttpd
Restart lighttpd


{{Cmd|/etc/init.d/lighttpd restart}}
{{Cmd|/etc/init.d/lighttpd restart}}


Now the page is up and running
Now the page is up and running
Line 46: Line 49:
http://IP-ADDRESS/phpsysinfo
http://IP-ADDRESS/phpsysinfo


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

Revision as of 13:39, 29 April 2016

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

... 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

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 http://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

/etc/init.d/lighttpd restart

Now the page is up and running

http://IP-ADDRESS/phpsysinfo