Hunter Ford Hunter Ford

Setting Up Apache-PHP-Python-MySQL on Mac OS X

  1. Download and install MySQL Package file [MySQL 5.1 for 10.5 (x86_64)]
  2. Install MySQL Startup Item [Howto]
  3. Turn on Web Sharing in System Preferences -> Sharing
    Screen shot 2009-11-29 at 5.19.43 PM
  4. Copy /etc/php.ini.default to /etc/php.ini
    sudo cp /etc/php.ini.default /etc/php.ini
    
  5. Add timezone information to php.ini (PHP will error without this)
    date.timezone = 'America/New_York'
  6. Install php-mcrypt
    1. Download libmcrypt 2.5.8
    2. Build and install .
      ./configure --disable-posix-threads --enable-dynamic-loading
      make
      sudo make install
      
    3. Download PHP 5.3.1
    4. Navigate to php-5.3.1/ext/mcrypt/
    5. Build and install .
      phpize
      ./configure
      make
      sudo make install
      
    6. Add extension to php.ini
      extension=mcrypt.so
      
  7. Install APC
    1. Download PCRE 8.0
    2. Build and install .
      ./configure
      make
      sudo make install
      
    3. Download APC 3.1.3p1
    4. Navigate to APC-3.1.3p1/APC-3.1.3p1/
    5. Build and install .
      phpize
      ./configure
      make
      sudo make install
      
    6. Add extension to php.ini
      extension=apc.so
      
  8. Download and install MySQL-python 1.2.3c1
    sudo python setup.py install
    
  9. Download and install libjpeg.v7
    ./configure --enable-shared
    make
    sudo make install
    
  10. Download and install Python Imaging Library 1.1.6
    sudo python setup.py install
    

Comments

  • Danny

    Thanks a lot for posting this! Installation went smoothly with all up-to-date software versions. Cheers.
  • Thomas Bosboom

    Thanks, very helpfull!
  • andy mac

    Thanks for your article that's work on me
  • . !
  • , .