Difference between revisions of "Installation"

From Whirlwind eCommerce Wiki
Jump to: navigation, search
Line 1: Line 1:
'''Currently building automated installation package'''  
+
'''Currently building automated installation package'''.
 +
 
 
Below is the manual process until the package is operational.
 
Below is the manual process until the package is operational.
  

Revision as of 21:15, 23 October 2008

Currently building automated installation package.

Below is the manual process until the package is operational.

File Upload

FTP The entire site file content to the target root of the web site

Web Server Setup

Windows IIS
  • Open 'computer management' (right click 'my computer' and select manage)
  • Expand Computer Management > Services and Applications > Internet Information Services > Web Sites
  • Right click 'Web Sites' and select 'New Web Site'. When the 'Web Site Creation Wizard' opens, click 'Next'.
  • Enter the site name (use a test subdomain if you do not want to interrupt a site currently using the domain i.e.: test.yourdomain.com instead of www.yourdomain.com). Next.
  • Set the IP address to that given by your Hosting ISP (ask you ISP if you do not know what that is), leave TCP port to 80 and set Host Header to the domain/subdomain you selected in the previous step. Next.
  • In the Path field browse to the folder you FTPd all the site files too, than hit OK. Leave allow anonymous access to this website on. Next.
  • Select Read and Run scripts. Next. Finish.
Linux Apache
  • Coming Soon

Setup DNS

Call your Hosting ISP for specific instructions on how to set up DNS for your web site. You can setup your local HOSTS file (located in c:\windows\system32\drivers\etc on a windows client) so that your web browser will resolve the domain to the web server until DNS is set and propigated. Follow instructions in the HOSTS file to add a line for your domain / web server IP address.

Database Setup

  • Backup the latest database version at the commend prompt in windows / shell in linux: (substitute m.d.y with current month.day.year; substitute "username" with the root user name):
mysqldump -u username -p iproductsbase > iproductsbase.m.d.y.sql
  • FTP the backup to the new server
  • Create the database on the new server in mysql (substitute "databasename" with the name you wish to call the database):
Create database databasename;
  • move the files into the database at the command prompt in windows / shell in linux (substitute "databasename" for the newly create database name; substitute 'username' for the root user; substitute "m.d.y" for the month.day.year in the iproductsbase backup file name):
mysql -u username -p databasename < iproductsbase.m.d.y.sql
  • Create a database user account with the appropriate access in mysql (substitute "newusername" with your website database username you wish; substitute "databasename" with the name of the database you created for the site; substitute "password" with your password of choice):
GRANT CREATE TEMPORARY TABLES, DELETE, INSERT, LOCK TABLES, SELECT, UPDATE ON databasename.* TO 'newusername'@'localhost' identified by 'password';
  • Point to the appropriate database in the appGlobals.php file (located in the root of the website). Change the following code (located at the beginning of the file) by filling in your "databasename", "username" and "password" for database access:
$iProducts['dbUser'] = "username";
$iProducts['dbPassword'] = "password";
$iProducts['dbDatabase'] = "databasename";


Scheduled Task Setup

All core scheduled tasks are executed by the following file located in the root of the website: /taskScheduler.php

For linux servers

Setup the below cron jobs:

* * * * * /usr/bin/lynx -source http://www.websitedomainname.com/taskScheduler.php
* 1 * * * root ntpdate 0.pool.ntp.org
  • The first cron job calls the task scheduler every minute. Change "www.websitedomainname" to match the domain name of your website.
  • The second cron job ensures the system clock is accurate.
  • Add the following 3rd cron job line if using EBO (TEM by Fiddlehead):
*/10 * * * * . /path/to/website/root/folder/ebo/xmlExporter.sh >> /dev/null 2>&1 # TEM XML Exporter

Replace "/path/to/website/root/folder/" with the path to the website root folder on your server


Directory Setup

Images and Files

Create a root folder for the images and files to be used by the image and file management libraries. They can be in root of the website (/images, /files), in a common directory (/library/images, /library/files) or even within each other (/files, /files/images). These folders will need to be entered into the site settings when later configuring the website via the administration console.

Clear and Set Parsed
  • Delete contents of /parsed (located in the root of the web site)
  • Set parsed for full access (linux > chmod 777 parsed)


MySQL Configuration

Open the config file
  • Look for my.ini in Windows (usually located in the C:\Program Files\MYSQL folder)
  • Look for my.conf in Linux (usually located in the /etc folder)
Perform the following to the config file
  • Add or uncomment the "sort_buffer_size" attribute, set value to 1024k:
sort_buffer_size=1024K
  • If commented, uncomment all innodb my.conf vars
  • set up mysql logging, test


PHP Configuration

Open the php.ini config file
  • Default location in Windows is C:\PHP
  • Default location in Linux is /etc
Perform the following to the config file
  • Set the session lifetime by adding or uncommenting the "session.cookie_lifetime" variable and setting to "2592000" (30 days):
session.cookie_lifetime=2592000
  • Add or uncomment GPC_magic_quotes and set to "off":
GPC_magic_quotes = OFF


FUSEBOX Configuration

Open the fusebox.xml.php config file located in the root of the web site
Perform the following the the config file
  • Set fusebox mode to "production" (scripts are stored in memory for optimal performance, set back to "development" when modifying web site scripts):
<parameter name="mode" value="production" />


Mail Order Manager Integration

If integrating with MOM (Mail Order Manager), a scheduled task needs to be setup on the windows server that is hosting MOM. Change the "URL" attribute to use the domain name of your web site:

Dim fileName
Dim URL
URL = "http://www.yourwebsitedomain.com/index.php?fa=ORDER.orderExportMOM_5_4&dBug=0"
fileName = "c:\MOMIMPORT." & DatePart("yyyy",Now) & "_" & DatePart("m",Now) & "_" & DatePart("d",Now) & "_" & DatePart("h",Now) & "_" & DatePart("n",Now) & "_" & DatePart("s",Now) & ".txt"
' get web page data
Set WinHttpReq = CreateObject("WinHttp.WinHttpRequest.5.1")
WinHttpReq.Open "GET",URL,False
WinHttpReq.Send
' save to file
Set fso = CreateObject("Scripting.FileSystemObject")
set f = fso.OpenTextFile(fileName,2,True)
f.Write WinHttpReq.ResponseText


Table Fixes for Linux

On linux run the following to fix the case of the table names. This is necessary because Windows likes to make the table names lower case, but all tables are referenced in scripts upper case letters to delineate words - since Linux is case sensitive, they need to be case correct to work:

alter table customfields rename customFields;
alter table customfieldvalues rename customFieldValues;
alter table page_forumpostagree rename page_forumPostAgree;
alter table page_forumposts rename page_forumPosts;
alter table page_pollanswers rename page_pollAnswers;
alter table page_pollquestions rename page_pollQuestions;
alter table page_searchgroup_languages rename page_searchGroup_languages;
alter table page_searchgroups rename page_searchGroups;
alter table page_searchoption_languages rename page_searchOption_languages;
alter table page_searchoptions rename page_searchOptions;
alter table page_send2friend rename page_send2Friend;
alter table pendingapproval rename pendingApproval;
alter table prod_optiongroups rename prod_optionGroups;
alter table prod_optiongroup_link rename prod_optionGroup_link;
alter table stat_pageviews rename stat_pageViews;
alter table user_groupaccess rename user_groupAccess;
alter table user_loginsessions rename user_loginSessions;
alter table user_usersingroups rename user_usersINgroups;
alter table user_wishlist rename user_wishList;
alter table lk_zipcodes rename lk_zipCodes;
alter table lk_fedexzipstozones rename lk_fedexZipsToZones;