Changes

From Amahi Wiki
Jump to: navigation, search
2,203 bytes added ,  03:52, 18 June 2017
[[Category:Apps]]
== Getting More Info ==
After the one click install of phpsysinfo in Amahi 6.0or greater, you need to do some modifications to get all system information displayed.
==Install lm-sensors ==
=== Fedora ===
open a terminal session and login as root or if you have sudo configured use sudo in front of all commands.
type
{{Code| su -}}
at the prompt enter your root password
then type
{{Code| yum install lm_sensors sensors-detect}}
=== Ubuntu [https::'''NOTE:''' <code>yum</code> (deprecated) has been replaced with <code>dnf</helpcode> as the package manager for Fedora 23 and greater.ubuntu.com/community/SensorInstallHowto#Install_and_Configure_lm-sensors (Additional help)] ===
{{Code|sudo apt-get install lm-sensorssudo sensors-detect}}=== Ubuntu ===
Answer the questions. At the end of sudo apt-get install lm-sensors-detect, Type "yes" to have sudo sensors-detect insert modules into /etc/modules, or edit /etc/modules yourself {{Code|service module-init-tools start}}
----
Answer the questions. At the end of sensors-detect, Type "yes" to have sensors-detect insert modules into /etc/modules, or edit /etc/modules yourself service module-init-tools start
{{Code|cd See [https:/var/hdahelp.ubuntu.com/community/webSensorInstallHowto#Install_and_Configure_lm-apps/phpsysinfo/htmlcp config.php configsensors Install and configure lm-sensors] for additional help.php_bak}} to make a backup of your original config file
{{Code|nano config.php}}== Configure Settings ==first make a backup of your original configuration file
Change define('PSI_SENSOR_PROGRAM', ''); to define('PSI_SENSOR_PROGRAM', 'LMSensors'); This tells cd /var/hda/web-apps/phpsysinfo/html cp phpsysinfo.ini phpsysinfo to use lm_sensors to obtain and display sensor information.inibak
Other if neccessary  yum install nano ::'''NOTE:''' <code>yum</code> (deprecated) has been replaced with <code>dnf</code> as the package manager for Fedora 23 and greater. modify the configuration file nano phpsysinfo.ini optional changes  DEFAULT_LANG="en" LOAD_BAR=true USE_VHOST=true SENSOR_PROGRAM="LMSensors" HDD_TEMP="command" HIDE_FS_TYPES="tmpfs,devtmpfs"  For Ubuntu run also sudo dpkg-reconfigure hddtempand set suid to YES  after saving phpsysinfo.ini phpsysinfo will provide voltage, fan, temperature data and more === Configure SMART information ===Ref: [http://mewbies.com/how_to_install_phpsysinfo_nix_tutorial.html How to install phpSysInfo]  defineyum install smartmontools ::'''NOTE:''' <code>yum</code> (deprecated) has been replaced with <code>dnf</code> as the package manager for Fedora 23 and greater. In phpsysinfo.ini (located in 'PSI_HIDE_MOUNTS'/var/hda/web-apps/phpsysinfo/html'')<br />:<code>ADD_PATHS="/usr/sbin, '/bootsbin"</code>:<code>PLUGINS="SMART"</code>:<code>DEVICES="/dev/sda,/dev/shmsdb"</code> You also need to change the plugin script and give apache permission to use smartctl with the sudo command: Because the cmd 'smartctl')is only available to root; it will not work for your web server, we need to set some permissions on it and change the command it uses:First we make a copy of the original cp /var/hda/web- hides apps/boot and phpsysinfo/html/plugins/smart/class.smart.inc.php /var/hda/web-apps/phpsysinfo/html/plugins/devsmart/shm in mounted filesystemsclass.smart.inc.php.bak Now edit the following file: definenano /var/hda/web-apps/phpsysinfo/html/plugins/smart/class.smart.inc.phpSearch for (Ctrl+w) (line 60): --allIt has this: :<code>if ( trim($diskname != "") && (CommonFunctions::executeProgram('PSI_HIDE_FS_TYPESsmartctl', 'tmpfs--all'.' '.$diskdev.' '.$diskname, $buffer, PSI_DEBUG))); - hides tmpfs filesystems{</code> Change it to:  define:<code>if ( trim($diskname != "") && (CommonFunctions::executeProgram('PSI_HDD_TEMPsudo', 'tcpsmartctl --all '.''.$diskdev.' '.$diskname, $buffer, PSI_DEBUG))); {</code> Just a note that all we changed was:<br />:<code>'smartctl', '-- tells PSI to obtain current hdd temp all'</code>To:<br /> define(:<code>'PSI_LOAD_BARsudo', true); 'smartctl --all '</code> Change yours to be the same, including the space: all ' define(Be sure that line isn't broken into multiple lines. If it is you'll see on your ''xml.php?plugin=SMART'' page errors containing 'PSI_UPS_PROGRAM', \n'Apcupsd'); - use apcupsd And be sure that <code>smartctl</code> is the correct path. Next we need to add your web server group to show APC info from APC UPS's'sudo'' to be able to run <code>smartctl</code> cmds: sudo visudoafter saving config.php phpsysinfo will provide voltagePaste in this line under ''# User privilege specification'', fan and temperature datachanging yourweb server group (apache) to your own.For example I have pasted in:<br />:<code>apache ALL=NOPASSWD: /usr/sbin/smartctl</code>
12,424

edits