Skip to content

Spotweb installation on ZFSGuru (FreeBSD)

Rick164 edited this page Jan 25, 2015 · 3 revisions

This guide explains how to get Spotweb running on ZFSguru, including all dependencies.

ZFSguru is a FreeBSD based operating system.

Install and configure dependencies

MySQL server

Installation:

# cd /usr/ports/databases/mysql55-server

# make install clean

Make MySQL-server start at boot:

# ee /etc/rc.conf

Add this line:

# mysql_enable="YES"

Start MySQL-server:

# /usr/local/etc/rc.d/mysql-server start

Configure MySQL (replace the word: YOURPASSWORD, with your password, duh)

Create a MySQL root password:

# mysqladmin -u root password YOURPASSWORD

Create database:

# mysql -u root --password="YOURPASSWORD" -e "CREATE DATABASE spotweb;"

Create user spotweb:

# mysql -u root --password="YOURPASSWORD" -e "CREATE USER 'spotweb'@'localhost' IDENTIFIED BY 'spotweb';"

Set permissions for user spotweb:

# mysql -u root --password="YOURPASSWORD" -e "GRANT ALL PRIVILEGES ON spotweb.* TO spotweb @'localhost' IDENTIFIED BY 'spotweb';"

Now you’ve created a MySQL root password, a database called ‘spotweb’ and an user ‘spotweb’ with password ‘spotweb’, which has al privileges on database ‘spotweb’.

PHP and PHP-extensions:

Installation php5-extensions:

# cd /usr/ports/lang/php5-extensions

# make install clean

in the configuration menu, add the following extensions to the default selection:

  • CURL
  • GD
  • GETTEXT
  • MBSTRING
  • MYSQL
  • OPENSSL
  • ZIP
  • ZLIP

Configure PHP

Configure PHP timezone (list of timezones http://www.php.net/manual/en/timezones.php):

# ee /usr/local/etc/php.ini

Find this line:

;date.timezone =

and change it to:

date.timezone = "Europe/Amsterdam"

Don't forget to uncomment the line by removing the semicolon ;

Spotweb

Installation:

# cd /usr/local/www/zfsguru

# git clone https://github.com/spotweb/spotweb.git

# chown -R www:www spotweb

Restart webserver (Lighttpd)

# /usr/local/etc/rc.d/lighttpd restart

Now, let’s see if everything is properly installed. Open this url in a browser:

http://ip.to.your.server/spotweb/install.php

You should see a page with a lot of OK’s Click the Next button at the bottom of the page and start configuring Spotweb

After configuring!

Upgrade the spotweb database and start filling it with spots, for the first time:

# cd /usr/local/www/zfsguru/spotweb

# php upgrade-db.php

# php retrieve.php <== depending on your settings, this could take a very long time!

Optional: configure a cronjob to auto-update Spotweb database:

# ee /etc/crontab

Add this line somewhere at the bottom, to retrieve new spots hourly:

@hourly www cd /usr/local/www/data/spotweb && /usr/local/bin/php retrieve.php > /dev/null

Clone this wiki locally