Difference between revisions of "Database/Map/Server"

From Open Maps wiki
Jump to: navigation, search
(RPi side)
(RPi side)
Line 25: Line 25:
  
  
# [http://elinux.org/RPI-Wireless-Hotspot set up AP with udhcpd]
+
# Set up AP with hostap (instructions from [http://elinux.org/RPI-Wireless-Hotspot set up AP with udhcpd])
 +
<nowiki>
 +
sudo apt-get install hostapd
 +
</nowiki>
 +
edit the file /etc/hostapd/hostapd.conf
 +
<nowiki>
 +
interface=wlan0
 +
ssid=TacticalSpaceLab
 +
hw_mode=g
 +
channel=6
 +
auth_algs=1
 +
wmm_enabled=0
 +
</nowiki>
 +
Edit the file /etc/default/hostapd and change the line:
 +
<nowiki>
 +
#DAEMON_CONF=""
 +
</nowiki>
 +
to
 +
<nowiki>
 +
DAEMON_CONF="/etc/hostapd/hostapd.conf"
 +
</nowiki>
 +
Start it up, and add it to start at boot
 +
<nowiki>
 +
sudo service hostapd start
 +
sudo update-rc.d hostapd enable
 +
</nowiki>
 +
 
 +
sudo service hostapd start
  
 
# [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]

Revision as of 07:17, 23 March 2015

Client Side

extract the location client-side with EXIF-JS

RPi side

Lets set up our map server with local cached image files

  1. install Nginx
sudo apt-get update
sudo apt-get install nginx
sudo service nginx start

  1. 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)


  1. Set up AP with hostap (instructions from set up AP with udhcpd)
sudo apt-get install hostapd

edit the file /etc/hostapd/hostapd.conf

interface=wlan0
ssid=TacticalSpaceLab
hw_mode=g
channel=6
auth_algs=1
wmm_enabled=0

Edit the file /etc/default/hostapd and change the line:

#DAEMON_CONF=""

to

DAEMON_CONF="/etc/hostapd/hostapd.conf"
 

Start it up, and add it to start at boot

sudo service hostapd start
sudo update-rc.d hostapd enable
 

sudo service hostapd start

  1. edimax version of hostapd

(# captive portal setup!!) (# but with iptables command from here, since the others are broken)

  1. Set up interface for serving DHCP and DNS
auto eth0
iface eth0 inet static
address 10.1.2.1
netmask 255.255.255.0

iface wlan0 inet static
address 10.1.2.2
netmask 255.255.255.0

  1. 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.5,12h

  1. restart dnsmasq
sudo /etc/init.d/dnsmasq restart

  1. dnsmarsq script logging...
Logging dhcp.png

ended up using dnsmasq for DNS and DHCP. Setting DNS forward IP to local for captive portal setup


some popup mehods

/var/www

MQ var directory archive

Remember to make all /var/www/ folders readable with:

sudo find /var/www -type d -exec chmod a+x {} +

and possibly

sudo find /var/www -type d -exec chown  {} root:root +

For Online

beautiful Stamen Design map that can be used

Map example1.png
Map example2.png