I found and read several entries, in particular Bill Tillman's struggle with TT on FreeBSD.
So I figured I would document my installation and post it here.
First off, I have an existing FreeBSD 7.0 server, running the following:
apache-2.2.9
mysql-server-5.1.26
php5-5.2.6_1
phpMyAdmin-2.11.8.1
Those are the latest versions as of this week - I keep up on my patches and updates regularly.
Getting those basic things installed & running is beyond the scope of this post - these forums are about TimeTrex, and this post is specifically about getting TimeTrex running in my environment.
So, I read the forums a bit, and found I needed a few extensions to PHP. I checked them like this:
#pkg_version -v | grep extension-name
I found that I did not have these installed:
php-soap
pear
php-bcmath
FreeBSD has a wonderful thing called the Ports Collection.
Pretty much any software you want to use can be found in and installed from Ports.
Read more about it here: http://www.freebsd.org/doc/en_US.ISO885 ... using.html
While you're there, check out the Handbook in general. I find that FreeBSD is many times more documented, logical, and structured than any Linux distribution I've ever had my hands on. In my not-so-humble opinion, FreeBSD is superior to Linux in every way.
So, to find out where those three things I need are located in the ports tree, I simply went here and searched for them:
http://www.freebsd.org/ports
Soap is in /usr/ports/net/php5-soap, so that's where I go on my box to install it:
Code: Select all
cd /usr/ports/net/php5-soap
make install clean distclean
...lots of output...
...done!...
#/usr/etc/rc.d/apache22 stop
#/usr/etc/rc.d/apache22 start
On to the next one, again searching on http://www.freebsd.org/ports.
OK, Pear is in /usr/ports/devel/pear - here we go:
Code: Select all
cd /usr/ports/devel/pear
make install clean distclean
...lots of output...
...done!...
#/usr/etc/rc.d/apache22 stop
#/usr/etc.rc.d/apache22 start
Code: Select all
cd /usr/ports/match/php5-bcmath
make install clean distclean
...lots of output...
...done!...
#/usr/etc/rc.d/apache22 stop
#/usr/etc.rc.d/apache22 start
make install clean distclean means "install the software, clean up the work area, and clean up the downloads when you're done (distribution files)"
So now that I've got all that squared away, I'll go check my phptest.php file to see if those extensions are present...
http://mywebserver/phptest.php
The phptest.php file has some very simple code in it, that when run in a browser will dump all kinds of cool details about your PHP environment. Here's the code:
Code: Select all
<?php
phpinfo();
?>
OK I'll verify a bit further, and run the pkg_version command to see that those three packages are indeed installed, and what versions:
Code: Select all
#pkg_version -v | grep soap
php5-soap-5.2.6_1 = up-to-date with port
#pkg_version -v | grep pear
pear-1.7.2 = up-to-date with port
#pkg_version -v | grep math
php5-bcmath-5.2.6_1 = up-to-date with port
Alright, now I guess I'm ready to drop in the TimeTrex code and get it going.
Since I've done a few of these php-front with a MySQL-back things before, I'll just pop into phpMyAdmin and create a database for TimeTrex: http://mywebserver/phpMyAdmin
Once logged in, I goto Privileges>Add A new User. Fill in the user details: username, localhost, password twice - then I am sure to select the radio button Under Database For User entitled Create Database with same name and grant all privileges.
Done! I've got all the prequisites installed and verified, and I've got an empty database waiting and ready to go.
Now I just drop the TimeTrex code into my webserver's root directory, and edit the timetrex.ini.php file as decribed from Step 4 onward in the README.txt file.
That covers it for getting the environment ready. I'll post again for how I setup a virtual host in Apache specifically for TimeTrex.
-Kris