-
Notifications
You must be signed in to change notification settings - Fork 4
Installing TidePools on Ubuntu
Document version 2013-01-10
** To Do: Add a "Troubleshooting" section **
As of this writing, the current versions of supporting software that will be installed are:
- Ubuntu 12.10 Quantal
- Apache 2.2.22
- PHP 5.4.6-1ubuntu1.1
- PHP driver for MongoDB: 1.3.2
- MongoDB 2.2.2
You can check your versions using the following methods:
Ubuntu: lsb_release -a
Apache: sudo apachectl -v
PHP and its MongoDB driver: Create phpinfo.php and view it in your browser, as described below
MongoDB: mongo --version
Path information
PHP configuration file: /etc/php5/apache2/php.ini
Path to add mongo.so extension _____________
PHP error log: /var/log/apache2/error.log
Path to, and name of, mongo error log _____________
This howto assumes a fresh install of Ubuntu.
Reference: How to install Ubuntu
You'll need Apache, PHP, MongoDB, and the PHP driver for MongoDB (aka MongoDB PECL extension).
Click the menu button (the one on top with the Ubuntu logo)
In the box, type term
and you should see 'Terminal' appear. Click it to open. The lines below in code format
indicate things you need to type in at the command line.
sudo apt-get update
sudo apt-get install apache2 php5 php5-dev php-pear
You'll be asked, "do you want to continue (Y/n)?" Hit Enter.
Now we're going to configure your system to get the latest stable version of MongoDB.
Reference: How to install MongoDB
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10
gksu gedit /etc/apt/sources.list.d/10gen.list
The gedit text editor will open. Enter the following line:
deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen
Save and quit.
sudo apt-get update
sudo apt-get install mongodb-10gen
Now we install PHP's extension for Mongo.
Reference: Install the PHP driver for MongoDB
sudo pecl install mongo
gksu gedit /etc/php5/apache2/php.ini
Click Search > Find and type dynamic extension dir
Two lines below that, there is a blank line. Click on that blank line, type extension=mongo.so
and hit Enter to make another blank line.
Save and quit.
sudo apachectl restart
gksu gedit /var/www/phpinfo.php
Enter the following 3 lines:
<?php
phpinfo();
?>
Save and quit.
mongo
You should now see some information about your MongoDB installation and a prompt '>' This indicates that MongoDB is working.
exit
Open Firefox, go to the address bar, and enter localhost/phpinfo.php
You should see a page with blue boxes full of information about your PHP configuration. This indicates that Apache and PHP are working.
Hit CTRL-F on your keyboard. A 'Find' box should appear at the bottom of the window.
Type mongo
in the box. The window should scroll to a heading 'mongo' with information about your MongoDB installation. This indicates that the PHP driver for MongoDB is working, meaning that PHP is now communicating properly with MongoDB.
You are now ready to set up TidePools.
Go to the TidePools GitHub repository at https://github.com/opentechinstitute/TidePools
On the left, toward the top, click the button labeled 'ZIP' to download the TidePools files as a .zip file
Select 'Save file' and click OK
When it's done downloading, go back to the Terminal. (Note that the tilde '~' shown below is on the upper left, just below the Esc key, on a standard US English keyboard layout.)
cd ~/Downloads
sudo unzip TidePools-master.zip
You'll see a list of the files being unzipped.
sudo mv TidePools-master/ /var/www
Go back to Firefox and enter localhost
in the address bar. If you see the main TidePools screen, you have successfully completed this installation.