Skip to content

Commit bc194f0

Browse files
author
Michiel Vancoillie
committed
Typo's, structure and attribution to @spikewilliams
1 parent 27b7b93 commit bc194f0

File tree

3 files changed

+49
-30
lines changed

3 files changed

+49
-30
lines changed

app/controllers/docs/4.1/installation.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ If you're using a <strong>Unix</strong> system that supports the <strong>apt-ge
2121
$ apt-get install apache2 php5 mysql-server php5-dev php5-memcache memcached php5-curl
2222
$ a2enmod rewrite
2323

24-
If you're using a <strong>Linux</strong> distribution derived from the Red Hat family, or which uses the <strong>yum</strong> package manager, you may need to follow the [CentOS 6](installation_centos6.md) installation instructions.
24+
If you're using a <strong>Linux</strong> distribution derived from the Red Hat family, or which uses the <strong>yum</strong> package manager, you may need to follow the [CentOS 6](installation_centos6) installation instructions.
2525

2626
If you're using a <strong>Windows</strong> system, you'll have to download a web stack that holds the necessary requirements, such as [WAMPServer](http://www.wampserver.com/en/), plus [msysgit](http://msysgit.github.io/).
2727

@@ -59,7 +59,7 @@ Provide your database credentials in the `app/config/database.php` file, accordi
5959
After that you're ready to make composer work his magic! Run the following command from the root of the folder where you cloned the repository:
6060

6161
composer install
62-
62+
6363
#### Add permissions to the log directory
6464

6565
To store logs and other files, the right permissions need to be set:

app/controllers/docs/4.1/installation_centos6.md

Lines changed: 46 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,36 @@
1-
Installation of The DataTank on CentOS 6.5
2-
========================================
1+
# Installation of The DataTank on CentOS 6.5
2+
3+
On this page you will learn
4+
5+
* [Background](#background)
6+
* [Installation of basic packages](#installation)
7+
* [Install Composer and download tdt/core](#composer)
8+
* [Database setup and configuration](#database)
9+
* [Hack composer.json and run the build](#hack)
10+
* [Set up the webserver, configure permissions and the firewall](#webserver)
11+
12+
13+
14+
This guide was contributed by [Spike Williams](https://github.com/spikewilliams)
15+
16+
17+
<a id='background' class='anchor'></a>
18+
## Background
319

4-
Background
5-
----------
620
When installing The DataTank, users of CentOS 6 will need to make a choice about what version of PHP they will be using to support the installation. As CentOS 6.5 is based on Red Hat Enterprise Linux - with its preference for older packages that have a proven track record of stability - the default installation of PHP is version 5.3.3.
721

8-
However, the Laravel 4.0 framework, which forms the foundation upon which TheDataTank is constructed, requires PHP 5.3.7 as the minimum version, and newer versions of Laravel bump that requirement up to PHP 5.4.0. Additionally, there are a number of [PHPUnit tests](https://github.com/tdt/core/issues/170) that come with The DataTank which use syntax that requires by PHP 5.4 and above.
22+
However, the Laravel 4.0 framework, which forms the foundation upon which The DataTank is constructed, requires PHP 5.3.7 as the minimum version, and newer versions of Laravel bump that requirement up to PHP 5.4.0. Additionally, there are a number of [PHPUnit tests](https://github.com/tdt/core/issues/170) that come with The DataTank which use syntax that requires by PHP 5.4 and above.
923

1024
Thus, there are two choices when it comes to running The DataTank on CentOS 6 -- either upgrade PHP to version 5.4.x, or make the modifications, detailed below, needed to install The DataTank using the default PHP 5.3.3 installation.
1125

12-
When feasible, upgrading PHP to 5.4.x is perhaps the better option, because it enables forward-compatibility and will support the full complement of PHPUnit tests. [Daniel Heramb](http://danielheramb.blogspot.com/2013/03/how-to-install-laravel-on-linux.html) has written some good instructions on installing PHP 5.4 as part of a Laravel installation.
26+
When feasible, upgrading PHP to 5.4.x is perhaps the better option, because it enables forward-compatibility and will support the full complement of PHPUnit tests. [Daniel Heramb](http://danielheramb.blogspot.com/2013/03/how-to-install-laravel-on-linux.html) has written some good instructions on installing PHP 5.4 as part of a Laravel installation.
1327

14-
But there may be compelling reasons for remaining on PHP 5.3.3. There may be an organizational preference for utilizing default packages, or it may be necessary to maintain 5.3.x compatibility for other PHP applications running on the server. Drupal 7, for example, will run on PHP 5.4, but "prefers" 5.3, and may generate a rather large number of warnings when running PHP 5.4.
28+
But there may be compelling reasons for remaining on PHP 5.3.3. There may be an organizational preference for utilizing default packages, or it may be necessary to maintain 5.3.x compatibility for other PHP applications running on the server. Drupal 7, for example, will run on PHP 5.4, but "prefers" 5.3, and may generate a rather large number of warnings when running PHP 5.4.
1529

1630
For cases where remaining on PHP 5.3.3 is considered the best option, the following installation instructions may be used. They have been successfully tested on a virtual machine running a fresh installation of CentOS 6.5. Additionally, many of the steps below will also be of use to those installing The DataTank on top of PHP 5.4.x on a Red Hat-family Linux distribution, as they reflect a yum-based installation, Red Hat-flavored directory structures, and instructions on a required SELinux security configuration.
1731

18-
# Installation of basic packages
32+
<a id='installation' class='anchor'></a>
33+
## Installation of basic packages
1934

2035
As the root user, use Yum to install git, curl, the MySQL client and Apache webserver:
2136

@@ -24,7 +39,7 @@ As the root user, use Yum to install git, curl, the MySQL client and Apache webs
2439
yum install wget
2540
yum install mysql
2641
yum install httpd
27-
42+
2843
Install and start memcached:
2944

3045
yum install memcached
@@ -42,8 +57,8 @@ Install PHP core and various PHP libraries:
4257
yum install php-pecl-apc
4358
yum install php-xml
4459

45-
The following package was recommended for optimization, but is not available in the default repositories. It is listed here for completeness only; you do not need to install it - and, indeed, may not be able to.
46-
60+
The following package was recommended for optimization, but is not available in the default repositories. It is listed here for completeness only; you do not need to install it - and, indeed, may not be able to.
61+
4762
yum install php-pecl-zendopcache
4863

4964
There are some additional PHP packages which must be installed from the Extra Packages for Enterprise Linux (or EPEL) RPM repository, which is a repository of Red Hat compatible binaries supported by the Fedora community. Use the following commands to install the EPEL repository
@@ -56,7 +71,8 @@ With the EPEL repository installed, you will now be able to install these two PH
5671
yum install php-mcrypt
5772
yum install php-mbstring
5873

59-
# Install Composer and download tdt/core
74+
<a id='composer' class='anchor'></a>
75+
## Install Composer and download tdt/core
6076
Use the following commands to install Composer and put it in the path:
6177

6278
curl -sS https://getcomposer.org/installer | php
@@ -68,10 +84,11 @@ Create an installation directory and bring in the tdt code using git:
6884
cd /opt/tdt
6985
git clone https://github.com/tdt/core.git
7086

71-
# Database setup and configuration
87+
<a id='database' class='anchor'></a>
88+
## Database setup and configuration
7289
If MySQL is to be hosted locally, install and start the MySQL server:
7390

74-
yum install mysql-server
91+
yum install mysql-server
7592
/etc/init.d/mysqld start
7693

7794
Configuring security on MySQL is outside the scope of this document. However, the following lines of SQL used to create a database and user are included for your convenience. Log into your MySQL prompt, and type the following:
@@ -94,43 +111,45 @@ Be sure to use a better password than the one provided above. Add these settings
94111
'prefix' => '',
95112
)
96113

97-
# Hack composer.json and run the build
114+
<a id='hack' class='anchor'></a>
115+
## Hack composer.json and run the build
98116

99117
For installing on PHP 5.3.3, this is where things get tricky. Those who are installing on 5.4.x can skip the edits to composer.json listed below, and move on to running composer, at the end of this section.
100118

101-
The reason Laravel requires PHP 5.3.7 at a minimum is that it requires bcrypt-based hashing, which is not available in 5.3.3. Howerver, [Rob Clancy](https://github.com/robclancy/laravel4-hashing) has provided a patch which overrides the bcrypt hashing code with a hash using the sha5 algorythm. Enable this patch by adding the following to the top of the "require" section of tdt's core/composer.json file:
119+
The reason Laravel requires PHP 5.3.7 at a minimum is that it requires bcrypt-based hashing, which is not available in 5.3.3. However, [Rob Clancy](https://github.com/robclancy/laravel4-hashing) has provided a patch which overrides the bcrypt hashing code with a hash using the sha5 algorythm. Enable this patch by adding the following to the top of the "require" section of tdt's core/composer.json file:
102120

103-
* "robclancy/laravel4-hashing": "dev-master",
121+
"robclancy/laravel4-hashing": "dev-master",
104122

105123
You will also need to trick the Composer build process into using Laravel 4.0.10 instead of 4.1.x. This is because the 4.1 series of Laravel requires PHP 5.4, and will not run with 5.3. Thus, in the same core/composer.json file as above, edit the line that referes to "laravel/framework", as follows:
106124

107-
* "laravel/framework": "4.0.10 as 4.1.10",
125+
"laravel/framework": "4.0.10 as 4.1.10",
108126

109127
Now, run composer - this could take 20 minutes or so, depending on your setup.
110-
128+
111129
cd core
112130
composer install
113131

114-
# Set up the webserver, configure permissions and the firewall
132+
<a id='webserver' class='anchor'></a>
133+
## Set up the webserver, configure permissions and the firewall
115134

116135
Create a shortcut under Apache's content directory to the publicly exposed portion of your installation:
117136

118137
ln -s /opt/tdt/core/public /var/www/html/tdt
119-
138+
120139
Edit the Apache configuration file, located at /etc/httpd/conf/httpd.conf:
121140

122141
* Under the configuration for &lt;Directory "/var/www/html">, change <i>AllowOverride None</i> to <i>AllowOverride All</i>
123-
142+
124143
This directory needs to be made fully accessible to the application:
125-
144+
126145
chmod -R 777 /opt/tdt/core/app/storage/
127146

128147
Even with 777 permissions, SELinux will prevent the app from accessing that directory unless you explicitly provide that permission. Use the following command:
129-
148+
130149
chcon -Rv --type=httpd_sys_content_rw_t /opt/tdt/core/app/storage
131150

132151
Alternately, if you are on a non-production machine and you just want to turn SELinux off, do this:
133-
152+
134153
echo 0 > /selinux/enforce
135154

136155
Start the webserver
@@ -142,7 +161,8 @@ Finally, if you want to access this site from a browser on a different machine,
142161
* -A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
143162

144163
Then, restart the iptables firewall:
145-
164+
146165
/etc/init.d/iptables restart
147166

148167
The DataTank should now be installed and running at http://[Your.IP.Address]/tdt/. The admin console is located at http://[Your.IP.Address]/tdt/api/admin. The default username and password are both "admin."
168+

dev/css/style.scss

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -361,5 +361,4 @@ blockquote{
361361

362362
.nav .open>a, .nav .open>a:hover, .nav .open>a:focus {
363363
background: #1f4353 !important;
364-
}
365-
364+
}

0 commit comments

Comments
 (0)