Difference between revisions of "WOL"

From Amahi Wiki
Jump to: navigation, search
 
(12 intermediate revisions by 2 users not shown)
Line 22: Line 22:
  
 
If you're trying to wake a remote Linux system, and it's not working, try executing this command on the remote Linux client:
 
If you're trying to wake a remote Linux system, and it's not working, try executing this command on the remote Linux client:
{{Code|ethtool -s eth0 wol g}}
+
ethtool -s eth0 wol g  
  
==Wake-On-LAN Server (Fedora 19)==
+
==Wake-On-LAN Server Application (Fedora 19 or greater)==
[http://www.amahi.org/apps/wake-on-lan-server Wake-On-LAN Server] is an app that enables users to wake client devices in their network through their Amahi server.  The inspiration and core scripts of Wake-On-LAN Server are Jeremy Blum's work <u>Raspberry Pi Remote Wake-On-LAN Server</u>.  Secure login and MySQL database have been added to increase the programs functionality as a App.
+
[http://www.amahi.org/apps/wake-on-lan-server Wake-On-LAN Server] is an application that enables users to wake client devices in their network through their Amahi server.  The inspiration and core scripts of Wake-On-LAN Server are Jeremy Blum's work ([http://www.jeremyblum.com/2013/07/14/rpi-wol-server Raspberry Pi Remote Wake-On-LAN Server]).  Secure login and MySQL database have been added to increase the programs functionality as a App.
  
Wake-On-LAN Server app is currently in Alpha testing, but for those who want to manually install it:
+
To manually install, [[Open_terminal_as_root|Open terminal as root]]:
  
*Create the [https://www.amahi.org/apps/webapp webapp] called "wolserver."
+
* Install WOL dependency
*Create an SQL database called "wolserver"
+
yum -y install wol
 +
* Create a [https://www.amahi.org/apps/webapp webapp] called '''wolserver'''
 +
* Navigate to the wolserver directory
 +
cd /var/hda/web-apps/wolserver
 +
* Download Wake-On-LAN Server (Alpha)
 +
wget <nowiki>https://github.com/thegillion/WOL-server-w-sql/archive/master.zip</nowiki>
 +
* Unzip the file
 +
unzip WOL-server-w-sql-master.zip -d html
 +
* Create an SQL database called '''wolserver'''
 
  hda-create-db-and-user wolserver
 
  hda-create-db-and-user wolserver
*import the tables from the download file.  
+
* Import the tables from the download file.  
  mysql -uwolserver -pwolserver wolserver < /path/to/sql
+
  mysql -uwolserver -pwolserver wolserver < html/wolserver.sql
*extract the zip
+
* Change file ownership to apache:users
*copy all the files to the /var/hda/web-apps/wolserver/html
+
  chown -R apache:users html
cp -R ~/Downloads/WOL-server-w-sql/* /var/hda/web-apps/wolserver/html/
 
*change the owner of all the files in /var/hda/web-apps/wolserver/html to apache:users
 
  chown -R apache:users /var/hda/web-apps/wolserver/html/
 
  
If one wants to access the app outside of the network, you will need to add a VirtualHost to the wolserver.conf file in /etc/httpd/conf.d.
+
That's it for setupYou are now ready to configure the application for your devices.
  Listen 8081
 
<VirtualHost *:8081>
 
at the top of the ****-wolserver.conf (assuming you want Wake-On-LAN Server to listen on port 8081.)
 
  
The default login for Wake-On-LAN Server is "admin/admin"
+
The administrator login is:<br />
 +
<blockquote>
 +
<code>
 +
Name:  admin<br />
 +
Password:  admin<br />
 +
</code>
 +
</blockquote>
 +
Wake a computer Passphrase (change by editing config.php):
 +
<blockquote>
 +
<code>
 +
wakemeup<br />
 +
</code>
 +
</blockquote>
  
The passphrase to wake a computer is "wakemeup." 
+
To access the app outside of the network, refer to [[Hosting_a_website#Hosting_a_single_Webapp|Hosting a single web app]], [[Hosting_a_website#Hosting_Multiple_Webapps|hosting multiple web apps]], or [[Hosting_a_website#Hosting_Webapps_.28Alternative.29|hosting webapps (alternative)]] guidance.
 
 
'''NOTE:''' To change this passphrase need to edit the wol.php file manually. How to edit is in the comments of the file.
 
  
 
If interested in "Sleep-On-LAN" for a Windows computer, see [http://www.jeremyblum.com/2013/07/14/rpi-wol-server Jeremy Blum's page]. Install the [http://www.ireksoftware.com/SleepOnLan SleepOnLan client] for this capability.
 
If interested in "Sleep-On-LAN" for a Windows computer, see [http://www.jeremyblum.com/2013/07/14/rpi-wol-server Jeremy Blum's page]. Install the [http://www.ireksoftware.com/SleepOnLan SleepOnLan client] for this capability.
  
 
== References ==
 
== References ==
A more detailed description of how to enable WOL is given here:
+
* [[Enabling_WOL|Enabling WOL]]:  Detailed description of how to enable WOL
http://wiki.amahi.org/index.php/Enabling_WOL
+
* [http://www.jeremyblum.com/2013/07/14/rpi-wol-server/ Raspberry Pi Remote Wake-On-LAN Server]
 
 
<u>Raspberry Pi Remote Wake-On-LAN Server</u>
 
http://www.jeremyblum.com/2013/07/14/rpi-wol-server/
 

Latest revision as of 00:58, 31 May 2017

Wake-on-LAN is a standard that allows a computer to be turned on or woken up by a network message called "Magic Packet".

Amahi supports waking up devices that have a dynamic or static DHCP leases in your network, under Setup > Networking.

These devices some times come with WOL enable. In many PCs, they need to be setup properly by enabling WakeOnLan in their BIOS. This setting has quite a few names in BIOS's out there. Here's a couple of them (find the one you need in the user manual of your motherboard/system):

  • MAC Resume From S3/S4
  • MACPME Power Up Control
  • Power On By Onboard LAN
  • Power Up By Onboard LAN
  • Resume by LAN
  • Resume By WOL
  • Resume on LAN
  • Resume on LAN/PME#
  • Wake on LAN from S5
  • Wake Up On LAN
  • WakeUp by Onboard LAN
  • WOL (PME#) From Soft-Off

To try it, go to Setup > Networking > Static IPs and unfold the row for the device that you want to wake up.

More information on Wake on LAN and how it works ...

If you're trying to wake a remote Linux system, and it's not working, try executing this command on the remote Linux client:

ethtool -s eth0 wol g 

Wake-On-LAN Server Application (Fedora 19 or greater)

Wake-On-LAN Server is an application that enables users to wake client devices in their network through their Amahi server. The inspiration and core scripts of Wake-On-LAN Server are Jeremy Blum's work (Raspberry Pi Remote Wake-On-LAN Server). Secure login and MySQL database have been added to increase the programs functionality as a App.

To manually install, Open terminal as root:

  • Install WOL dependency
yum -y install wol
  • Create a webapp called wolserver
  • Navigate to the wolserver directory
cd /var/hda/web-apps/wolserver
  • Download Wake-On-LAN Server (Alpha)
wget https://github.com/thegillion/WOL-server-w-sql/archive/master.zip
  • Unzip the file
unzip WOL-server-w-sql-master.zip -d html
  • Create an SQL database called wolserver
hda-create-db-and-user wolserver
  • Import the tables from the download file.
mysql -uwolserver -pwolserver wolserver < html/wolserver.sql
  • Change file ownership to apache:users
chown -R apache:users html

That's it for setup. You are now ready to configure the application for your devices.

The administrator login is:

Name: admin
Password: admin

Wake a computer Passphrase (change by editing config.php):

wakemeup

To access the app outside of the network, refer to Hosting a single web app, hosting multiple web apps, or hosting webapps (alternative) guidance.

If interested in "Sleep-On-LAN" for a Windows computer, see Jeremy Blum's page. Install the SleepOnLan client for this capability.

References