Initial Installation: Difference between revisions

From Vision
No edit summary
No edit summary
Line 66: Line 66:
* If necessary, ensure that the pages expire immediately, to force reload. This should happen automatically with server-derived pages, but may be required for some systems. Note: Enabling this results in much larger bandwidth requirements, as every page (and item on the page) is resent to the browser at all times. Either leave this disabled or enable it at the web-site level, then enable content expiration of 1 day on the folders Files, Releases, Charts and jQuery. This will ensure that the bulk of the traffic is only resent per day.
* If necessary, ensure that the pages expire immediately, to force reload. This should happen automatically with server-derived pages, but may be required for some systems. Note: Enabling this results in much larger bandwidth requirements, as every page (and item on the page) is resent to the browser at all times. Either leave this disabled or enable it at the web-site level, then enable content expiration of 1 day on the folders Files, Releases, Charts and jQuery. This will ensure that the bulk of the traffic is only resent per day.
* Set the permissions on the database so that the default IIS user for the machine has access to the folders.
* Set the permissions on the database so that the default IIS user for the machine has access to the folders.
* Ensure that Web Service Extensions are enabled for Active Server Pages (from the IIS configuration screen, on the left below Default Web Pages).
* Ensure that Web Service Extensions are enabled for Active Server Pages (From ''Server Manager/Roles/Add Role'').
* Stop and start the Website created.
* Stop and start the Website created.


Line 99: Line 99:




Set up the Scheduled tasks as follows:
Set up the Scheduled tasks as follows (through ''Administrative Tools/Task Scheduler'' on Windows 7/2008+ or ''Control Panel/Scheduled Tasks'' on other versions of Windows):
* Vision Mining - Daily, from 00:10, for 23 hours 50 minutes. The interval could be anything from 5-15 minutes. It is not recommended that it be any more frequent than every 5 minutes.
* Vision Mining - Daily, from 00:10, for 23 hours 50 minutes. The interval could be anything from 5-15 minutes. It is not recommended that it be any more frequent than every 5 minutes.
* Vision Cleardown - Daily, once at 00:00.
* Vision Cleardown - Daily, once at 00:00.
The two scheduled items above may be tested be right-clicking and selecting ''Run'' from the pop-up list of actions.
Note that these tasks require ODBC drivers to access the various systems, as follows:
* WCS - Microsoft Access
* WMS/TMS - Oracle
These must be installed. Note that the various versions of Windows may have these installed already. If installed separately, the ODBC driver may have a different name to the one in the script and therefore may need changing in the various scripts. See ''Administrative Tools/Data Sources (ODBC)/System DSN''/'''Add''' for the naming of the ODBC drivers.
If the system is running on a 64bit version of Windows (natively 7/2008+), the ODBC drivers may not be found, as evidenced by an error when running these scripts. Also, they will not be visible in ''Administrative Tools/Data Sources (ODBC)/System DSN''. If they are visible when executing ''c:\windows\syswow64\odbcad32.exe'', then the items must be scheduled differently. Set them up as follows:
* "c:\windows\syswow64\wscript.exe" "{name of script}"
In certain version of Windows, this will request that the script name be added as a parameter instead of in the program to be run - this also works.
== Upgrading to a new server ==
If the server being installed is a copy of an older server, follow these instructions after you have installed the system above:
On the old server:
* Back up the Vision folder and all sub-folders and place in a safe folder
* backup the entire database:
mysqldump --host=127.0.0.1 --port=5306 --user=root --password={} --result-file=VisionDBBackup_YYYYMMDD.sql Productivity1
* Copy all the users, passwords and grants with this code:
$ mysql -uroot -N -p -s > myfile
Enter password:
select Distinct CONCAT('show grants for ''', user, '''@''', host, ''';') as query from mysql.user;
quit
$ mysql -uroot -N -p -s -r < myfile > grantfile
Enter password:
* Add a semicolon to the end of every line in grantfile.
* Copy the grantfile and the Vision and database backup files to the new server.
On the new server:
* Copy the Vision backup over the new installation of Vision.
* Create the database from the backup:
mysql --host=127.0.0.1 --port=5306 --user=root --password={} --comments Productivity1 <VisionDBBackup_YYYYMMDD.sql
* Create all users, password and grants:
$ mysql -uroot -p < ./grantfile


[[Category:Vision Overview]]
[[Category:Vision Overview]]
[[Category:Vision Coding and Release Doc|020]]
[[Category:Vision Coding and Release Doc|020]]
[[Category:Vision Coding and Release]]
[[Category:Vision Coding and Release]]

Revision as of 13:12, 1 July 2014

System Requirements

The system should be installed on a Windows Server (2000/2003/2008) with at least 4Gb free disk space and at least 0.5Gb free memory.

Installation Procedure

Please note: These installation notes are draft and should be used as guidelines at this stage.

Install MySQL database.

Files used:

  • mysql-5.1.45-win32.msi
  • mysql-workbench-gpl-5.2.35.1-win32.msi
  • mysql-connector-odbc-5.1.6-win32.msi

Note: the latest MySQL Enterprise binaries should be used - download from MySQL as required.

Note: Microsoft Windows Server 2008 (and any other 64bit version) require the 64bit versions of the ODBC connectors - the latest file is mysql-connector-odbc-5.1.8-winx64.msi)

Note: Workbench requires a number of Microsoft re distributable files to be installed, that may require the machine to be rebooted. The files are:

  • wic_x86_enu.exe
  • vcredist_x86.exe
  • dotNetFx40_Client_x86_x64

Install the files in this sequence.

Configure the database as InnoDB, accepting 50+ connections, with no anonymous access.

Ensure that the database and bin areas are installed away from the root drive.


NOTE THE ROOT PASSWORD.

If any other database is installed on the machine, change the default port for connections to 5306.

Note: In order to help with the preservation and allocation of space to tables, it is recommended that each table is set within it's own data file. In order to do this:

  • Stop the MySQL service.
  • Edit the my.ini file created in {Program Files}\MySQL\MySQL Server 5.1
  • Add the text innodb_file_per_table to the end of the file.
  • Save the my.ini file.
  • Re-start the service.

This must be done before any tables are created within the database.


Install Microsoft Internet Information Services (IIS) at this stage, if not already installed, from the Add/Remove Windows Components control panel screen (Note: IIS can also be installed as part of the Vision installation package).

Note: If this is not already installed, this may require the Windows Installation disks.


Install the Vision package. The latest version can be found in the project driver under \_Installers\Installer.

  • File used: IN110627Vision.zip

Note: Install the Vision application files away from the root drive.


Change the default port in Connection.asp and Productivity.asp to the port number you chose for database connections when installing MySQL.


Configure IIS:

Settings used:

  • Stop the default web site (as it will be using port 80)
  • Create a new web site named CALIDUS Vision, pointing to the virtual directory where you installed the Vision application. Ensure you enable the ability to execute scripts)
  • Set the port for the application. Note: If there are other sites or web servers on the machine, you may need to change this or them away from the standard port 80. That includes the Default Web Site for IIS - change it 8080 if there are no other web servers on the machine (for example Apache, which defaults to port 8080) or 8081.
  • Change the properties of the new Website.
  • Change the connection timeout to 300 seconds.
  • Ensure that Daily Logging is enabled - use the Advanced tab to ensure that all elements are being reported. The information contained in these logs will be used for bandwidth and system efficiency.
  • For IIS 6.0 or greater, ensure that Parent Paths are enabled, by enabling the flag 'Enable Parent Paths' from the web site's properties/Home Directory/Configuration/Options screen.
  • Change the default document to Productivity.asp
  • If necessary, ensure that the pages expire immediately, to force reload. This should happen automatically with server-derived pages, but may be required for some systems. Note: Enabling this results in much larger bandwidth requirements, as every page (and item on the page) is resent to the browser at all times. Either leave this disabled or enable it at the web-site level, then enable content expiration of 1 day on the folders Files, Releases, Charts and jQuery. This will ensure that the bulk of the traffic is only resent per day.
  • Set the permissions on the database so that the default IIS user for the machine has access to the folders.
  • Ensure that Web Service Extensions are enabled for Active Server Pages (From Server Manager/Roles/Add Role).
  • Stop and start the Website created.


Load the database structure through the MySQL Workbench.

File used:

  • {Vision}/Database/CreateDB.sql

or

  • {Vision}/Database/CreateDB-Struct.sql
  • {Vision}/Database/CreateDB-Data.sql

These files can also be loaded through the following command:

>mysql.exe --host=127.0.0.1 --user=root --password={password} --default-character-set=utf8 --comments <{SQL file}


Create any users with localhost permissions through the MySQL Workbench.

Create user permissions in the database using MySQL Workbench.

Alternatively, run the following procedure through the MySQL Browser or Workbench:

CALL InitialiseInstall(<site>, <systems>, <Comp>, <WH>);

Parameters:

  • <site> - The site code used as a base, for example, CHE, BHS, COV, etc.
  • <systems> - The systems to be set up, comma-delimited. They can be WMS, WMS414, WCS, CTMS.
  • <Comp> - The Company Code
  • <WH> - The Warehouse ID

This procedure will create all data-mining parameters required, as well as a default user, based on the site.


Check that the system is working using a web browser.


Set up the Scheduled tasks as follows (through Administrative Tools/Task Scheduler on Windows 7/2008+ or Control Panel/Scheduled Tasks on other versions of Windows):

  • Vision Mining - Daily, from 00:10, for 23 hours 50 minutes. The interval could be anything from 5-15 minutes. It is not recommended that it be any more frequent than every 5 minutes.
  • Vision Cleardown - Daily, once at 00:00.

The two scheduled items above may be tested be right-clicking and selecting Run from the pop-up list of actions.

Note that these tasks require ODBC drivers to access the various systems, as follows:

  • WCS - Microsoft Access
  • WMS/TMS - Oracle

These must be installed. Note that the various versions of Windows may have these installed already. If installed separately, the ODBC driver may have a different name to the one in the script and therefore may need changing in the various scripts. See Administrative Tools/Data Sources (ODBC)/System DSN/Add for the naming of the ODBC drivers.

If the system is running on a 64bit version of Windows (natively 7/2008+), the ODBC drivers may not be found, as evidenced by an error when running these scripts. Also, they will not be visible in Administrative Tools/Data Sources (ODBC)/System DSN. If they are visible when executing c:\windows\syswow64\odbcad32.exe, then the items must be scheduled differently. Set them up as follows:

  • "c:\windows\syswow64\wscript.exe" "{name of script}"

In certain version of Windows, this will request that the script name be added as a parameter instead of in the program to be run - this also works.


Upgrading to a new server

If the server being installed is a copy of an older server, follow these instructions after you have installed the system above:

On the old server:

  • Back up the Vision folder and all sub-folders and place in a safe folder
  • backup the entire database:
mysqldump --host=127.0.0.1 --port=5306 --user=root --password={} --result-file=VisionDBBackup_YYYYMMDD.sql Productivity1
  • Copy all the users, passwords and grants with this code:
$ mysql -uroot -N -p -s > myfile
Enter password:
select Distinct CONCAT('show grants for , user, @, host, ;') as query from mysql.user;
quit
$ mysql -uroot -N -p -s -r < myfile > grantfile
Enter password:
  • Add a semicolon to the end of every line in grantfile.
  • Copy the grantfile and the Vision and database backup files to the new server.

On the new server:

  • Copy the Vision backup over the new installation of Vision.
  • Create the database from the backup:
mysql --host=127.0.0.1 --port=5306 --user=root --password={} --comments Productivity1 <VisionDBBackup_YYYYMMDD.sql 
  • Create all users, password and grants:
$ mysql -uroot -p < ./grantfile