Post Installation Tasks

Post Installation Tasks

This chapter provides more information on configuring Axpert and install­ing Node.js:

Sections of this chapter:

1.1 Configuring Axpert 

1.2. Installing nodejs on Windows using Installer 

      1.2.1.Managing node server through console 

1.3. Redis Caching (Optional) 

     1.3.1. Opening Web Application (If Redis is installed) (Optional) 

1.4. Launching Axpert Web Application 

1.1 Configuring Axpert

1. Run Axpert.exe from AxpertWebScripts folder available in your local drive.

2. If you are an Axpert Developer and you have existing project, then click the Connect to an Axpert Application button and skip Step 3.

3. If you are new to Axpert and do not have any project, then click the Cre­ate a New Axpert Application button.

4. Enter all the database details related to your Application. You will be re­directed to Axpert login page.

1.2. Installing nodejs on Windows using Installer

1. Once the installer installs node.js in your local drive, change your work­ing directory to AXPERT_HOME/AxpertWeb/node and run the bash script npmset­up.ps1. For example

AXPERT_HOME/AxpertWeb/node/npmsetup.ps1.

In the above syntax,

AXPERT_HOME is the location where your Axpert files are installed in your local drive.

2. Right click npmsetup.ps1 file from the AXPERT_HOME/AxpertWeb/node folder and select Run with Powershell command.

3. To run the npmsetup.ps1 file, follow the steps mentioned below:

         3.1. Type Y and press enter in the powershell window. The user will be prompted to make changes. Press Y.

         3.2. In the powershell window, type R and press enter. Repeat this step until the command starts running.

Once you run the command successfully, all softwares get installed.

4. To set the environment and system variables, follow the steps men­tioned below:

        (i) Right click My Computer/This PC and select Properties. The sys­tem window appears.

        (ii) On the left navigation pane, click Advanced system settings. The System Properties window appears.

        (iii) Navigate to the Advanced tab and click the Environment Vari­ables… button. The Environment Variables window appears.

         (iv) In the Environment Variable tab, under the System Variables section, click the New button and add the TNS_ADMIN entry. If the node serv­er runs on the system in which the oracleDB is installed, then configure TNS_ADMIN environment variable pointing to the tnsnames.ora file loca­tion.

bulbico.png Navigate to AXPERT_HOME/AxpertWeb/node folder.

         (v) Edit the ‘tnsnamenode’ key in the AXPERT_HOME/AxpertWeb/node/config/dbconfig.js folder according to the desired entry from the tnsnames.ora file. The node will try to query from the entry which is specified in the ‘tn­snamenode’ key.

By default, the key value will be ‘orcl’.

        (vi) In AXPERT_HOME/AxpertWeb/node/config/dbconfig.js, you can control the maximum number of rows returned by API using the ‘maxRows’ key.

5. In AXPERT_HOME/AxpertWeb/web.config file of the project, change the value of the key ‘nodeAPI’.

bulbico.png By default, the node URL will be http://127.0.0.1:3015/api/. If the node server is running remotely, you can replace 127.0.0.1 with the relevant node server IP address and if the homebuilderimagepath is hosted re­motely, you can replace the existing URL http://127.0.0.1:3015/images/us­erfiles/ with http://nodeserverIP:3015/images/userfiles/.

Make sure that the port number 3015 is enabled so that it can be accessed outside the network.

6. Run npmInstall.bat file from AXPERT_HOME/AxpertWeb/node folder

For example

AXPERT_HOME/AxpertWeb/node/npmInstall.bat 

bulbico.png If you see any errors while running npm command, you can change the name of oci.dll into _oci.dll inside the C:\Windows\System32 folder.

7. If the npm installation is successful and if you use the Oracle database, open the command prompt and change the directory to AXPERT_HOME/Axper­tWeb/node.

Enter ‘node initializeSetup.js “schema username” “schema password” “service_name”‘ in command prompt

For example, you can enter the command in this format. ‘node initialize­Setup issuetrack log orcl’

If you use MySQL/MariaDB, Open the command prompt and change the directory to AxpertWeb/node.

Enter ‘node initializeSetupMysql.js “schema username” “schema pass­word” “host_ip”‘ in command prompt.

For example, you can enter the command in this format. ‘node initialize­SetupMysql issuetrack log 127.0.0.1’.

8. If you are using MariaDB/MySql database, open the command prompt and change your working directory to MYSQL_INSTALLED_PATH\bin.

bulbico.png MYSQL_INSTALLED_PATH is the location, where the MySQL is in­stalled in your system.

Run mysql -u SCHEMA_USERNAME -p DATABASE_NAME < “AXPERT_WEB_FOLDER\migration\Mi­grateMysqlProcedure.sql” in the command prompt and press Enter. 

The system will now prompt the user to enter the schema password.

9. Run installForever.bat batch file from AXPERT_HOME/AxpertWeb/node folder.

For example

AXPERT_HOME/AxpertWeb/node/installForever.bat 

10. Navigate to the AXPERT_HOME/AxpertWeb\node\config\dbConfig.js file and per­form the following:

    a)For Oracle database, tnsnamenode key must be the tnsNode(Service Name) entry referring to the Oracle database. Eg: “orcl”

    b)For MySQL / MariaDB database, host key must have the database IP. Eg: “192.168.2.25”

Save the changes and close the text editor.

11. Double click the nodeAppStart.bat file from AXPERT_HOME/AxpertWeb/node folder to start the node server.

1.2.1.Managing node server through console

a) To check if the node is running properly, type [your_IP_Address]: 3015 in your browser and press Enter so that you can verify whether the server is successfully installed or not.

bulbico.png Success message appears as follows: {“status”:”Server is running successfully”}

b) If you want to stop the node server, double click nodeAppStop.bat file from AXPERT_HOME/AxpertWeb/node folder.

c) If the node server runs on any public windows server, there might be a possibility of particular ports getting blocked. For example, if your node server runs in port 5667, then ensure that this port is accessible from other systems as well.

d) All access error gets stored as .log file in the AXPERT_HOME/AxpertWeb/node/applicationlog/dd-mm-yyyy-error.log folder.

e) All access result gets stored as .log file in AXPERT_HOME/AxpertWeb/node/ap­plicationlog/dd-mm-yyyy-results.log folder.

f) Set the desired port for node server by modifying the applicationport key in the AXPERT_HOME/AxpertWeb/node/config/dbconfig.js folder.

1.3. Redis Caching (Optional)

1. Follow the Documents: Linux(Linux Redis Installation & Configura­tion.rtf) or Windows(Windows Redis Installation & Configuration.rtf) for Re­dis Caching.

2. Open Run command, enter inetmgr and click OK.

3. On the left pane, click Sites > Default Web Site > AxpertWeb.

4. Right Click AxpertWeb and click Explore.

5. Change following keys in web.config file after every installation or up­date:

   a) redisIP

   b) redisPass

1.3.1. Opening Web Application (If Redis is installed) (Optional)

bulbico.png Usually, this step will be automatically performed by OS.

1. Open Run command, enter inetmgr as a run command and click Ok.

2. On the left pane, click Application Pools link.

3. Click AxpertWebScripts in Center Pane to open a Actions pop up win­dow.

4. In the Actions pop up window, click Recycle in right pane.

5. Click AxpertWeb in Center Pane.

6. From Actions, click Recycle in right pane.

1.4. Launching Axpert Web Application

1. Launch web browser.

2. Enter http://localhost/<site name> in the address bar to launch the Ax­pert Web Application.