Actions

Installation on XP with IIS: Difference between revisions

From LimeSurvey Manual

No edit summary
No edit summary
 
(13 intermediate revisions by 2 users not shown)
Line 1: Line 1:


I.
__TOC__


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.
* After completing this setup, you can login to an IIS-hosted website using your Windows username and password. Your windows account must have a password to be able to login!


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 58: Line 57:
  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 72: Line 71:
  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 97:
  b. In config.php, set $rootDir='C:\Inetpub\wwwroot\limesurvey';
  b. In config.php, set $rootDir='C:\Inetpub\wwwroot\limesurvey';


III.
=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
 
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 </span>> properties <span style="color:> advanced </span>> environment variables <span style="color:> under system variables, select path, and edit
 
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
 
  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
Download the latest stable version of PHP Windows Binaries from http://php.net/downloads.php and extract it to c:\php.


  f. nmake
==Configure PHP settings==
 
  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
 
5. 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


  b. Comment out the "doc_root =" line
  b. Comment out the "doc_root =" line, and set cgi.force_redirect = 0


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


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


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. Copy php5isapi.dll from the php source .zip to C:\php (the same .zip you got the php_mbstring.dll, php_mysql.dll, & php_openssl.dll files from)


4. Expand local computer and right-click on websites </span>> properties
4. Open Control Panel -> Administrative Tools -> IIS


5. Set ISAPI Filters, Home Directory, and Documents tabs">
5. Expand local computer and right-click on websites -> properties


  a. ISAPI Filters: click Add... <span style="color:> Filter Name = PHP && Executable = C">\php\php5isapi.dll
6. Set ISAPI Filters, Home Directory, and Documents tabs:


  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
  a. ISAPI Filters: click Add... -> Filter Name = PHP && Executable = C:\php\php5isapi.dll


  c. Documents: click Add... </span>> Default Document Name = index.php
  b. Home Directory: check Read, check Write, Execute Permissions = Scripts Only, click Configuration -> click Add -> Executable = C:\php\php5isapi.dll && Extension = .php


6. Apply to the correct websites
  c. Documents: click Add... -> Default Document Name = index.php


V.
7. Apply to the correct websites


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 197: Line 140:


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>

Latest revision as of 00:33, 16 July 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.
  • After completing this setup, you can login to an IIS-hosted website using your Windows username and password. Your windows account must have a password to be able to login!

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';

Install PHP

Download the latest stable version of PHP Windows Binaries from http://php.net/downloads.php and extract it to c:\php.

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, and set cgi.force_redirect = 0

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

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

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. Copy php5isapi.dll from the php source .zip to C:\php (the same .zip you got the php_mbstring.dll, php_mysql.dll, & php_openssl.dll files from)

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

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

6. 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

7. 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