This section discusses how to download, compile and install BinaryTiers for your platform.
BinaryTiers has few dependencies, and we'll try to keep this number as low as possible.
To use BinaryTiers in Unix-like systems you will need the following packages:
You can install everything at the command prompt:
yum -y install gcc gcc-c++ yum install mysql-devel yum install pcre-devel yum install expat-devel yum install fcgi-devel yum install gd-devel
sudo apt-get update sudo apt-get install g++ sudo apt-get install libmysqlclient15-dev sudo apt-get install libgd2-noxpm-dev sudo apt-get install libpcre3-dev libexpat1-dev libfcgi-dev libssl-dev
To use BinaryTiers in Windows you will need the following:
If your copy of BinaryTiers don't have these libraries, you can obtain the libraries from here:
wget http://www.binarytiers.org/files/binarytiers-2.4.2.tar.gz tar -xvzf binarytiers-2.4.2.tar.gz
The first build of the core has to be done at the command prompt; successive builds might be done using the CMS:
cd binarytiers/lib make
You must create an empty database for BinaryTiers, make sure the database user has the rights to use the BinaryTiers database.
mysql -u MY_DATA_BASE_USER -p create database MY_DATA_BASE_NAME
On the above code change MY_DATA_BASE_USER to your MySQL username and MY_DATA_BASE_NAME to the name of the database.
cd ../src vi settings.h
Edit the settings.h file, and set your Database configuration:
char * DB_HOST = "localhost"; char * DB_USER = "MY_DATA_BASE_USER"; char * DB_PASSW = "MY_DATA_BASE_PASSWORD"; char * DB_NAME = "MY_DATA_BASE_NAME"; int DB_TYPE = 1; // 1:Redis, 2:Mysql int DB_INDEX = 0; // Redis Database char * SENDMAIL_HOST = "localhost"; char * SENDMAIL_FROM = "admin@localhost"; char * TEMP_PATH = "\tmp\"; char * BASE_URL = "http://example.com"; int max_content_length = 200000000; int cookie_lifetime = 2000000; int clean_url = 1;
Build BinaryTiers for the first time. The first build has to be done at the command prompt; successive builds might be done using the CMS:
If you are using Apache, make sure to specify the path of BinaryTiers in the file : /etc/httpd/conf/httpd.conf
<VirtualHost *:80> ServerName example.com ServerAlias example.com DocumentRoot "/MY_BINARYTIERS_PATH/" DirectoryIndex bt.bin <Directory /> Options Indexes MultiViews FollowSymLinks AllowOverride All Order allow,deny Allow from all </Directory> ScriptAlias /cgi-bin/ "/MY_BINARYTIERS_PATH/" </VirtualHost>