Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

Table of Contents

General Remarks

All actions described below are executed as root.

References

Product Home Page: http://www.xt-commerce.com

User Manual: https://xtcommerce.atlassian.net/wiki/display/MANUAL/Home

Knowledge Base: http://www.xt-commerce.info/index.php?_m=knowledgebase&_a=view&parentcategoryid=11&pcid=0&nav=0

ionCube: http://www.ioncube.com

System Setup

Additional Packages

The software had been installed on a CentOS 6.4 LAMP server, so most packages and modules had been there already. The only missing package had to be added with:

yum install php-soap

/etc/hosts

By default, we include the IP addresses of virtual hosts in /etc/hosts:

Code Block
languagebash
title/etc/hosts
# insert:
81.20.132.68 web-shop-a.gutzmann.com web-shop-a

System-wide Installation of ionCube

Download and install ionCube

Code Block
languagebash
# as root
cd ~
mkdir -p installers
cd installers
wget http://downloads2.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
tar -xzf ioncube_loaders_lin_x86-64.tar.gz
# copy all modules - at a minimum it should be ioncube_loader_lin_5.3.so
cp ~/installers/ioncube/ioncube_loader_lin_*.so /usr/lib64/php/modules/

Add ionCube to the PHP configuration

Code Block
vi /etc/php.d/20ioncube.ini
### insert: ###
zend_extension = /usr/lib64/php/modules/ioncube_loader_lin_5.3.so

Apache Setup

On our web servers we keep all project related files in one directory; the configuration files are referenced in one "site-includes.conf" which is included by the Apache main configuration file. In other installation, the project configuration might be stored in /etc/httpd/conf.d.

Code Block
languagebash
vi /etc/httpd/conf/site-includes.conf
### insert: ###
Include /server/projects/gutzmann/web-shop-a.gutzmann.com/admin/conf/apache/web-shop-a.gutzmann.com.conf

Now the project configuration file has to be created:

Code Block
languagexml
mkdir -p /server/projects/gutzmann/web-shop-a.gutzmann.com/admin/conf/apache
vi /server/projects/gutzmann/web-shop-a.gutzmann.com/admin/conf/apache/web-shop-a.gutzmann.com.conf
### insert: ###
<Virtualhost *:80>
        ServerName web-shop-a.gutzmann.com
        DocumentRoot /server/projects/gutzmann/web-shop-a.gutzmann.com/htdocs
        <Directory "/server/projects/gutzmann/web-shop-a.gutzmann.com/htdocs/">
                Options FollowSymLinks
                AllowOverride All
                Order allow,deny
                Allow from all
        </Directory>
</Virtualhost>

Finally the htdocs directory references in the conf file has to be created:

Code Block
languagebash
mkdir -p /server/projects/gutzmann/web-shop-a.gutzmann.com/htdocs

Install and Configure xtCommerce

Download

Please check for more recent version of xtCommerce at http://www.xt-commerce.com.

Code Block
languagebash
cd ~/installers
wget --no-check-certificate https://s3-eu-west-1.amazonaws.com/xtcommerce4/4.1.00/xtCommerce_4_1_00_wizzard_27_08.zip
unzip xtCommerce_4_1_00_wizzard_27_08.zip
mv xtCommerce_4_1_00_27_08/upload/* /server/projects/gutzmann/web-shop-a.gutzmann.com/htdocs

Install License

Code Block
languagebash
vi /server/projects/gutzmann/web-shop-a.gutzmann.com/htdocs/lic/license.txt
### insert license sent by mail mail ###

Add ionCube to xtCommerce

Though ionCube has been installed already, some files are required during the xtCommerce setup process, so we simply move everything to htdocs:

Code Block
languagebash
mv ~/installers/ioncube /server/projects/gutzmann/web-shop-a.gutzmann.com/htdocs/

Configure mod_rewrite

For some reason, the xtCommerce setup process complains that mod_rewrite is missing, so we reference it in a new htdocs/.htaccess:

Code Block
languagexml
vi /server/projects/gutzmann/web-shop-a.gutzmann.com/htdocs/.htaccess
### insert: ###
<IfModule mod_rewrite.c>
SetEnv HTTP_MOD_REWRITE On
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_URI} !^/media/
RewriteCond %{REQUEST_URI} !^/extAdmin/
RewriteCond %{REQUEST_URI} !^/skin/
RewriteCond %{REQUEST_URI} !^/js/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule .* index.php
</IfModule>

Make Apache the Owner of htdocs

xtCommerce has to be able to modify files, so Apache must be made owner of htdocs and everything below it:

Code Block
languagebash
chown -R apache /server/projects/gutzmann/web-shop-a.gutzmann.com/htdocs

Apache Restart

Now everything has been set up as far as Apache is concerned, so we can check the configuration and relaunch the HTTPD process:

Code Block
languagebash
service httpd configtest
### only if no errors are found: ###
service httpd graceful

MySQL Setup

xtCommerce requires a dedicated mySQL database (schema). Use phpMyAdmin, the command line tool of any other means to set up a new schema; you should also add a dadabase user with full access rights to the new schema. In phpMyAdmin you can add a new user for localhost and tick the option "Create database with same name and grant all privileges".

Info

Gutzmann internal: Record user/password details in our common password repository.

xtCommerce Setup

ionCube

In a first step, make sure that ionCube is working:

http://web-shop-a.gutzmann.com/ioncube/loader-wizard.php?timeout=0&ini=0&page=loader_check

xtCommerce

Now launch the xtCommerce setup:

http://web-shop-a.gutzmann.com/xtInstaller/no-loader.php

The first step will complain that ionCube has not been set up. Just click the "check" link at the bottom, and the process will continue.

At a later step, you may see that "PHP SOAP Library (for BillSafe Plugin)" is not working. You can safely ignore it at this stage.

Set Strong admin Password

xtCommerce creates an admin user with a rather weak password. As soon as the setup is finished, you should open the admin page and set a safe password:

http://web-shop-a.gutzmann.com/xtAdmin/ejsadmin.php

-> Settings (Einstellungen) -> Admin Rights (Adminrechte) -> Admin User (Admin Benutzer) -> edit "admin"

Info

Gutzmann internal: Record user/password details in our common password repository.

Re-check the Installation Status

http://web-shop-a.gutzmann.com/xtInstaller/index.php

The SOAP module should be shown as OK now.

Block access to xtInstaller

When you launch the shop page, you will see a warning that xtInstaller and xtUpdate should be removed. The latter doesn't exist in a fresh installation. Instead of removing it, move it to a directory Apache has no access to:

Code Block
languagebash
mv /server/projects/gutzmann/web-shop-a.gutzmann.com/htdocs/xtInstaller /server/projects/gutzmann/web-shop-a.gutzmann.com