We are going to cover the deployment of an OpenCart (open source shopping cart) on a Windows 2003 Server, 2008 Server.
We are assuming that the server is setup to run IIS websites, and that you have some general idea about running websites in general on IIS. If this is not the case and you are learning from scratch. Better to learn on Linux server.
Assuming you want to get OpenCart running on IIS.
Step 1 – Web Platform Installer
Install the Microsoft Web Platform Installer on the server from this link.
In Windows 2003 you need to:
Go to the directory on your server: C:\php
Find the file: php.ini
Edit the file in a text browser, finding the following lines:
And remove the ; before each line:
Then save the file.
Start a Command Prompt “cmd” and type “iisreset”
This enabled MySQL, GD, and cURL,
Step 2 – Setup PHP on the server.
Start the Web Platform Installer and search PHP in the top right of the search window.
Select and install the latest version of PHP from the list.
Step 3 – Install MySQL on the server.
Also from the Web Platform Installer, search “MySQL” and install that.
During the install, you will be asked for a password for the –root- user. This is the Administrator account and the password should be very well guarded and complex.
Step 4 – Create a Database in MySQL.
Open the My SQL Command Line Tool and enter the –root- password selected above.
Modify the following script to replace the database name, user name and password.
create database mydb;
CREATE USER ‘myuser’@’localhost’ IDENTIFIED BY ‘mypassword‘;
CREATE USER ‘myuser‘@’%’ IDENTIFIED BY ‘mypassword’;
GRANT ALL PRIVILEGES ON mydb.* TO ‘myuser‘@’localhost’;
GRANT ALL PRIVILEGES ON mydb.* TO ‘myuser‘@’%’;
Enter your own values where highlighted above.
Copy and paste that line by line into the MySQL Command Line Window. You only need to run one from the first two, then one from the second two.
If you need to change a password.
SET PASSWORD FOR
SET PASSWORD FOR
Step 5 – Download and unzip to Web Located Folder the contents of OpenCart
Download here: http://www.opencart.com/index.php?route=download/download
The contents of the download package is in a folder called “upload”
Extracted in our case to a folder we called: opencart.interactivewebs.com
Step 6 – Create an IIS instance to hit that directory.
Using the IIS skills that we suggested you should have. Create a new site that hits the directory you dropped the Upload contents to above.
For Windows make sure the following folders and files permissions allow Read and Write.
Step 7 – Set the permissions for IIS.
From the Exploring, Right click the folder with the web files in it, and select Security Tab. Modify the permissions for:
IUSR – Modify (you will probably need to add this)
IIS_IUSRS(<servername>\IIS_IUSRS) – modify
Step 8 – Visit the home page.
Visit the store homepage
e.g. http://www.example.com or http://www.example.com/store/
Accept the license
Check the permissions you need.
Fill in the following details with the relevant information.
Using the MYSQL database settings you created above.
As per the instruction above, you need to delete the Instillation directory.
Step 9 – Deleted this directory.
Restart IIS from the command prompt again. “iisreset”
Common problem if permissions are not set correctly.