Personal tools
You are here: Home IT Help Center How-tos Installing Plone
Document Actions

Installing Plone

Purpose

Guidelines for installing Plone on FreeBSD 8

Prerequisities

FreeBSD 8

An account called zope and an account called zeo.

Step by step

The Dean's Office has some good pages about the basic setup.

Installing FreeBSD (exact selections may change from version to version)

Only non-defaults mentioned here:

Standard Install

(A) Use entire disk

(Q) Quit

Standard Boot Manager

Disk Label Editor

(C) Create

2048M

Swap

(C)

<remainder>

File System

/

Configure de0

Enable ssh login

New user zope

Don't go back!

 

[EJECT THE ISO!]

# shutdown -r now

 

Edit /usr/local/Plone/zeocluster/bin/poundctl : 

Replace "/usr/bin/env bash" with "/usr/local/bin/bash"

Install bash under FreeBSD:

Login as root and type the following command:

# portsnap fetch

# portsnap extract

# portsnap update

# cd /usr/ports/shells/bash

# make install clean

To use bash shell, enter:

# bash

OR

# /usr/local/bin/bash

To set bash as default, shell enter:

# chsh -s /usr/local/bin/bash {username}

# chsh -s /usr/local/bin/bash vivek


Installing Plone:

First three steps if you're upgrading:

  1. bin/shutdowncluster.sh && pkill pound && pkill varnishd
  2. Save buildout.cfg and Data.fs
  3. rm -rf /usr/local/Plone

Download and install Plone Unified installer 3.3.5

wget http://launchpad.net/plone/3.3/3.3.5/+download/Plone-3.3.5-UnifiedInstaller.tgz

tar -zxvf Plone-3.3.5-UnifiedInstaller.tgz

cd Plone-3.3.5-UnifiedInstaller

Make sure the zope and zeo accounts are created.

./install.sh zeo --nobuildout --user=zope --password=#####

cd /usr/local/Plone/zeocluster

copy buildout.cfg file to /usr/local/Plone/zeocluster

bin/buildout -n -vvv

If you're upgrading:

copy Data.fs to /usr/local/Plone/zeocluster/var/filestorage/

chown zeo Data.fs

Not needed for an upgrade: ln -s /usr/local/Plone/zeocluster/parts/poundbuild/sbin/pound /usr/sbin/pound

In FreeBSD 8, install pound and varnish from ports:

cd /usr/ports/www/pound

make install clean

cd /usr/ports/www/varnish

make install clean

/usr/local/etc/pound.cfg

change 127.0.0.1 to real IP address

Almost all the way at the end it says (by default):

    # for session cookies

    Session

        Type COOKIE

        ID "__ac"

        TTL 300

    End

Change it to:

    # for session IP

    Session

        Type IP

        TTL 600

End

In /etc/rc.d create the file plone

#!/bin/sh
/usr/local/Plone/zeocluster/bin/startcluster.sh
/usr/local/sbin/varnishd -a 169.237.35.218:80 -b 169.237.35.218:8000
/usr/local/sbin/pound

chmod 555 plone

Run the above commands individually to test.

Below is a short script to see if the services are running and reboot them if they are not:

checkclients.sh:

#!/bin/sh
INSTANCE_HOME=/usr/local/Plone/zeocluster/
TEST_URL_1=http://127.0.0.1:8080/
TEST_URL_2=http://127.0.0.1:8081/
TEST_URL_3=http://127.0.0.1:80/
TEST_URL_4=http://127.0.0.1:8000/
echo `date "+%Y-%m-%d %H:%M:%S"`
if ! /usr/local/bin/wget --spider -t 1 -T 30 $TEST_URL_1 2>&1; then
  echo "restarting zope client1 on 40...";
  $INSTANCE_HOME/bin/client1 restart;
fi
if ! /usr/local/bin/wget --spider -t 1 -T 30 $TEST_URL_2 2>&1; then
  echo "restarting zope client2 on 40...";
  $INSTANCE_HOME/bin/client2 restart;
fi
if ! /usr/local/bin/wget --spider -t 1 -T 30 $TEST_URL_3 2>&1; then
  echo "restarting varnish on 40...";
  pkill varnishd;
  /usr/local/sbin/varnishd -a 169.237.35.218:80 -b localhost:8000;
fi
if ! /usr/local/bin/wget --spider -t 1 -T 30 $TEST_URL_4 2>&1; then
  echo "restarting pound on 40...";
  /usr/local/sbin/pound;
fi


Further information

Dean's Office Write-up:

http://cru.caes.ucdavis.edu/web/plone-3.3.5-upgrade-aka-rip-and-rebuild

Varnish buildout recipe:

http://pypi.python.org/pypi/plone.recipe.varnish

« August 2017 »
Su Mo Tu We Th Fr Sa
12345
6789101112
13141516171819
20212223242526
2728293031
 

Powered by Plone CMS, the Open Source Content Management System

This site conforms to the following standards: