Create domain service - Cyclone3 Wiki

Create domain service

From Cyclone3 Wiki

This is 5 minute howto to domain service installation. At first don't forget to install Cyclone3 Framework :)

Note: Running domain service is available in Cyclone3 Server (VMware) image.

[edit] Create and configure

  • Export domain example from subversion into: /www/TOM
cd /www/TOM
svn export http://svn.cyclone3.org/trunk/frame/\!example.tld \!domain.tld
  • Configure domain
vim \!domain.tld/master.conf
vim \!domain.tld/local.conf
  • Create database source for domain
mysql -h localhost -u TOM -p
CREATE DATABASE domain_tld;
  • Install required application tables (articles, images, videos, ...) into database, and check installation
tom3-db_install --domain=domain.tld --name=a160,a210,a401,a411,a501,a510,a542,\
a710,a720,a821,a910,a920
tom3-chtables --domain=domain.tld
  • Fix file permissions
cd /www/TOM
sudo tom3-chfiles -t
cd \!domain.tld
sudo tom3-chfiles -r
  • Add domain services into apache virtual hosts
vim /www/TOM/_config/httpd.virtual.conf

Add these lines:

#######################################################################

<VirtualHost 127.0.0.1:80>
       ServerName www.domain.tld
       ServerAlias domain.tld
       DocumentRoot /usr/www/TOM/!domain.tld/!www
       CustomLog /usr/www/TOM/_logs/httpd/www_domain_tld.acc.log combined
       <Directory /usr/www/TOM/!domain.tld/!www>
               AllowOverride All
       </Directory>
</VirtualHost>

[edit] Install XULadmin backend domain.tld/rpc

  • Export XULadmin backend to manage domain.tld domain service
cd \!domain.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=domain.tld ---global=1 ---category=301 ---name=user_new \
--login=username --pass=password --groups=admin,editor
  • Add domain services into apache virtual hosts
vim /www/TOM/_config/httpd.virtual.conf

Update these lines:

#######################################################################

<VirtualHost 127.0.0.1:80>
      ServerName www.domain.tld
      ServerAlias domain.tld
      DocumentRoot /usr/www/TOM/!domain.tld/!www
      CustomLog /usr/www/TOM/_logs/httpd/www_domain_tld.acc.log combined
      <Directory /usr/www/TOM/!domain.tld/!www>
              AllowOverride All
      </Directory>
      # rpc
      Alias /rpc "/www/TOM/!domain.tld/rpc/!www"
      <Directory /www/TOM/!domain.tld/rpc/!www>
              Options FollowSymlinks ExecCGI
              AllowOverride All
      </Directory>
</VirtualHost>
  • Fix file permissions
cd /www/TOM/\!domain.tld/
sudo tom3-chfiles -t
cd rpc
sudo tom3-chfiles -r

[edit] Start

Just type:

/etc/init.d/apache2 restart