Installation Guide - paulmoore/AstroCalendar GitHub Wiki

AstroCalendar Server Installation And Configuration Guide

Please note that the following instructions are for OS X Lion [1].

  1. Unzip astrocal_install.zip to your home directory. It should contain 4 folders:

    • ephemeris
    • ephe
    • php-sweph
    • api
  2. Installation of Swiss Ephemeris:

    • Change current directory to ephemeris
    • Run the following commands:
      make clean
      make libswe.a
    • Move libswe.a to /usr/lib/ [2]
    • Move sweodef.h and swephexp.h to /usr/include/ [3]
  3. Installation of Swiss Ephemeris data:

    • Move folder ephe to /users/ [4]
  4. Installation of php-sweph

    • Change current directory to php-sweph
    • Run the following commands:
      phpize
      ./configure –enable-sweph
      make
    • Move sweph.so to /usr/lib/php/extensions/no-debug-non-zts-yyyymmdd where yyyymmdd is the latest date in the folder extensions [5]
    • Add the following line to the end (or in the extensions section) of /etc/php.ini [6]
      extension=sweph.so
    • Restart the web server
      sudo apachectl restart [7]
    • Finally, calls to phpinfo() should report “sweph support: enabled” under Extensions
  5. Installation of the API:

    • Move the contents of the folder api to your web root [8]

Note: a web server must be installed and running with PHP Version 5.2.6 or greater.

[1]: Different operating systems and versions may require different directories or commands.
[2]: This is your system's library folder. Is often /usr/local/lib on some Unix-like (nix or UNX) systems.
[3]: This path can be changed in php-sweph/config.m4 on the line beginning with “SEARCH_PATH”
[4]: This data applies to the year range 1800 AD – 2400 AD. If more years are required they can be downloaded from ftp://ftp.astro.com/pub/swisseph/ephe/archive_zip/ and placed in /users/ephe/.
[5]: This path is to your system's PHP extensions. You can edit your system's php.ini file to set a different path to your PHP extensions.
[6]: This path can vary from system to system.
[7]: This command applies to Apache web servers.
[8]: The path to your web root can vary from system to system. On OS X Lion it is /Users/'youruser'/Sites/