Difference between revisions of "Database/Map/Server"
From Open Maps wiki
(→RPi side) |
(→RPi side) |
||
Line 21: | Line 21: | ||
# [http://www.daveconroy.com/turn-your-raspberry-pi-into-a-wifi-hotspot-with-edimax-nano-usb-ew-7811un-rtl8188cus-chipset/ edimax version of hostapd] | # [http://www.daveconroy.com/turn-your-raspberry-pi-into-a-wifi-hotspot-with-edimax-nano-usb-ew-7811un-rtl8188cus-chipset/ edimax version of hostapd] | ||
− | # [http://www.pihomeserver.fr/en/2014/05/22/raspberry-pi-home-server-creer-hot-spot-wifi-captive-portal/ captive portal setup!!] | + | (# [http://www.pihomeserver.fr/en/2014/05/22/raspberry-pi-home-server-creer-hot-spot-wifi-captive-portal/ captive portal setup!!]) |
− | # '''[http://www.revsys.com/writings/quicktips/nat.html but with iptables command from here, since the others are broken]''' | + | (# '''[http://www.revsys.com/writings/quicktips/nat.html but with iptables command from here, since the others are broken]''') |
+ | |||
+ | # Set up interface for serving DHCP and DNS | ||
+ | <nowiki> | ||
+ | auto eth0 | ||
+ | iface eth0 inet static | ||
+ | address 10.1.2.1 | ||
+ | netmask 255.255.255.0 | ||
+ | </nowiki> | ||
+ | # Install dnsmasq "sudo apt-get install dnsmasq" and configure | ||
+ | <nowiki> | ||
+ | # captive portal to this | ||
+ | address=/#/10.1.2.1 | ||
+ | interface=eth0 | ||
+ | dhcp-range=10.1.2.10,10.1.2.2,12h | ||
+ | </nowiki> | ||
+ | |||
+ | |||
# dnsmarsq script logging... | # dnsmarsq script logging... | ||
[[File:logging_dhcp.png|thumbnail]] | [[File:logging_dhcp.png|thumbnail]] |
Revision as of 05:19, 23 February 2015
Client Side
extract the location client-side with EXIF-JS
RPi side
Lets set up our map server with local cached image files
- install Nginx "sudo apt-get update" "sudo apt-get install nginx" "sudo service nginx start"
- Make a link to /var/www to make things easier: "sudo ln -s /var/www /home/USER/code"
(# now set up PHP with fastCGI)
(# set up mapserv)
(# add mapserv to cache)
(# captive portal setup!!) (# but with iptables command from here, since the others are broken)
- Set up interface for serving DHCP and DNS
auto eth0 iface eth0 inet static address 10.1.2.1 netmask 255.255.255.0
- Install dnsmasq "sudo apt-get install dnsmasq" and configure
# captive portal to this address=/#/10.1.2.1 interface=eth0 dhcp-range=10.1.2.10,10.1.2.2,12h
- dnsmarsq script logging...
ended up using dnsmasq for DNS and DHCP. Setting DNS forward IP to local for captive portal setup