From Peardrop CMS
Jump to: navigation, search

A step by step guide to installing Peardrop.

This guide relates to Peardrop 0.2.x

(under construction)

Preparing your server

You may skip this part if you already have a working web server that supports php.

This example uses Apache2

Ubuntu/Debian Linux

issue these commands as root or via sudo:

update package lists

apt-get update

Install Apache2 web server and php

apt-get install apache2 php5 php5-common libapache2-mod-php5

After that is complete, we need to restart Apache

For Ubuntu version 10.04 and above or Debian Squeeze

(as root or via sudo)

service apache2 restart

Older versions of Linux, or other distributions this is commonly: (as root)

/etc/init.d/apache2 restart

The default web root for apache is /var/www

open a web browser and enter the ip address of the machine you just installed Apache on, for this example we will assume this is localhost.

If all went well, you should see a simple page with the text "It works!" in your browser.

Next we need to test if php installed successfully, to do this we will generate a simple test function.

In your favourite text editor (you may need to do this as root) create the following file

/var/www/test.php - with the following code inside


Save that file and open it in your web browser


all going well, we should see a page load with lots of detailed information about your php installation. example image of this page

Embedded Devices

As of V0.2.1 Peardrop CMS can run on small ARM/X86 devices running lighttpd

Results may vary depending on your device/configuration

Testing on this is limited as I only have an old HP Ipaq H2200 running Angstrom to test this on. If you would like to test/troubleshoot Peardrop on another ARM device, I have given the steps I took below to get lighttpd up and running with fast-cgi to process php.

Angstrom Devices

Please note, only version 0.2.1 and above have been tested to work.

As of the most recent version of Angstrom, the use of Apache2 web server has been retired, and Superseded by lighttpd (essentially a watered down version of apache)

While apache2 is still in the Angstrom feeds, a PHP package is not, and manually compiling a php5 module for your device is the only way around this.

Using the built in package manager, install the following:

ipkg install lighttpd lighttpd-module-fastcgi lighttpd-module-rewrite

And then the php modules:

ipkg install php php-cgi php-cli php-pear

now open /etc/lighttpd.conf in an editor of your choice (vim is the default, nano is also available to install on angstrom)

find the line


and uncomment it (remove the # before it)

and find the php module and uncomment that as well.

#### fastcgi module
## read fastcgi.txt for more info
## for PHP don't forget to set cgi.fix_pathinfo = 1 in the php.ini
fastcgi.server             = ( ".php" =>
                               ( "localhost" =>
                                   "socket" => "/tmp/php-fastcgi.socket",
                                   # Default was "bin-path" => "/usr/local/bin/php"
                                   # Gumstix proper:
                                   "bin-path" => "/usr/bin/php-cgi"

notice that the bin-path has been changed, as the default is wrong. (it needs to be "bin-path" => "/usr/bin/php-cgi")

save the changes and exit.

Important step For some reason, there is no php.ini by default, and thus Peardrop will not work correctly as the session directory is unset.

these commands will give us a php.ini with defaults

command line:

cd /usr/lib

now we need to create the php session directory,

command line:

mkdir /var/lib/php
mkdir /var/lib/php/session
chown root /var/lib/php/ -R

Now restart lighttpd:

/etc/init.d/lighttpd restart

the default web root on angstrom is /www/pages/

create a page called test.php in the web root with the following code, to test that PHP is working correctly.


If everything went well, we should see the purple php info page.

Note: you should also check that session.save_path should be


if it is 'unset' then you need to double check this in your php.ini and re-start lighttpd for changes to take effect.

Microsoft Windows

To use Peardrop we recommend WAMP

Install instructions can be found on their website.

Setting up Peardrop

Download and extract to web root

Assuming you haven't done so already, grab a copy of Peardrop from the Downloads section. Extract/Unzip the archive if you downloaded it from Sourceforge

Once you have extracted the Zip archive, you now need to copy the files to your Web Server,

On Linux

If you have Shell access to your server, you can use wget to download peardrop directly. First, save the .zip file in the location you want to install peardrop to (we're assuming /var/www) *replace <version> with the version you downloaded

  • Replace /var/www with the correct location of your web root if different

Change to the 'Web Root' of yoru web server (/var/www in this example)

Linux command line:

cd /var/www/

Download the peardrop package

Linux command line:


Extract the package's contents

Linux command line:

unzip peardrop-<version>.zip

and now check that it's all extracted

Linux command line:


You may end up with a folder called peardrop, if you want Peardrop to function in the root of your website (and not from you can change to that directory and move it's contents to the root.

Linux command line:

cd peardrop
mv * ./

then remove the empty folder

rm -rf peardrop

Make sure that Apache2 has access to the files

Linux command line (as root or sudo):

chown -R www-data /var/www

and then make sure the permissions are correct.

Linux command line: (as root or sudo)

chmod -R 700 /var/www

Uploading Via FTP

(this step is platform independent) If you're host does not have shell access, or you wish to use FTP, make sure to upload the peardrop folder (or the contents inside it) from your desktop to the correct folder.

Commonly this is under a folder called 'public_html' In this example we are using FileZilla

first download a copy of Peardrop from the Downloads section and extract it.

Connect to your web host in FileZilla then navigate to the public_html folder (for specific instructions on how to connect to your host via FTP if you don't already know, please consult the respective knowledge base or user guide for your web host)

If you want peardrop to function as the main/whole site, make sure the we-root does not have any conflicting files, such as index.html or home.htm for example. You can either delete these files or move them somplace safe if you wish to keep them. (if you do wish to keep them, either copy them to your desktop or make a folder called 'old' and move them to that directory.)

Now Upload the peardrop files to your server by dragging them from your computer/desktop to the empty directory/web root of your server and wait for it to finish uploading them.

On Windows

(To be completed, If you have/use a Windows host with Apache (WAMP) feel free to register and contribute to the how-to for this section.)

Run peardrop installer

(this step is platform independent)

By now you should be ready to run the first run installer, which will take care of a couple of administrative tasks, and also ensure all the working directories have the correct file permissions.

In your web browser go to: http://<your server>/install.php (replace <your server> with the FQDN or IP Address of the host you're runnign Peardrop on)

And follow on screen instructions.

Once complete, the install.php will set up your email and admin password, and then remove itself from the system for security.