Windows (Apache) Installation Instructions for Development
Wiki Purpose: To guide developers through the Zurmo bare installation process for development purposes.
Who should read this Wiki: A Developer who is a registered member of the Zurmo development program..
Please note this is not an installation guide for setting up a production server..
- Install Xampp
- Download and run the following installer.
http://www.apachefriends.org/download.php?xampp-win32-1.7.4-VC6-installer.exe - Follow Xampp installation instructions and install to C:\xampp (default)
.
- Download and run the following installer.
- php.ini configuration changes(C:\xampp\php\php.ini)
- Uncomment the line ;extension=php_curl.dll
- Uncomment the line ;extension=php_soap.dll
- Uncomment the line ;extension=php_pdo_mysql.dll
- Add the line extension=php_apc.dll
download from http://downloads.php.net/pierre/ and save in \php\ext\ - Change date.timezone = America/Chicago
- Change memory_limit = 250m
- Change max_execution_time = 300
- Change post_max_size = 20M
- Restart apache for the php.ini changes to take effect
.
- my.ini configuration(C:\xampp\mysql\bin)
- Add next lines under [mysqld] section:
- character-set-server=utf8
- collation-server=utf8_unicode_ci
- default-storage-engine=INNODB
- max_sp_recursion_depth=100
- max_allowed_packet = 20M
- thread_stack = 512K
- optimizer-search-depth = 0
- log_bin = 0 (this is default settings, and in most cases you will not need to modify it)
- Restart mysql for the my.ini changes to take effect
.
- Install putty, and all other binaries like pageand.exe, plink.exe. Using putty is an optional step and only required if you use a cmd line svn, if using a gui based svn this step can be optional.
- There is a package that contains the required files: http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
- Start PuttyGen (from Start/Applications/Putty menu)
- Generate ssh2-rsa key
- When key is generated, add your email address to Key Comment field
*note this is the email address that you used for bitbucket account, this is an important step, because it will allow us to communicate with bitbucket server without having to log in - Save public key as id_rsa.pub
- Login to bitbucket, go to Account, copy and paste the key, into list of your keys
- Save private key as id_rsa.ppk, under C:\Documents and Settings\YOUR_USERNAME\ssh
*note – you will need to create the ssh directory
.
- TortoiseHg
- Download and install TortoiseHg http://tortoisehg.bitbucket.org/
- Create file C:\Documents and Settings\YOUR_USERNAME\mercural.ini, and add following code: [ui] username = username email@example.com ssh=”C:\Program Files\PuTTY\plink.exe” -ssh -i
“C:\Documents and Settings\YOUR_USERNAME\ssh\id_rsa.ppk”
.
- Clone Zurmo from Repository
- Go to htdocs
- Create Zurmo folder
- Right click and go TortoiseHG -> Clone
- Set destination as: C:\xampp\htdocs\zurmo
- Set source as https://<your bitbucket username>@bitbucket.org/zurmo/zurmo
- Click on clone and enter your password when requested
.
- PhpUnit PhpUnit is based on PEAR package, so it is important to update PEAR package first. Assuming xampp is installed to C:\xampp- Open a command prompt and go to C:\xampp\php
- Type “pear upgrade pear”
- Type “pear update-channels” (updates channel definitions)
- Type “pear upgrade” (upgrades all existing packages and pear)
- Type “pear channel-discover components.ez.no” (this is needed for PHPUnit)
- Type “pear channel-discover pear.symfony-project.com” (also needed by PHPUnit)
- Type “pear channel-discover pear.phpunit.de” (This IS phpunit)
- Type “pear install
--alldepsphpunit/PHPUnit” (installs PHPUnit and all dependencies) - Type “pear upgrade phpunit/PHPUnit” (upgrade phpunit to recent version)
- Restart your computer!
.
- Install Selenium http://seleniumhq.org/download/
- Download and copy the .jar file to a folder of your choice commonly C:\selenium
- Create a batch file to run the server and add file to start up
- To run server use java –jar selenium-server-standalone-2.5.0.jar
*note: requires Java to be installed (obviously)
.
- Install Memcache
- Use this link for installation files and setup instructions
.
- Use this link for installation files and setup instructions
- Windows PATH additions Make sure the following paths are added to the windows path information.
- C:\xampp\php\
- C:\xampp\php\PEAR\
- C:\xampp\mysql\bin\
.
- Create MySql Database and User
- Create a Database called zurmo
- Create user zurmo (a password is required, remember this password as it will be required during install)
- Grant user zurmo all privileges on zurmo database (important! That this user can create/drop databases)
- Create database called zurmo_test
- Create user zurmo_test set password to zurmo_test
- Grant user zurmo_test all privileges on zurmo_test database (important! That this user can create/drop databases)
- Create database called zurmo_temp
- Create user zurmo_temp set password to zurmo_temp
- Grant user zurmo_temp all privileges on zurmo_temp database (important! That this user can create/drop databases)
.
- Run unit test
- Go to C:\xampp\htdocs\zurmo\app\protected\tests\unit from the command line
- Run phpunit –verbose TestSuite.php All (remember two dashes before the verbose)
- Run phpunit –verbose TestSuite.php All –no-freeze (remember two dashes before the verbose & no-freeze)
- Run functional tests
.
- You are ready to go to http://localhost/zurmo/app and install the application
- The install will check the environment setup and report on the results, fix any errors and rerun
- Add the database information
- The installation will create all tables and test data
- Open link to zurmo application
.
Additional Notes
- Eclipse Tweaks
- If you are using eclipse as your IDE, then install AnyEdit http://andrei.gmxhome.de/anyedit/
which auto-strips trailing spaces on save - For the default text editor:
- General > Editors > Text Editors > Insert spaces for tabs (check it) .
- If you are using eclipse as your IDE, then install AnyEdit http://andrei.gmxhome.de/anyedit/
- For PHP:
- PHP > Code Style > Formatter > Tab policy (choose “spaces”)
- PHP > Code Style > Formatter > Indentation size (set to 4)
- Eclipse > Preferences > General > Editors>
- Text Editors > Show Print Margin set to 120
- Tweak line delimiters to make sure they are linux http://www.freshblurbs.com/line-delimiters-eclipse Select ‘other’ UNIX