Skip to content

Installing Tidepools on CentOS 6

coreyreichle edited this page Jan 12, 2015 · 1 revision

Prerequisites: CentOS Netinstall ISO image, or a bare-bones CentOS server installation

Prepare:
1 Install CentOS 6.6, or obtain a clean CentOS system

2 Update the system:
sudo yum update sudo yum -y upgrade

3 Install Apache and PHP
sudo yum -y install apache2 php5 php5-dev php-pear

4 Add the following to /etc/yum.repos.d/mongodb.repo
[mongodb]
name=MongoDB Repository
baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64/
gpgcheck=0
enabled=1

5 Then type:
sudo yum -y install mongo-10gen mongo-10gen-server

6 Ensure Mongodb starts at boot time, and boot it up: sudo service mongod start; sudo service mongod status; sudo chkconfig mongod on

7 Install the PHP Mongo Module: cd
mkdir mongo-php-driver
cd mongo-php-driver
curl https://codeload.github.com/mongodb/mongo-php-driver/zip/master > mongo-php-driver-master.zip
unzip mongo-php-driver-master.zip
cd mongo-php-driver-master
wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
rpm -Uvh remi-release-6.rpm
yum --enablerepo=remi install php-devel
phpize
./configure
make all
sudo make install

8 Create the MongoDB php.ini: sudo vi /etc/php.d/mongo.ini

9 Add the following to it: ; Enable mongo extension
extension=mongo.so

10 Create a file in /var/www/html called phpinfo.php sudo vi /var/www/html/phpinfo.php

11 Insert the following into it:
<?php
phpinfo();
?>

13 Restart the apache service to load all the new modules: sudo service httpd restart

12 In a browser, point it at the webserver: http://{hostname here}/phpinfo.php

13 Verify you see the section for Mongo is there. If not, double check the ini file. If all you see is the code you entered in step 11, PHP is not working.

Clone this wiki locally