Changes between Initial Version and Version 1 of doc/install/debian

Show
Ignore:
Timestamp:
01/23/06 00:46:57 (15 years ago)
Author:
benoitg
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • doc/install/debian

    v1 v1  
     1= Client installation on a Debian based PC = 
     2 
     3 * Install two network interface cards into your PC. One will be connected to your internal network or internet connection, and the other will be connected to a wireless router. 
     4 
     5 * Install Debian minimal install. 
     6 
     7 * Run '''apt-get update''' and '''apt-get upgrade''' to ensure that your installation is up to date. 
     8 
     9 * Ensure that the '''/etc/network/interfaces''' file is configured correctly and that both network interfaces are configured - for example: 
     10 
     11{{{ 
     12iface eth0 inet static 
     13             address 192.168.0.111 
     14             netmask 255.255.255.0 
     15             gateway 192.168.0.1 
     16             dns-nameservers 195.238.2.21 195.238.2.22 
     17 
     18iface eth1 inet dhcp 
     19}}} 
     20 
     21You should visit http://www.linuxforum.com/debian/ch-gateway.en.html for a comprehensive network configuration tutorial. 
     22 
     23 * You now need to bridge '''eth0''' and '''eth1''' so that your wireless clients can connect to the internet through your internet connection. 
     24 
     25To accomplish this you will need to ensure that you have a proxy script in place using iptables (much like internet connection sharing if you come from a Windows background). 
     26 
     27If you are using Debian then you're in luck. You will find a full tutorial for setting up IPTABLES for NAT Linux Proxy Server at http://www.aboutdebian.com/proxy.htm. Just follow the rules there, test to ensure that you can connect to the internet via your wireless interface with the rules in place, and then and only then try your wifidog client installation.  Don't forget to read the tutorial all the way through, and MAKE SURE THAT YOU CAN GET AN INTERNET CONNECTION THROUGH THE WIRELESS INTERFACE NOW! 
     28 
     29 * Navigate to '''/usr/src/''' and grab a copy of wifidog '''wget URL-HERE''' You then need to decompress it '''gunzip WIFIDOG-FILE''' then untar '''tar -xvf yourcopyofwifidog'''. 
     30 
     31 * Go to the place wifidog decompressed to and run: 
     32 
     33{{{ 
     34./configure 
     35make 
     36make install 
     37}}} 
     38 
     39If you get any errors check to ensure that you are running the latest compiler. 
     40 
     41 * Move '''wifidog.conf''' to '''/etc/''' : '''mv wifidog.conf /etc/''' and edit the options there (the file is commented so you know what to change. 
     42 
     43 * Type '''wifidog -f -d 7''' to run wifidog in the foreground with full debugging.  If everything is working OK you should see lots of output and be able to get to your portal screen.  
     44 
     45= DHCP = 
     46 
     47If you want to have a little more power over your DHCP settings, you may want to consider running DHCP from your wifidog gateway box rather than your wireless access point.  You can do this on Debian by installing DHCPD. 
     48 
     49First of all to get DHCP server you need to run '''apt-get install dhcpd''' 
     50 
     51When you have the DHCP server you need to set it up. First of all run the following command: 
     52 
     53{{{ 
     54/etc/init.d/dhcp stop 
     55}}} 
     56 
     57This will stop the DHCP server so that you can change the configuration scripts. You will need to set the interface card that you wish the DHCP server to operate the service on, and give it a range of IP addresses and networking information to give to client PC's. 
     58 
     59To change the interface you want the DHCP service to run on you need to edit '''/etc/init.d/dhcp''' and input your network interface here (the standard value may be OK): 
     60 
     61{{{ 
     62# Defaults 
     63INTERFACES="eth0" 
     64}}} 
     65 
     66To change the network information issued via your DHCP server you need to edit the '''/etc/dhcpd.conf''' file.  I've included the one I use as an example for you.  Read on for an explanation of the different components: 
     67 
     68{{{  
     69default-lease-time 10800; 
     70max-lease-time 28800; 
     71 
     72subnet 10.0.1.0 netmask 255.255.255.0 { 
     73range 10.0.1.2 10.0.1.254; 
     74option routers 10.0.1.1; 
     75option domain-name-servers 150.237.47.200; 
     76}  
     77}}} 
     78 
     79 
     80 * default-lease-time = the default time that your client is issued an IP address for. 
     81 
     82 * max-lease-time = the maximum time that your client is issued an IP address for. 
     83 
     84 * subnet 10.0.1.0 = the subnet of the IP range you are issuing the client, in this case 10.0.1.0 is the subnet of 10.0.1.2/254 (take the last number off your range and change to 0) 
     85 
     86 * netmask = the mask applied to your subnet range giving the available number of IP address. In this case 255.255.255.0 allows only the last section of the IP address to be changed. 
     87 
     88 * range = the range of IP addresses you want clients to be able to get from dhcp. 
     89 
     90 * option routers = the network interface card in your gateway that is running dhcp. 
     91 
     92 * option domain-name-servers = your DNS server (perhaps supplied by your ISP?) 
     93 
     94When you have fiddled with the options, and have everything up and running then you will want to restart the DHCP: 
     95 
     96{{{ 
     97/etc/init.d/dhcp start 
     98}}} 
     99 
     100That is DHCP set up now.  If you want to test it, either connect wirelessly via your bridged access point or connect a cross over cable to your gateway ethernet card and another PC to see what network details it gives you. 
     101 
     102--------- 
     103 
     104= Auth Server = 
     105 
     106Installing the Auth Server on Debian Sarge - The rough and ready guide! 
     107 
     108 * Grab the minimal install of Debian Sarge and install to your server. Ensure that you have 'testing' sources added to your apt configuration file. 
     109 
     110 * Do an '''apt-get update''' and an '''apt-get upgrade''' to update your Debian installation and grab the latest sources to your apt cache. 
     111 
     112 * Install Apache2 '''apt-get install apache2''' 
     113 
     114 * Install PHP5 for Apache2 '''apt-get install libapache2-mod-php5''' 
     115 
     116 * Install PostgreSQL '''apt-get install postgresql-8.1''' 
     117 
     118 * Install PostgreSQL support for PHP5 '''apt-get install php5-pgsql''' 
     119 
     120 * If you wish to use PEAR, you can download the Debian package from the unstable branch by running '''apt-get install php-pear''' You will also need curl support for php which you can get by running '''apt-get install php5-curl''' 
     121 
     122 * Install [http://prdownloads.sourceforge.net/phlickr/Phlickr-0.2.5.tgz?download Phlickr 0.2.5+ package] '''pear install Phlickr-0.2.5.tgz''' 
     123 
     124 * Download the latest copy of Wifidog Auth and untar it to your web directory.   
     125 
     126 * Run '''install.php''' and follow the guide there to get your Auth server going. If you get problems with missing modules like pgsql, then try restarting Apache '''apache2 -k restart''' a couple of times to ensure that the changes have applied properly. 
     127 
     128 * Edit '''config.php''' to suit your needs. 
     129 
     130More coming soon. 
     131 
     132= Configuring the postgresql database for wifidog installation = 
     133 
     134You will need to create a user and a database for your wifidog installation.  You need to make a note of the username and password of your user, and the name of your database.  You will need these during the install process.   
     135 
     136 * Creating a postgresql user  
     137 
     138Switch to the postgres database user account '''su postgres''' then type the following to set up your new user and create the database, make sure that you press enter after each line. Be careful when typing the code ensuring you don't miss the semicolons! 
     139 
     140{{{ 
     141$ psql 
     142-> CREATE USER wifidog 
     143-> WITH PASSWORD 'yourpassword'; 
     144 
     145-> CREATE DATABASE wifidog 
     146-> WITH OWNER wifidog; 
     147}}} 
     148 
     149You should now be the proud owner of a wifidog database! To exit the pgsql command tool type '\q' To change back to the root user again type 'su root' and then your password when prompted. 
     150 
     151 
     152