Showing posts with label shell script. Show all posts
Showing posts with label shell script. Show all posts

Sunday, 14 October 2018

SOA 12c : Shell Script to set Environment variables

This is what you you should do if you want to use a shell script to set your environment variable.

1. Create a .sh file ex: setEnv.sh
2. Edit and add like below:

#!/bin/sh

#*****************************************************************************
# This script is used to set up your environment for development with WebLogic
# Server.  It sets the following variables:
#
# JAVA_HOME    - Location of the version of Java
# ANT_HOME     - Location of the version of ANT
#*****************************************************************************

JAVA_HOME="/jdk/jdk1.8.0_131"
ANT_HOME="/oracle_common/modules/org.apache.ant_1.9.2"

export JAVA_HOME ANT_HOME
echo "Your environment has been set."


3. Edit paths based on you machine/environment.
4. Save
5. Execute the script using the command . ./setEnv.sh

6. Validate by executing the command echo $JAVA_HOME

You can add other variables as required.


Helpful? Please comment.

Happy Learning!!

Saturday, 7 October 2017

SOA 12c : Setting up Environment variables on Unix/Windows

Generally before we begin our local installation or execute commands on Windows or Unix/Linux systems we should setup the environment variables so that we do not face any issues.

In this post we will learn how to setup the environment variables.



1.       Windows (one-time activity):
a.       Right click on MyComputer/This PC > Properties
b.       On left pane click on ‘Advanced system settings’
c.       On System Properties pop up click on ‘Advanced’ tab
d.       Click on button ‘Environment Variables’
e.       Under System variables box, click on New
f.        Insert Variable name and Variable values as below





 

g.       Add above variables to ‘Path’ variable by selecting on Path and clicking on Edit
h.       Add  %JAVA_HOME%\bin
i.     Apply and Save.
j.        Open command-prompt, type echo %JAVA_HOME% to validate.

 


1.       Unix/Linux (on every login):
a.       Login to box
b.       Identify dir path for variable
c.       Run command to set environment variable for JAVA_HOME like below

                            export JAVA_HOME=/java/jdk/jdk1.8.0_131
 
d.       Run command echo %JAVA_HOME% to validate

Note: Paths may differ based on how installation has been done.

If you want to set path permanently on Linux box, edit you ~/.profile or ~/.bash_profile and add the export commands.

You can also check the post on How to create a shell script which is easier to execute every time.


Helpful? Please Comment.


Happy Learning!!





OSB 12c : Dynamic Routing to Business/Proxy Service

Dynamic routing is a kind of  Content-based Routing pattern, which is used when the BusinessService/ProxyService path is required to be de...