Get Started
Installing The DataTank is pretty straightforward, but let’s first check out whether you comply to our requirements.
Prerequisites
The DataTank requires a server with:
- apache
- mod rewrite (apache module)
- PHP 5.3 or higher
- a mysql database
Some of our generic strategies alse have some requirements:
- XLS (beta): PHPExcel
- SHP (beta): php-dbase
Optional tools include:
- memcached
- php-memcache
The easiest way to install these packages on a Debian machine is by issuing this command:
$ apt-get install apache php5 mysql-server php5-dev php5-memcache memcached $ a2enmod rewrite
When you’re installing this on a Windows machine, install WampServer and check documentation.
Installation
Follow these 5 easy steps. You can also check more detailed instructions below.
- Download and unzip The DataTank package.
- Create a new MySQL database and user.
- Copy The DataTank folder contents in the desired directory of your web server.
- Rename Config.example.class.php to Config.class.php and fill out the right parameters.
- Use your favourite browser to navigate to your webhost and follow the installer.
Congrats! You are ready to go!
Detailed Installation
1. Download and unzip The DataTank package.
Download and unzip the The DataTank package from http://github.com/iRail/The-DataTank/downloads.
- If you will be uploading The DataTank to a remote web server, download The DataTank package to your computer with a web browser and unzip the package.
- If you have shell access to your web server, and are comfortable using console-based tools, you may wish to download The DataTank directly to your web server using wget (or lynx or another console-based web browser)
2. Create database and user.
Using phpMyAdmin
If your web server has phpMyAdmin installed, you may follow these instructions to create The DataTank username and database.
- If a database relating to The DataTank does not already exist in the Database dropdown on the left, create one:
- Choose a name for your The DataTank database (e.g. ‘tdt’), enter it in the Create new database field, and click Create.
- Click the Home icon in the upper left to return to the main page, then click Privileges. Create a user:
- Click Add a new User.
- Chose a username for The DataTank (e.g. ‘tdt’) and enter it in the User name field. (Be sure Use text field: is selected from the dropdown.)
- Choose a difficult-to-guess password (ideally containing a combination of upper- and lower-case letters, numbers, and symbols), and enter it in the Password field. (Be sure Use text field: is selected from the dropdown.) Re-enter the password in the Re-type field.
- Write down the username and password you chose.
- Leave all options under Global privileges at their defaults.
- Click Go.
- Return to the Privileges screen and click the Check privileges icon on the user you’ve just created for WordPress. In the Database-specific privileges section, select the database you’ve just created for WordPress under the Add privileges to the following database dropdown. The page will refresh with privileges for that database. Click Check All to select all privileges, and click Go.
- On the resulting page, make note of the host name listed after Server: at the top of the page. (This will usually be localhost.)
Using MySQL Client
You can create MySQL users and databases quickly and easily by running mysql from the shell. The syntax is shown below:
$ mysql -u adminusername -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 5340 to server version: 3.23.54 Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> CREATE DATABASE databasename; Query OK, 1 row affected (0.00 sec) mysql> GRANT ALL PRIVILEGES ON databasename.* TO "username"@"hostname" -> IDENTIFIED BY "password"; Query OK, 0 rows affected (0.00 sec) mysql> FLUSH PRIVILEGES; Query OK, 0 rows affected (0.01 sec) mysql> EXIT Bye $
- tdt can be used for databasename and username.
- hostname will usually be localhost.
- password should be a difficult-to-guess password, ideally containing a combination of upper- and lower-case letters, numbers, and symbols. One good way of avoiding the use of a word found in a dictionary, uses the first letter of each word in a phrase that you find easy to remember.
3. Copy The DataTank folder contents to your web server
You will need to decide where on your web site you’d like your datatank to appear:
- In the root directory of your web site. (For example, http://mydatatank.com/)
- In a subdirectory of your web site. (For example, http://example.com/mydatatank/)
4. Setup Config.class.php
- Rename Config.example.class.php to Config.class.php
- Open Config.class.php and update the properties:
//add a trailing slash! public static $HOSTNAME = "http://localhost/"; // host for caching purposes public static $CACHE_SYSTEM = "MemCache"; //other possibilities: NoCache, apc... public static $CACHE_HOST = "localhost"; public static $CACHE_PORT = 11211; //the webserver subdirectory, if it's not in a subdir, fill in blank public static $SUBDIR = ""; public static $DB = 'mysql:host=localhost;dbname=NAME'; public static $DB_USER = 'root'; public static $DB_PASSWORD = 'root'; // validation for API calls to remotely add resources and modules public static $API_USER = ""; public static $API_PASSWD = ""; // path to the PHPExcel IOFactory.php, required for XLS generic resource public static $PHPEXCEL_IOFACTORY_PATH = "../PHPExcel/Classes/PHPExcel/IOFactory.php"; - Save the Config.class.php file
5. Point your browser to the The DataTank site and follow the installer.
- Welcome screen:

- Config verification:

- System requirements:

- Database check:

- Database setup:

- Installation completed:




