GlobeView - Advanced-Installation

Aus Laub-Home Wiki

Dies ist die Ausführliche Beschreibung, wie man GlobeView auf seinem Webserver zum laufen bekommt.

Requirements

  • Webserver (apache2/iis)
  • PHP >5
  • MySQL Database >5.0
  • HTBasic Auth

Preinstallation Tasks

First of all you need a webserver with php and mysql support. I'm sure under Windows you could use the WAMP project. But here I will explain how to setup a small linux server, which will host GlobeView.
I use a 2GHz, 512 MB Ram and 8 GB HDD installed with Ubuntu Server 64bit 10.04 LTS. My setup is based on this article:

if you want to use Debian Linux, feel free to do this! More Informations here:

after that minimal installation you need to install the apache httpd webserver, php and the mysql database server:

aptitude install apache2 php5 mysql-server php5-mysql unzip tar

You will be asked for the mysql root password, please use a secure one!
Optional, you can change the MySQL Data Dir to /srv/mysql. For more Informations read this:

More Information on Setting Up MySQL, you can find here:

Another good thing ist to switch you MySQL DB Server to UTF-8:

Configure Apache Webserver and PHP

Own virtual host for globeview

first we create the lookout home directory:

mkdir -p /srv/httpd/vhosts/globeview.domain.tld/htdocs/

now we need the virtual host configuration file:
/etc/apache2/sites-available/globeview.domain.tld

<VirtualHost *:80>
        ServerName globeview.domain.tld
        DocumentRoot /srv/httpd/vhosts/globeview.domain.tld/htdocs/
        ErrorDocument 403 http://globeview.domain.tld
        ErrorDocument 404 http://globeview.domain.tld
        RewriteEngine On
        RewriteCond %{HTTP_HOST}   !^globeview\.domain\.tld [NC]
        RewriteCond %{HTTP_HOST}   !^$
        RewriteRule ^/(.*)         http://globeview.domain.tld/$1 [L,R=permanent]
        php_value max_execution_time 240
        <Directory /srv/httpd/vhosts/lookout.domain.tdl/>
                Options -Indexes FollowSymLinks -Includes -MultiViews
                AllowOverride None
                Order allow,deny
                allow from all
        </Directory>
        ErrorLog /var/log/apache2/globeview.domain.tld-error.log
        CustomLog /var/log/apache2/globeview.domain.tld-access.log combined
        LogLevel warn
</VirtualHost>

Change globeview.domain.tld to the name of your Full Qualified Domain Name, for example www.globeview.de
to enable the new created vhost type:

a2ensite globeview.domain.tld
/etc/init.d/apache2 restart

now you have to enable the htbasic module:

a2enmod auth_basic
/etc/init.d/apache2 restart

GlobeView in an existing virtual host

if you want to use GlobeView under an existing virtual host, so you can reach it by typing http://www.domain.tld/globeview/, you have to edit your vhost configuration. Paste something like this in it:

php_value max_execution_time 240
<Directory /srv/httpd/vhosts/www.domain.tld/htdocs/globeview/>
      Options -Indexes FollowSymLinks -Includes -MultiViews
      AllowOverride None
      Order allow,deny
      allow from all
</Directory>

Secure your installation

To make the installation more secure, take a look here:

GlobeView Installation

For newer versions download the tar.gz/zip package to your vhost folder and unzip it.
for example:

/srv/httpd/vhosts/globeview.domain.tld/htdocs
wget http://wiki.laub-home.de/images/7/73/Lookout_0.7-6.zip
unzip Lookout-0.7-6.zip

now there should be something like that in the directory:

ls -la
total 60K
drwxr-xr-x 5 root root 4.0K 2012-10-27 10:55 .
drwxr-xr-x 4 root root 4.0K 2012-10-27 10:55 ..
-rw-r--r-- 1 root root 6.5K 2012-10-25 16:27 admin.php
-rw-r--r-- 1 root root 3.7K 2012-02-21 00:41 api.php
-rw-r--r-- 1 root root 1.2K 2012-10-06 08:45 index.php
drwxr-xr-x 3 root root 4.0K 2012-10-25 17:11 lib
-rw-r--r-- 1 root root  383 2011-12-28 17:48 slide-show.php
drwxr-xr-x 3 root root 4.0K 2012-10-25 17:11 templates
drwxr-xr-x 2 root root 4.0K 2012-10-19 11:14 templates_c
-rw-r--r-- 1 root root 2.6K 2012-02-21 00:45 webcamfetcher.php
-rw-r--r-- 1 root root  14K 2012-10-06 09:01 wizard.php

now you could remove the globeview tar.gz/zip archive file:

rm globeview-*.zip

next you have to check that the folder templates_c is writeable for the apache user.

chmod 777 templates_c

also you have to check the writable flag of the file lib/inc.db.php

ls -l lib/inc.db.php
-rw-rw-rw- 1 root root 510 Nov  7 10:17 lib/inc.db.php

if not do

chmod 666 lib/inc.db.php
create lookout DB and User for the installation wizard

you have to create a new user which has all rights to the lookout database instead of using the root User:
Attention!!! Change the 'PASSWORD' field to your prefered secure password!

mysql -h localhost -u root -p


CREATE USER 'lookout'@'localhost' IDENTIFIED BY 'PASSWORD';
GRANT USAGE ON * . * TO 'lookout'@'localhost' IDENTIFIED BY 'PASSWORD' WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0 ;
CREATE DATABASE IF NOT EXISTS `lookout` ;
GRANT ALL PRIVILEGES ON `lookout` . * TO 'lookout'@'localhost';
quit

Now you can start the installation wizard by opening it in your browser:

  • http://lookout.domain.tld/wizard.php

Installation Wizard

Instead of manually doing all the configuration stuff above, there's also a web-based step by step setup wizard available. Actually this feature is highly experimental and not yet released - with a final release, the setup wizard will fully replace the manual configuration! What's behind the Wizard?

pre-installation check

  • check webserver environment
  • check PHP version
  • check PHP MySQL support ( MySQL client version)
  • check write permissions to config file inc.db.php and template cache path
  • check if client-side javaScript is supported/ allowed


Example of failed pre-installation check:


Example of succesful pre-installation check:

If the pre-installation check failed, look at the help page below or click on the help link near the failed line.

database connection

here you have to fill in your Database credentials:
DB-Name: your databasename DB-Administrator: the admin user for the database (the one you have created before) DB-Host: the name or IP address of your database server Table prefix: the table prefix for all tables

Successfully Installation

if everything worked fine you should see this last picture:

environment setup

! not yet implemented !

admin user

! not yet implemented !

Ready to start

now you should get the empty lookout startpage by opening the lookout URL in your browser:

  • http://lookout.domain.tdl

now go to the admin interface by clicking on the yellow/red shield symbol in the right upper corner. Log in with your lookout user and start adding new webcams to your lookout frontend.
First create some Categories:

and then you can create your webcams:

For example:
Title: Fellhorn
URL: http://www.das-hoechste.de/vidnet/fellh.jpg
Type: choose image
WOEID: GMXX0259
Check Category
make sure everything is valid and click save webcam. DONE!










So, if you have questions or any ideas to make lookout better, feel free to mail us: mailto:lookout@laub-home.de