Cyclone3 Framework installation

From Cyclone3 Wiki

(Redirected from Debian installation)

We are typically using Gentoo or Debian for Cyclone3 Framework, so these are our two cents for Debian administrators. This installation process can take 15-30 minutes.

Note: If you are Microsoft Windows user, or you just want to check Cyclone3, try our prepared full Cyclone3 environment in VMware image. In VMware image you are not required to follow these instructions!!!

Warning: Use the wiki watch function above this page to watch it, because the installation process is changing toghether with the development of Cyclone3 in the future. So this document is important not only for the first installation, but for upgrading Cyclone3 as well

Note: If any problem occurs, don't hesitate ask us in our IRC channel #cyclone3 at irc.freenode.net or fill it into bug tracking system at http://bugzilla.cyclone3.org

Contents

Preparing the Cyclone3 environment

First, check system requirements.

Get Subversion to manage and install Cyclone3 from subversion repository

apt-get install subversion libsvn-perl

Get Cyclone3 Framework sources

svn co http://svn.cyclone3.org/trunk/frame /Cyclone3
chmod 770 /Cyclone3

Define Cyclone3 path and add /Cyclone3/.bin to PATH

vim /etc/profile
...
CYCLONE3PATH="/Cyclone3"
export CYCLONE3PATH
...
source /etc/profile

or edit /etc/environment file on Ubuntu

Install required libraries and other stuff

apt-get install build-essential libinline-perl libmime-perl libdatetime-perl \
libproc-process-perl libxml-generator-perl libxml-xpath-perl libsoap-lite-perl \
libnet-smtpauth-perl libstring-crc32-perl libfcgi-perl libcgi-fast-perl \
libparallel-forkmanager-perl libcompress-zlib-perl libfile-type-perl \
libjson-any-perl

Cache

apt-get install memcached

Template Toolkit XS (optional)

perl -MCPAN -eshell
install Template::Stash::XS

Multimedia

apt-get install perlmagick

Multimedia advanced (not required)

apt-get install htmldoc
apt-get install ffmpeg
apt-get install mencoder

Apache installation and configuration

Install Apache2.2

apt-get install apache2

Setup Cyclone3 into apache2 environment. Add line

export CYCLONE3PATH=/Cyclone3

into file /etc/apache2/envvars

Fix Cyclone3 permissions

chown www-data:www-data /Cyclone3

Setup virtual hosts

cp /Cyclone3/_config/httpd.virtual.conf.tmpl /Cyclone3/_config/httpd.virtual.conf
vim /Cyclone3/_config/httpd.virtual.conf

Include Cyclone3 httpd configs into Apache2

ln -s /Cyclone3/.core/_config/httpd.conf /etc/apache2/conf.d/00-cyclone3.conf
ln -s /Cyclone3/_config/httpd.virtual.conf /etc/apache2/conf.d/01-cyclone3-virtual.conf

Create user cyclone3

groupadd cyclone3
useradd cyclone3 -g cyclone3 -G www-data,crontab,users -d /Cyclone3

Adding user www-data to the group cyclone3. Chceck following command manually (by editing /etc/group), because not works how is proposed (if that command do not works, manualy add user www-data to group cyclone3)

usermod www-data -a -G cyclone3

Configure Cyclone3

cp /Cyclone3/_config/TOM.conf.tmpl /Cyclone3/_config/TOM.conf
vim /Cyclone3/_config/TOM.conf
# change database connection if required, setup default mail contacts

Apache2 modules

Install mod_fcgid.

apt-get install libapache2-mod-fcgid

Enable mod_rewrite

cd /etc/apache2/mods-enabled
ln -s ../mods-available/rewrite.load .

Enable mod_deflate to compress sending content

ln -s ../mods-available/deflate.load .
ln -s ../mods-available/deflate.conf .

Enable mod_expires to cache all static content

ln -s ../mods-available/expires.load .

MySQL

Install MySQL (>=5.0)

apt-get install mysql-server

Create user "TOM" in MySQL

mysql -h localhost -u root -p < /Cyclone3/_data/mysql.sql

Create database "TOM".

mysql -h localhost -u TOM < /Cyclone3/_data/TOM.sql

Create example.tld database.

mysql -h localhost -u TOM;
create database example_tld;
quit;

Apache Solr (optional)

download from http://lucene.apache.org/solr/ and install
use schema.xml from Cyclone3 _addons/Ext/Solr/schema*.xml

add to TOM.conf

$Ext::Solr::url='http://localhost:8983/solr';

Cron system

If you are installing Cyclone3 on serverfarm (set of Cyclone3 servers), setup cron system only once at selected host.

su cyclone3
crontab -e

Add this lines:

*    *    * * * cd /Cyclone3/.core/;nice -n 20 ./cron 1min > /dev/null 2> /dev/null
*/5  *    * * * cd /Cyclone3/.core/;nice -n 20 ./cron 5min > /dev/null 2> /dev/null
*/30 *    * * * cd /Cyclone3/.core/;nice -n 20 ./cron 30min > /dev/null 2> /dev/null
2    *    * * * cd /Cyclone3/.core/;nice -n 20 ./cron 1hour > /dev/null 2> /dev/null
5    */6  * * * cd /Cyclone3/.core/;nice -n 20 ./cron 6hour > /dev/null 2> /dev/null
10    1    * * * cd /Cyclone3/.core/;nice -n 20 ./cron 1day > /dev/null 2> /dev/null
20    2    */5 * * cd /Cyclone3/.core/;nice -n 20 ./cron 5day > /dev/null 2> /dev/null
30    3    * * 1 cd /Cyclone3/.core/;nice -n 20 ./cron 7day > /dev/null 2> /dev/null
40    4    1 * * cd /Cyclone3/.core/;nice -n 20 ./cron 1month > /dev/null 2> /dev/null

In directory /Cyclone3/_logs/ will be during 1-5 minutes showing new log files. When yes, cron system is working. When not, most often is the error in file permissions.

Finalization

Make sure permissions are set right in the /Cyclone3 directory.

tom3-chfiles -a

Upgrade Cyclone3 and fix database structures.

tom3-chtables

Install example.tld database structures

tom3-db_install --domain=example.tld \
--name=a160,a210,a301,a401,a411,a501,a510,a542,a710,a821,a910

Check all database structures

tom3-chtables -a

Tests

Try to execute Cyclone3 web publisher from the commandline. (requires shell for apache). Skip this step when you are not require working example.tld domain.

su www-data
cd /Cyclone3/\!example.tld/\!www/
perl core.tom

Check if cron services works without problems.

su cyclone3
cd /Cyclone3/.core
./cron 1min

Restart Apache2 and try to load example.tld webpage

/etc/init.d/apache2 restart

Add example.tld into /etc/hosts and try to wget or load with browser example.tld testing webpage

Install XULadmin backend example.tld/rpc

  • Export XULadmin backend to manage example.tld domain service
cd \!example.tld
svn co http://svn.cyclone3.org/trunk/xuladmin/docroot rpc
  • Add your account into XULadmin backend ( execute Cyclone3 module with console command )
tom3-cron --domain=example.tld ---global=1 ---category=301 ---name=user_new \
--login=username --pass=password --groups=admin,editor
  • Fix file permissions
cd /Cyclone3/\!example.tld/
sudo tom3-chfiles -t
cd rpc
sudo tom3-chfiles -r


See Also


If published informations are not helpfull, something is missing or wrong, please report. Thanx for contribution.

AddThis Social Bookmark Button RSS

User Comments


Posted by Anonymous on 2008-10-20 14:57:32
Would be great to have a RedHat/CentOS install guide

Posted by rfordinal on 2007-09-16 13:12:41
Debian installation is described in wiki:
http://www.cyclone3.org/wiki/Debian_installation

Posted by pavkamlc at centrum dot cz on 2007-05-17 13:54:25
Debian based system uses /var/www/ and apache user is www-data

Posted by rfordinal on 2007-04-01 16:34:38
Gentoo and other distributions install process will be available soon. If anyone want to install Cyclone3 to Windows, contact us please!