Last active
May 25, 2022 19:04
-
-
Save t1m0thyj/b64b23dc9caf88af29729f9961150e79 to your computer and use it in GitHub Desktop.
Set up phpSysInfo with lighttpd and PHP 7 on Raspbian Stretch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Install lighttpd and PHP 7 | |
sudo apt-get -y install lighttpd | |
sudo apt-get -y install php-cgi php php-xml | |
sudo lighty-enable-mod fastcgi-php | |
sudo service lighttpd force-reload | |
# Install phpSysInfo from GitHub | |
wget https://github.com/phpsysinfo/phpsysinfo/archive/stable.zip -O ~/Downloads/phpsysinfo-stable.zip | |
unzip ~/Downloads/phpsysinfo-stable.zip -d ~/Downloads | |
if [[ -d /var/www/html/phpsysinfo ]]; then | |
sudo rm -rf /var/www/html/phpsysinfo | |
fi | |
sudo mv ~/Downloads/phpsysinfo-stable /var/www/html/phpsysinfo | |
sudo cp /var/www/html/phpsysinfo/phpsysinfo.ini.new /var/www/html/phpsysinfo/phpsysinfo.ini | |
# Modify some phpSysInfo settings | |
sudo sed -i -e 's/\(^JS_COMPRESSION *= *\).*/\1"None"/' \ | |
-e 's/\(^PLUGINS *= *\).*/\1"PS"/' \ | |
-e 's/\(^TEMP_FORMAT *= *\).*/\1"c-f"/' \ | |
-e 's/\(^SENSOR_PROGRAM *= *\).*/\1"PiTemp"/' /var/www/html/phpsysinfo/phpsysinfo.ini | |
# Print useful info | |
echo | |
echo "Your IP address is $(hostname -I)" | |
echo | |
echo "phpSysInfo configuration file is located at /var/www/html/phpsysinfo/phpsysinfo.ini" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment