Installazione di Plone 4.1 su Debian 6.0.2

Ecco i passi da fare per installare Plone 4 su una distribuzione Debian 6.0.2 oppure Ubuntu 10.04LTS.

L’installazione prevede anche l’installazione di python in una directory utente e senza necessita’ di diritti di root

Gli unici comandi da eseguire come utente root sono i seguenti

aptitude update

aptitude upgrade

aptitude install zlib1g-dev libjpeg-dev build-essential libssl-dev

# la seguente linea e' opzionale
aptitude install ssh sudo screen subversion

# l'installazione dei 2 pacchetti seguenti puo' tornar utile per l'installazione di alcuni prodotti Plone:
aptitude install libxml2-dev libxslt-dev

adduser plone

su - plone

Ecco dunque tutti i passaggi da fare con l’utente appena creato plone

mkdir plone4; cd plone4

Scarico Python, Setuptools e Pip

wget http://www.python.org/ftp/python/2.7.1/Python-2.7.1.tgz
wget http://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c11.tar.gz#md5=7df2a529a074f613b509fb44feefe74e
wget http://pypi.python.org/packages/source/p/pip/pip-1.0.2.tar.gz#md5=47ec6ff3f6d962696fe08d4c8264ad49
ATTENZIONE: Plone 4.1 non supporta completamente Python 2.7.x. Per quel che ho provato io funziona tutto, ma ufficialmente non e’ supportato Python 2.7.x
La scelta piu’ cautelare Per Plone 4.1 e’ Python 2.6: http://www.python.org/ftp/python/2.6.7/Python-2.6.7.tgz

Scompatto tutti i pacchetti

for i in `ls -1 *gz `; do tar xvzf $i; done

Creo il percorso dove andrò ad installare Python

mkdir -p python/2.7.1
cd Python-2.7.1

Configuro i sorgenti di Python per essere installati nel percorso definito sopra

./configure --prefix="/home/plone/plone4/python/2.7.1"
make
make install

Verifico che python sia installato con il supporto ssl:

$ ../python/2.7.1/bin/python
Python 2.7.1 (r...........)
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import socket
>>> socket.ssl
<function ssl at 0xb768ac34>
>>>

Se ottengo un risultato simile a quello sopra posso proseguire tranquillo, esco dalla console python con CTRL+d

Installo Setuptools e Pip

cd ../setuptools-0.6c11/
../python/2.7.1/bin/python2.7 setup.py install
cd ../pip-1.0.2/
../python/2.7.1/bin/python2.7 setup.py install
cd ..

Utilizzo Pip per installare ZopeSkel

./python/2.7.1/bin/pip install zopeskel==2.21.2
./python/2.7.1/bin/paster create --list-templates

Creo il buildout di Plone

./python/2.7.1/bin/paster create -t plone4_buildout
Selected and implied templates:
ZopeSkel#plone4_buildout  A buildout for Plone 4 developer installation
Enter project name: instance
Variables:
 egg:      instance
 package:  instance
 project:  instance
**************************************************************************
**   *** NOTE: You probably don't want to use this template!
**  Since Plone 3.1, the preferred way to get a buildout-based setup
**  for Plone is to use the standard installer for your operating
**  system (the Windows installer, the Mac installer, or the Unified
**  Installer for Linux/Unix/BSD). These give you a best-practice,
**  widely-used setup with an isolated Python and a well-documented
**  buildout. This template is here for older versions of Plone and
**  for experts who explicitly want a raw, non-installer-based
**  installation.
**  (This message is particularly aimed at people following out-of-
**  date books/documentation that suggest this is the right way to get
**  a Plone-based buildout. This is no longer the case.)
**************************************************************************
Expert Mode? (What question mode would you like? (easy/expert/all)?) ['easy']:
Plone Version (Plone version # to install) ['4.0.5']: 4.1
Creating template plone4_buildout
Creating directory ./instance
 Copying README.txt to ./instance/README.txt
 Copying bootstrap.py to ./instance/bootstrap.py
 Copying buildout.cfg_tmpl to ./instance/buildout.cfg
 Recursing into src
 Creating ./instance/src/
 Copying README.txt to ./instance/src/README.txt
 Recursing into var
 Creating ./instance/var/
 Copying README.txt to ./instance/var/README.txt
**************************************************************************
**   Generation finished.
**  You probably want to run python bootstrap.py and then edit
**  buildout.cfg before running bin/buildout -v".
**  See README.txt for details.
**************************************************************************
cd instance
../python/2.7.1/bin/python bootstrap.py
./bin/buildout

Avvio l’istanza in modalità foreground

./bin/instance fg

Per avviarla in background utilizzerò poi

./bin/instance start

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.