Difference between revisions of "Server"

From Kandos Digital Embassy
Jump to: navigation, search
(Node connected to it)
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
== Node connected to it ==
 +
 +
# Use broadcast flag true
 +
# Set WAN to DHCP client
 +
* If the network is occasionally not able to reach the internet, or the
 +
internet connectivity is unreliable, it may be that the Freifunk gwcheck
 +
script is removing your gateway from the routing table. This script
 +
attempts to remove gateways that are advertising connections to the
 +
internet but are not actually connected. You could disable it by
 +
commenting it out from /etc/crontabs/root on the nodes.
 +
 +
* I'm wondering if the node connected to the gateway is actually losing
 +
connectivity, or if OLSRd just stops advertising it to the rest of the
 +
network? If the latter, you can statically set it to always advertise as
 +
a gateway. You can do that by:
 +
 +
1. Disable the olsrd_dyngw_plain plugin by unchecking the box for
 +
advertising as a gateway under the Additonal Network Interfaces page in
 +
the basic menu, or by deleting the LoadPlugin section for that plugin in
 +
/etc/config/olsrd.
 +
 +
2. Edit /etc/config/olsrd on the node, and add an HNA section like the
 +
one below:
 +
 +
        config Hna4 'gateway'
 +
                option 'netaddr' '0.0.0.0'
 +
                option 'netmask' '0.0.0.0'
 +
 +
3. Restart OLSRd.
 +
 +
== Setup ==
 +
 
# [http://www.instructables.com/id/Raspberry-Pi-Web-Server-Nginx-PHP-MySql/ set up debian web server (Nginx PHP mysql)]
 
# [http://www.instructables.com/id/Raspberry-Pi-Web-Server-Nginx-PHP-MySql/ set up debian web server (Nginx PHP mysql)]
 
# add php5-cli (sudo apt-get install php5-cli)
 
# add php5-cli (sudo apt-get install php5-cli)
Line 48: Line 80:
 
Page was not found<script>window.location='/'</script>
 
Page was not found<script>window.location='/'</script>
 
</nowiki>
 
</nowiki>
 +
# turn all the caching on!
 +
# Make sensor data folder writable " sudo chmod a+w /var/www/data/sensors/images/"

Latest revision as of 17:44, 7 April 2015

Node connected to it[edit]

  1. Use broadcast flag true
  2. Set WAN to DHCP client
  • If the network is occasionally not able to reach the internet, or the

internet connectivity is unreliable, it may be that the Freifunk gwcheck script is removing your gateway from the routing table. This script attempts to remove gateways that are advertising connections to the internet but are not actually connected. You could disable it by commenting it out from /etc/crontabs/root on the nodes.

  • I'm wondering if the node connected to the gateway is actually losing

connectivity, or if OLSRd just stops advertising it to the rest of the network? If the latter, you can statically set it to always advertise as a gateway. You can do that by:

1. Disable the olsrd_dyngw_plain plugin by unchecking the box for advertising as a gateway under the Additonal Network Interfaces page in the basic menu, or by deleting the LoadPlugin section for that plugin in /etc/config/olsrd.

2. Edit /etc/config/olsrd on the node, and add an HNA section like the one below:

       config Hna4 'gateway'
               option 'netaddr' '0.0.0.0'
               option 'netmask' '0.0.0.0'

3. Restart OLSRd.

Setup[edit]

  1. set up debian web server (Nginx PHP mysql)
  2. add php5-cli (sudo apt-get install php5-cli)
  3. install dnsmasq for ETH0
  4. set dnsmasq config for just ETH0, just DNS
  5. set interfaces to static ETH0 192.168.1.1
  6. dnsmasq config
<no wiki>

domain-needed bogus-priv no-hosts expand-hosts domain=mesh.local interface=eth0 address=/#/192.168.1.1 dhcp-range=192.168.1.10,192.168.1.150, 12h </nowiki>

  1. Enlarge nginx upload limit: sudo nano /etc/nginx/nginx.conf

Add the following to http or server or location context:

# set client body size to 4M #
client_max_body_size 4M;

  1. Copy Dolphin install over to pi
  2. remove stupid Mac OSX Resource Fork files
sudo find /var/www/ -name "._*" -exec rm {} \;

  1. follow these to install dolphin on nginx
  2. make index.php index too
  3. add digitalembassy.mesh to /etc/hosts if you want to see it locally
  4. do dolphin install
  5. do database update
  6. update time and timezone
 
sudo date -s "5 APR 2015 11:00:00"
sudo cp /etc/share/zoneinfo/Australia/Sydney /etc/localtime 

  1. nginx config to redirect to index:
error_page 404 /index.html;

  1. Make sure language files are writable
sudo find /var/www/ -type f -name "lang-en.php" -exec chmod 666 {} \;

  1. Then modify language string for _sys_request_page_not...
Page was not found<script>window.location='/'</script>

  1. turn all the caching on!
  2. Make sensor data folder writable " sudo chmod a+w /var/www/data/sensors/images/"