Cyclone3 Framework installation - Cyclone3 Wiki

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

[edit] 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

mkdir /www
chmod 770 /www
svn co http://svn.cyclone3.org/trunk/frame /www/TOM
chmod 770 /www/TOM

Add /www/TOM/.bin to PATH

vim /etc/profile
...
source /etc/profile

or edit /etc/environment file on Ubuntu

[edit] 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

Cache

apt-get install memcached

Multimedia

apt-get install perlmagick
apt-get install htmldoc
apt-get install inkscape
apt-get install ffmpeg
apt-get install mencoder

[edit] Apache installation and configuration

Install Apache2.2

apt-get install apache2

Fix Cyclone3 permissions

chown www-data:www-data /www
chown www-data:www-data /www/TOM

Setup virtual hosts

cp /www/TOM/_config/httpd.virtual.conf.tmpl /www/TOM/_config/httpd.virtual.conf
vim /www/TOM/_config/httpd.virtual.conf

Include Cyclone3 httpd configs into Apache2

ln -s /www/TOM/.core/_config/httpd.conf /etc/apache2/conf.d/00-cyclone3.conf
ln -s /www/TOM/_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 /www/TOM

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 /www/TOM/_config/TOM.conf.tmpl /www/TOM/_config/TOM.conf
vim /www/TOM/_config/TOM.conf
# change database connection if required, setup default mail contacts

[edit] 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 .

[edit] MySQL

Install MySQL (5.0)

apt-get install mysql-server

Create user "TOM" in MySQL

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

Create database "TOM".

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

Create example.tld database.

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

[edit] 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 /www/TOM/.core/;nice -n 20 ./cron 1min > /dev/null 2> /dev/null
*/5  *    * * * cd /www/TOM/.core/;nice -n 20 ./cron 5min > /dev/null 2> /dev/null
*/30 *    * * * cd /www/TOM/.core/;nice -n 20 ./cron 30min > /dev/null 2> /dev/null
2    *    * * * cd /www/TOM/.core/;nice -n 20 ./cron 1hour > /dev/null 2> /dev/null
5    */6  * * * cd /www/TOM/.core/;nice -n 20 ./cron 6hour > /dev/null 2> /dev/null
10    1    * * * cd /www/TOM/.core/;nice -n 20 ./cron 1day > /dev/null 2> /dev/null
20    2    */5 * * cd /www/TOM/.core/;nice -n 20 ./cron 5day > /dev/null 2> /dev/null
30    3    * * 1 cd /www/TOM/.core/;nice -n 20 ./cron 7day > /dev/null 2> /dev/null
40    4    1 * * cd /www/TOM/.core/;nice -n 20 ./cron 1month > /dev/null 2> /dev/null

In directory /www/TOM/_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.

[edit] Finalization

Make sure permissions are set right in the /www/TOM 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

[edit] 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 /www/TOM/\!example.tld/\!www/
perl core.tom

Check if cron services works without problems.

su cyclone3
cd /www/TOM/.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

[edit] 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 /www/TOM/\!example.tld/
sudo tom3-chfiles -t
cd rpc
sudo tom3-chfiles -r


[edit] See Also