Actions

Installation on XP with IIS: Difference between revisions

From LimeSurvey Manual

No edit summary
No edit summary
Line 1: Line 1:


I.
=Install Overview=
 
Install Overview
* This guide is written for the web server novice. It is not meant as a definitive, perfect-10 install guide; this is just a recommended installation from me to you.
* This guide is written for the web server novice. It is not meant as a definitive, perfect-10 install guide; this is just a recommended installation from me to you.
* This guide will get a running LS configuration on Windows XP using Microsoft's Internet Information System web server (IIS), PHP5, and MySQL.
* This guide will get a running LS configuration on Windows XP using Microsoft's Internet Information System web server (IIS), PHP5, and MySQL.


II.
=Install MySQL=
 
Install MySQL


1. Download "MySQL Community Server" and "MySQL Workbench (GUI Tool)" from http://www.mysql.com/downloads/
1. Download "MySQL Community Server" and "MySQL Workbench (GUI Tool)" from http://www.mysql.com/downloads/
Line 14: Line 10:
2. Run the Community Server install and make sure to select the below options
2. Run the Community Server install and make sure to select the below options


  a. (! = you may miss this, so make sure not to)
  a. ( = you may miss this, so make sure not to)


  b. Choose Custom Install
  b. Choose Custom Install


  c. ! Select to install all features and sub-features
  c. Select to install all features and sub-features


  d. ! Change install path to C:\mysql
  d. Change install path to C:\mysql


  e. Choose to configure server now. No need to register
  e. Choose to configure server now. No need to register
Line 36: Line 32:
  k. Enable TCP/IP
  k. Enable TCP/IP


  l. ! Check to add firewall exception
  l. Check to add firewall exception


  m. Enable strict mode
  m. Enable strict mode
Line 44: Line 40:
  o. Install as win service
  o. Install as win service


  p. ! Include bin directory in windows path
  p. Include bin directory in windows path


  q. Set password to password
  q. Set password to password
Line 58: Line 54:
  c. mysql -u root -p
  c. mysql -u root -p


  d. *Enter mysql root user's password (should be password)
  d. Enter mysql root user's password (should be password)


  e. CREATE DATABASE limesurvey;
  e. CREATE DATABASE limesurvey;
Line 66: Line 62:
  g. Exit the command prompt
  g. Exit the command prompt


4. Setup MySQL Workbench (GUI Tool)
4 .Setup MySQL Workbench (GUI Tool)


  a. Start MySQL GUI Admin
  a. Start MySQL GUI Admin
Line 72: Line 68:
  b. Login as root user to localhost
  b. Login as root user to localhost


  c. Go to Tools <span style="color:> Manage Connections
  c. Go to Tools -> Manage Connections


  d. Under General Options, check Store Passwords
  d. Under General Options, check Store Passwords


  e. Under Connections, make a new connection">
  e. Under Connections, make a new connection:


     i.   Connection = lsu-connection
     i.   Connection = lsu-connection
Line 98: Line 94:
  b. In config.php, set $rootDir='C:\Inetpub\wwwroot\limesurvey';
  b. In config.php, set $rootDir='C:\Inetpub\wwwroot\limesurvey';


III.
=Compile and Install PHP=
 
Compile and Install PHP


1. PHP seems to have updated their compile instructions; I am using the old instructions in this guide. You can find a backup here: http://backupurl.com/wslmiy
1. PHP seems to have updated their compile instructions; I am using the old instructions in this guide. You can find a backup here: http://backupurl.com/wslmiy
Line 130: Line 124:
  c. Copy libmysql.lib from C:\mysql\lib\opt to C:\php\win32build\lib
  c. Copy libmysql.lib from C:\mysql\lib\opt to C:\php\win32build\lib


  d. Make sure that C:\php\win32build\bin is in the system path (right-click my computer </span>> properties <span style="color:> advanced </span>> environment variables <span style="color:> under system variables, select path, and edit
  d. Make sure that C:\php\win32build\bin is in the system path (right-click my computer -> properties -> advanced -> environment variables -> under system variables, select path, and edit


4. Compile and Install PHP
4. Compile and Install PHP


  a. Open All Programs </span>> Microsoft Visual C++ 2008 Express Edition <span style="color:> Visual Studio Tools </span>> Visual Studio 2008 Command Prompt
  a. Open All Programs -> Microsoft Visual C++ 2008 Express Edition -> Visual Studio Tools -> Visual Studio 2008 Command Prompt


  b. Enter the following commands
  b. Enter the following commands


  c. cd C">\PHP\src
  c. cd C:\PHP\src


  d. buildconf
  d. buildconf


  e. configure <strike>enable-mbstring </strike>with-mysql=C:\mysql <strike>with-gd </strike>with-openssl
  e. configure <nowiki><strike>enable-mbstring </strike>with-mysql=C:\mysql <strike>with-gd </strike>with-openssl</nowiki>


  f. nmake
  f. nmake
Line 150: Line 144:
  h. php -v
  h. php -v


  i. *If it complains about not finding modules for the configured extensions, don't worry- it's not a compile issue
  i. If it complains about not finding modules for the configured extensions, don't worry- it's not a compile issue


  j. Copy the contents of c:\php\src\release_ts to c:\php
  j. Copy the contents of c:\php\src\release_ts to c:\php
Line 158: Line 152:
  l. Copy libeay32.dll from C:\php\win32build\bin to C:\php
  l. Copy libeay32.dll from C:\php\win32build\bin to C:\php


5. Configure PHP settings
4. Configure PHP settings


  a. Edit php.ini (it should be something like C:\php\php.ini-distribution). Rename it to php.ini and move it to C:\windows
  a. Edit php.ini (it should be something like C:\php\php.ini-distribution). Rename it to php.ini and move it to C:\windows
Line 166: Line 160:
  c. Enable your extensions (php_mbstring, php_mysql, php_openssl)
  c. Enable your extensions (php_mbstring, php_mysql, php_openssl)


IV.
=Install and Configure IIS=
 
Install and Configure IIS


1. Control Panel <span style="color:> Add or Remove Programs </span>> Add/Remove Windows Components <span style="color:> check IIS
1. Control Panel -> Add or Remove Programs -> Add/Remove Windows Components -> check IIS


2. Complete the install with the Windows XP Install Disk via i386 folder
2. Complete the install with the Windows XP Install Disk via i386 folder


3. Open Control Panel </span>> Administrative Tools <span style="color:-> IIS
3. Open Control Panel -> Administrative Tools -> IIS


4. Expand local computer and right-click on websites </span>> properties
4. Expand local computer and right-click on websites -> properties


5. Set ISAPI Filters, Home Directory, and Documents tabs">
5. Set ISAPI Filters, Home Directory, and Documents tabs:


  a. ISAPI Filters: click Add... <span style="color:> Filter Name = PHP && Executable = C">\php\php5isapi.dll
  a. ISAPI Filters: click Add... -> Filter Name = PHP && Executable = C:\php\php5isapi.dll


  b. Home Directory: check Read, check Write, Execute Permissions = Scripts Only, click Configuration </span>> click Add <span style="color:> Executable = C">\php\php5isapi.dll && Extension = .php
  b. Home Directory: check Read, check Write, Execute Permissions = Scripts Only, click Configuration -> click Add -> Executable = C:\php\php5isapi.dll && Extension = .php


  c. Documents: click Add... </span>> Default Document Name = index.php
  c. Documents: click Add... -> Default Document Name = index.php


6. Apply to the correct websites
6. Apply to the correct websites


V.
=Set XP Security Permissions=
 
Set XP Security Permissions


1. Turn-off windows simple file sharing (google this if you don't know how)
1. Turn-off windows simple file sharing (google this if you don't know how)
Line 196: Line 186:
2. Right click C:\inetpub\wwwroot\limesurvey and select properties
2. Right click C:\inetpub\wwwroot\limesurvey and select properties


3. Under the security tab, select internet guest account, and check read and check write. Apply
3.Under the security tab, select internet guest account, and check read and check write. Apply
*When tweaking your settings, it may be necessary to restart the web service. Just open a command prompt and type iisreset
 
<div class="simplebox">When tweaking your settings, it may be necessary to restart the web service. Just open a command prompt and type ''iisreset''</div>

Revision as of 10:56, 3 May 2010

Install Overview

  • This guide is written for the web server novice. It is not meant as a definitive, perfect-10 install guide; this is just a recommended installation from me to you.
  • This guide will get a running LS configuration on Windows XP using Microsoft's Internet Information System web server (IIS), PHP5, and MySQL.

Install MySQL

1. Download "MySQL Community Server" and "MySQL Workbench (GUI Tool)" from http://www.mysql.com/downloads/

2. Run the Community Server install and make sure to select the below options

  a. ( = you may miss this, so make sure not to)

  b. Choose Custom Install

  c. Select to install all features and sub-features

  d. Change install path to C:\mysql

  e. Choose to configure server now. No need to register

  f. Choose detailed configuration

  g. Choose Dedicated MySQL Server Machine (3rd option)

  h. Choose Multifunctional Database

  i. Default install path

  j. Decision Support (DSS)/OLAP

  k. Enable TCP/IP

  l. Check to add firewall exception

  m. Enable strict mode

  n. Standard character set

  o. Install as win service

  p. Include bin directory in windows path

  q. Set password to password

  r. Execute the install

3. Setup the LS schema (database)

  a. Open a command prompt and type the following commands

  b. cd C:\mysql\bin

  c. mysql -u root -p

  d. Enter mysql root user's password (should be password)

  e. CREATE DATABASE limesurvey;

  f. GRANT ALL PRIVILEGES ON limesurvey.* TO 'limesurveyuser'@'%' IDENTIFIED BY 'limesurvey';

  g. Exit the command prompt

4 .Setup MySQL Workbench (GUI Tool)

  a. Start MySQL GUI Admin

  b. Login as root user to localhost

  c. Go to Tools -> Manage Connections

  d. Under General Options, check Store Passwords

  e. Under Connections, make a new connection:

     i.   Connection = lsu-connection

     ii.  Username = limesurveyuser

     iii. Password = password

     iv.  Hostname = localhost

     v.   Use the default port

     vi.  Schema = limesurvey

  f. Exit MySQL GUI Admin

5. Edit LS database settings

  a. Edit C:\inetpub\wwwroot\limesurvey\config.php to match the correct usernames and passwords

  b. In config.php, set $rootDir='C:\Inetpub\wwwroot\limesurvey';

Compile and Install PHP

1. PHP seems to have updated their compile instructions; I am using the old instructions in this guide. You can find a backup here: http://backupurl.com/wslmiy

2. Follow the above guide up to the "Compiling" section, making sure to include the below libraries:

  a. freetype

  b. ICU

  c. libiconv

  d. libjpeg

  e. libpng

  f. libxml

  g. openssl

  h. zlib

3. Add MySQL for compiling php

  a. Copy all files from the bin, include, & lib folders in C:\mysql to the respective folders in C:\php\win32build

  b. If you do not see the above folders then you forgot to "Select to install all features and sub-features" when installing mysql

  c. Copy libmysql.lib from C:\mysql\lib\opt to C:\php\win32build\lib

  d. Make sure that C:\php\win32build\bin is in the system path (right-click my computer -> properties -> advanced -> environment variables -> under system variables, select path, and edit

4. Compile and Install PHP

  a. Open All Programs -> Microsoft Visual C++ 2008 Express Edition -> Visual Studio Tools -> Visual Studio 2008 Command Prompt

  b. Enter the following commands

  c. cd C:\PHP\src

  d. buildconf

  e. configure <strike>enable-mbstring </strike>with-mysql=C:\mysql <strike>with-gd </strike>with-openssl

  f. nmake

  g. cd C:\PHP\src\Release_TS

  h. php -v

  i. If it complains about not finding modules for the configured extensions, don't worry- it's not a compile issue

  j. Copy the contents of c:\php\src\release_ts to c:\php

  k. From the php source .zip: copy php_mbstring.dll, php_mysql.dll, & php_openssl.dll to C:\php\ext

  l. Copy libeay32.dll from C:\php\win32build\bin to C:\php

4. Configure PHP settings

  a. Edit php.ini (it should be something like C:\php\php.ini-distribution). Rename it to php.ini and move it to C:\windows

  b. Comment out the "doc_root =" line

  c. Enable your extensions (php_mbstring, php_mysql, php_openssl)

Install and Configure IIS

1. Control Panel -> Add or Remove Programs -> Add/Remove Windows Components -> check IIS

2. Complete the install with the Windows XP Install Disk via i386 folder

3. Open Control Panel -> Administrative Tools -> IIS

4. Expand local computer and right-click on websites -> properties

5. Set ISAPI Filters, Home Directory, and Documents tabs:

  a. ISAPI Filters: click Add... -> Filter Name = PHP && Executable = C:\php\php5isapi.dll

  b. Home Directory: check Read, check Write, Execute Permissions = Scripts Only, click Configuration -> click Add -> Executable = C:\php\php5isapi.dll && Extension = .php

  c. Documents: click Add... -> Default Document Name = index.php

6. Apply to the correct websites

Set XP Security Permissions

1. Turn-off windows simple file sharing (google this if you don't know how)

2. Right click C:\inetpub\wwwroot\limesurvey and select properties

3.Under the security tab, select internet guest account, and check read and check write. Apply

When tweaking your settings, it may be necessary to restart the web service. Just open a command prompt and type iisreset