Installing on Mac OS X Leopard
From ResourceSpace Documentation Wiki
The below instructions will work on earlier versions of OS X with some small alterations.
Contents |
Replace the default PHP build with a PHP build with GD support
First you need to replace the pre-installed PHP with an improved PHP that has GD support (taken from this page):
- Open Terminal App
- Write:
cd /private/etc
- Use your favorite text editor to open httpd.conf e.g.:
nano httpd.conf
- Find this "LoadModule php5_module libexec/apache2/libphp5.so" and add a "#" (no quotes) at the front of the line to comment out Leopard's default PHP5 library
- Ctrl+O, Ctrl+X to save and quit, then write:
cd /usr/local sudo curl -O http://www2.entropy.ch/download/php5-5.2.5-6-beta.tar.gz sudo tar -xzf php5-*-beta.tar.gz sudo ln -sf /usr/local/php5/entropy-php.conf /etc/apache2/other/+entropy-php.conf rm php5-5.2.5-6-beta.tar.gz sudo apachectl restart
Install MacPorts
Next install MacPorts, which requires Xcode so make sure you have installed Xcode from the OS X setup disks.
These instructions are taken from this page.
These instructions are for remote installation via the command line. If you have GUI access to the machine you can use the simple MacPorts installer.
- Download MacPorts
curl -O http://svn.macports.org/repository/macports/downloads/MacPorts-1.5.0/MacPorts-1.5.0-10.4.dmg
(Change URL to match the latest version)
- Mount disk image
hdiutil attach MacPorts-1.5.0-10.4.dmg
- Run the installer
sudo installer -verbose -pkg /Volumes/MacPorts-1.5.0/MacPorts-1.5.0.pkg -target /
- Add the appropriate paths by typing:
nano ~/.profile
- Add the line:
export PATH=/opt/local/bin:/opt/local/sbin:$PATH
- Do Ctrl+O, Ctrl+X to save and quit then log out and back in again (or open a new terminal window) so your profile changes take effect.
- Update MacPorts to the latest version
sudo port -v selfupdate
- Unmount the disk image
hdiutil detach -verbose /dev/disk4
Use MacPorts to add the remaining packages
sudo port install mysql5 ffmpeg ImageMagick p5-image-exiftool antiword xpdf subversion ghostscript ufraw
Configure php.ini
sudo cp /usr/local/php5/lib/php.ini-recommended /usr/local/php5/lib/php.ini sudo nano /usr/local/php5/lib/php.ini
- Find the value for 'memory_limit' and set this to a high value e.g.
memory_limit = 999M ; Maximum amount of memory a script may consume (128MB)
- Find the value for 'post_max_size' and set this to a high value e.g.
post_max_size = 999M
- Find the value for 'upload_max_filesize' and set a high value e.g.
upload_max_filesize = 999M
- Entropy's PHP by default expects to find the MySQL socket in a different location so this must be changed. Find the value for 'mysql.default_socket' and set it as follows:
mysql.default_socket = /var/mysql/mysql.sock
Install ResourceSpace from Subversion
cd /Library/WebServer/Documents [or alternative path to ResourceSpace install target] mkdir old mv * old/ svn co http://svn.montala.net/svn/resourcespace/ . mkdir filestore chmod 777 filestore chmod -R 777 include mysql -u root -e "create database resourcespace"
...then fire up a web browser and point it at the server to resume the setup.
Set up the cron job
cd ~ nano crontab
Add the line:
0 1 * * * wget -q -r http://localhost/pages/tools/cron_copy_hitcount.php
Ctrl+O, Ctrl+X to save and quit, then do:
crontab crontab
