Difference between revisions of "Installing LXW"

From ISoft Wiki
Jump to navigationJump to search
(→‎Configure config.json: Removing unnecessary data)
(Redirecting the LXW install page)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
The new version of ITrack LX, colloquially known as LXW, is the faster and sexier version of ITrack designed to run in the browser, primarily on handheld scanner devices.
#REDIRECT [[Internal:Installing LXW]]
 
== Dependencies ==
Besides the regular version of [[MySQL]] used by ITrack Enterprise, LXW requires:
* [http://httpd.apache.org/download.cgi Apache] 2.2 or higher
* [http://php.net/downloads.php PHP] 5.3 or higher
* [http://nodejs.org/download/ Node.js] 0.8 or higher
* [http://subversion.apache.org/ SVN] 1.6 or higher
 
== Installing the server-side code ==
This is the PHP code that talks to the database!  It should be checked out somewhere that is ''not'' accessible via HTTP.
 
The directory to check out is [https://svn.isoftdata.com/svn/Web/tinymvc-branches/lxw-release https://svn.isoftdata.com/svn/Web/tinymvc-branches/lxw-release].
 
To configure the database connection, edit /lxw/configs/database.php.
 
== Installing the client-side code ==
This is the code that is accessible via HTTP!  Check it out to your Apache htdocs folder, or whatever other folder will get it served up to the tubes.
 
The directory to check out is [https://svn.isoftdata.com/svn/Web/tinymvc-branches/lxw-release/lxw/client https://svn.isoftdata.com/svn/Web/tinymvc-branches/lxw-release/lxw/client].
 
To configure the connection to the server-side code: edit line 15 of server/index.php to point it at the path where you checked out the server-side code.
 
To configure client application settings (which should all have reasonable defaults), you can edit the config.js file in the client path.
 
== Setting Up the Auto-Updater ==
This is the process that will download updates for LXW and then install them.
 
[https://svn.isoftdata.com/Web/javascript-trunk/isoft-updater-example/ https://svn.isoftdata.com/Web/javascript-trunk/isoft-updater-example/]
 
#Transfer contents of this directory to the server hosting LXW. The standard directory for Linux based servers is /var/www/lxw/updater (This directory will not exist yet.)
#Configure config.json
#Run the .sh files
##install.sh
##run.sh
#Add updater to crontab
 
===Configure config.json ===
An example of a config.json
 
<code lang="json">
 
{
        "update_url": "autoupdate URL here",
        "product_code": "valid product code here",
        "download_directory": "/var/www/lxw-release/updater/downloaded-all",
        "destination_directories": {
                "default": "/var/www/lxw-release/updater/downloaded-latest",
        },
        "extraction_directories": {
                "LXW-client.zip": "/var/www/html/lxw",
                "LXW-server.zip": "/var/www/lxw-release"
        }
}
</code>
 
After the updater is run properly then a new section will appear below this section and it will look like this.
 
<code>   
   
"versions": {
"LXW-client.zip": "#####",
"LXW-server.zip": "#####"
}
 
</code>
 
===Run .sh Files===
Unfortunately as of February 25th 2013 you are unable to run the .sh files as they will be unable to find the config file. Instead you can run the contents of the files without any problem. Here is an example of each file as you would use it for LKQ.
 
'''install.sh'''
<code>
sudo npm install isoft-updater -g
</code>
 
'''run.sh'''
<code>
node /lib/node_modules/isoft-updater /var/www/lxw-release/updater/config.json
</code>
 
===Add Updater to Crontab===
The last bit to setting up the auto updater is the "auto" part. Here is how to access and edit the crontab.
 
<code>
crontab -e
</code>
 
This is what LKQ's crontab looks like for the autoupdater.
<code>
  12 21  *  *  *  node /lib/node_modules/isoft-updater /var/www/lxw-release/updater/config.json
</code>
 
This is the format that crontab uses.
 
<code>
*  *  *  *  *  command to be executed
-  -  -  -  -
|  |  |  |  |
|  |  |  |  +----- day of week (0 - 6) (Sunday=0)
|  |  |  +------- month (1 - 12)
|  |  +--------- day of month (1 - 31)
|  +----------- hour (0 - 23)
+------------- min (0 - 59)
</code>
 
====Note====
Removing the version section in config.json will cause it to redownload the latest update during the next scheduled update cycle or forced update. Can be used to test the process.
 
== Testing ==
Browsing to the [the URL you would expect to correspond to the client-side files you installed]/server/index.php should show you a snide remark embedded in JSON.
 
Browsing to the regular URL should show you a screen asking you to identify your store number (assuming that your web server is configured to serve up index.html files when you browse to a directory).

Latest revision as of 17:23, 9 April 2015