doc/install/ubuntu/auth-server

Version 2 (modified by pascal.charest@…, 11 years ago)

Completed (only grammar correction needed)

Introduction

These are step by step instructions to install Wifidog auth-server on Ubuntu Linux (release 6.10)

December 12th, 2006 - This document is currently a draft and not completed!

Install the distro

Download the distro first cd, from :  Ubuntu: current release. Burn it and launch your computer with the cdrom in. This is a standard install: click on "install" on the desktop and follow the instructions. The default install will install a "lot" of un-needed things, if you don't have much disk space, you could try the Debian installation.

Ubuntu default software manager is apt, which make this guide very easy to write (almost a big cut-paste from the debian installation one)

On restart, enter your username / password in your gui ... and start Applications / Accessories / Terminal.

Install prerequisites

You will be logged on as a standard user, so we need to add sudo in front of every "root-runned" command. The bad way of doing it would be to log as root...so we don't do that ;-).

Before we install anything lets be sure we have access to internet and that our apt database is updated

sudo apt-get update

The authentification server require a webserver (apache2) and php (we install the latest version)

sudo apt-get install apache2 php5

Database server install

It also require a database server, so we will install PostgreSQL-8.1.

sudo apt-get install postgresql-8.1

Configure PostgreSQL 8.1

nano /etc/postgresql/8.1/main/postgresql.conf

This isn't a good security setting, you should make sure to configure the whole thing later on! Right now, you need, at least to change:

#listen_addresses='localhost'
SSL = true

for

listen_addresse='*'
SSL = false

Install prerequisites - step2

(could not find mcrypt package / php5-mcrypt from the default apt-stream)

We also need some specifics librairies

sudo apt-get install php5-cgi
sudo apt-get install php5-mhash php5-pgsql php-pear php5-xmlrpc php5-curl

To get the latest version of wifidog-auth we will need subversion:

sudo apt-get install subversion

Some more libs. On "sudo pear install Phlickr-0.2.5.tgz", you will receive an error like "/tmp/glibctestWTQG39:1:22: error: features.h no such file"... this isn't important, the install will continue without problem and FlickrPhotoStream? will be a valid content type.

sudo pear install XML_RPC
cd /tmp
wget http://ovh.dl.sourceforge.net/sourceforge/phlickr/Phlickr-0.2.5.tgz
sudo pear install Phlickr-0.2.5.tgz 
rm Phlickr-0.2.5.tgz

You might want to considere adding the openssh-server to your setup (easier to connect remotly). This is not a requierement for WIFIDOG-Auth.

sudo apt-get install openssh-server

Install the auth server

svn checkout https://dev.wifidog.org/svn/trunk/wifidog-auth
sudo mv wifidog-auth/ /var/www/

Apache 2 configuration file

We need to change the document root. We take for granted that this server will be of no other "web" use... if it is, guess you'll have to learn how to configure apache2.

sudo nano /etc/apache2/sites-available/default

and change (at the fifth line):

        DocumentRoot /var/www/

to

        DocumentRoot /var/www/wifidog-auth/wifidog

restart apache2:

sudo /etc/init.d/apache2 restart

Configure locale in wifidog.conf

If you have installed locales-all and you want to keep the "french" default portal page, this step isn't needed. In other cases: you will have to change the file config.php

sudo nano /var/www/wifidog-auth/wifidog/config.php

on line 184 (ctrl+w+enter, ctrl+t+enter, 208) remplace

define('DEFAULT_LANG', 'fr_CA');

by

define('DEFAULT_LANG', 'en_US');

Configure mail server

You need to have a valid mailer in order to mail account confirmation!

Installing postfix

apt-get install postfix

Select the "internet site with smart host" configuration option and answer the next series of questions.

Configure the auth server

Go to  http://your-domaine.com/install.php and follow the instructions. You can follow the following walk-though, under the install step: auth-server. It isn't updated though. Or you can follow the onscreen introduction ;-)

If you haven't configure you dns / domain redirection, you can get your ip-adress with the command "ifconfig". You can also connect from the system with  http://localhost/install.php

They will ask to :

1) First screen

create a wifidog user in postgres

sudo su - postgres
createuser wifidog --pwprompt 

IF you have PostgreSQL 8.1 : answer no to the three questions IF you have PostgreSQL 7.4 : answer no to the two questions

create a database owned by this new user

createdb wifidog --encoding=UTF-8 --owner=wifidog

you must then

cat /tmp/dog_cookie.txt

and click next in your browser (it will ask for the password in dog_cookie.txt)

2) Second screen:

You will have to copy-paste the big serie of command, click refresh and next. The easiest way of doing that is if you have a ssh connection to your box (this is why I proposed openssh-server package earlier)

sudo su -

then copy the whole pack of command

3) Third screen: Verification of the installed software. If you followed this guide, you have the basic requierement for the install. We will be installing Smarty soon.

4) Fourth screen Click install for simplepie, then next Click install for feedpressreview, then next Click NEXT when asked to install Phlickr (it is already installed, even if the system doesn't see it).

5) Fill out your db information.. ...

And a couple more "next" and everything will be working.