Вы находитесь на странице: 1из 3

Howto Spotweb on ZFSguru

1. SSH in to your server with username: ssh 2. Root acces: su 3. Update your system
Always update your ports tree first:
# portsnap fetch update

4. Install dependencies

4.1 Install MySQL server # cd /usr/ports/databases/mysql55-server # make install clean 4.2 Make MySQL start at boot: # ee /etc/rc.conf Add this line to the local daemons section and save: mysql_enable="YES" 4.3 Start MySQL:
# /usr/local/etc/rc.d/mysql-server start

4.4 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 youve created a MySQL root password, a database called spotweb and an user spotweb with password spotweb, which has al privileges on database spotweb.
4.5 Install 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

Howto SpotWeb on ZFSguru v2.0

4.6 Edit php.ini timezone (list of timezones http://www.php.net/manual/en/timezones.php):


# sed -i ".backup" 's/;date.timezone =/date.timezone = "Europe\/Amsterdam"/g' /usr/local/etc/php.ini Change Europe\/Amsterdam to: Your\/Timezone

List of supported timezones: http://www.php.net/manual/en/timezones.php

5. Install Spotweb
5.1 Download Spotweb using git:
# cd /usr/local/www/data # git clone https://github.com/spotweb/spotweb.git # chown -R www:www spotweb

5.2 Restart webserver # /usr/local/etc/rc.d/lighttpd restart 5.3 Now, lets see if everything is properly installed. Open this url in a browser:
http://ip.to.your.server/spotweb/testinstall.php

You should see something like the picture on the next page, with a lot of OKs If everything is OK, youre good to go. If not, you better fix this first before continuing. http://ip.to.your.server/spotweb should show the Spotweb interface. Still without spots though. 5.4 Start configuring Spotweb. In the upper right corner of the Spotweb webinterface, press login and login with: user: admin passwd: admin Then press the configuration button and configure your newsserver and other settings. 5.5 After configuring! Upgrade the spotweb database and start filling it with spots, for the first time:
# php upgrade-db.php # php retrieve.php # <== depending on your settings, this takes a very long time!

5.5 Make a cronjob to auto-update Spotweb database:


# ee /etc/crontab

Add this line somewhere at the bottom, to hourly retrieve new spots:
@hourly www cd /usr/local/www/data/spotweb && /usr/local/bin/php retrieve.php > /dev/null

Howto SpotWeb on ZFSguru v2.0

Howto SpotWeb on ZFSguru v2.0

Вам также может понравиться