Wednesday 19 August 2020

ORDS Installation on Oracle Linux

Note: Open the required port on which server where ORDS install from firewall team.

Step 1: First of all install all required RPM’s and then disable the selinux & iptables services in Oracle Linux.

You can check the SELinux status with the following command:

1

2

3

4

5

6

7

8

9

10

[root@erpclnapx ~]# sestatus

SELinux status:                 enabled

SELinuxfs mount:                /sys/fs/selinux

SELinux root directory:         /etc/selinux

Loaded policy name:             targeted

Current mode:                   enforcing

Mode from config file:          enforcing

Policy MLS status:              enabled

Policy deny_unknown status:     allowed

Max kernel policy version:      28

 

To disable SELinux you have to change the “SELINUX=enforcing” to “SELINUX=disabled” in the /etc/sysconfig/selinux configuration file:

 

1

2

3

4

5

6

7

8

9

10

11

# This file controls the state of SELinux on the system.

# SELINUX= can take one of these three values:

# enforcing - SELinux security policy is enforced.

# permissive - SELinux prints warnings instead of enforcing.

# disabled - No SELinux policy is loaded.

SELINUX=disabled

# SELINUXTYPE= can take one of these two values:

# targeted - Targeted processes are protected,

# minimum - Modification of targeted policy. Only selected processes are protected.

# mls - Multi Level Security protection.

SELINUXTYPE=targeted

 

Then reboot the server to take effect and check the SELinux status once again just to make sure:

1

2

[root@erpclnapx ~]# sestatus

SELinux status:                 disabled

 

Disable the Firewall for Oracle Linux.

1.     Stop the ipchains service.

# service ipchains stop

2.     Stop the iptables service.

# service iptables stop

3.     Stop the ipchains service from starting when you restart the server.

# chkconfig ipchains off

4.     Stop the iptables service from starting when you restart the server.

# chkconfig iptables off

 

Step 2: Put the hostname in host file.

[root@erpclnapx ~]# vi /etc/hosts

#127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4

#::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

127.0.0.1    localhost.localdomain      localhost

10.24.248.38 erpclnapx.nicsi.in         erpclnapx

10.24.248.40 erpclonedb.nicsi.in        erpclonedb

 

Then reboot the server to take effect and check the hostname once again just to make sure:

[root@erpclnapx ~]# hostname

erpclnapx.nicsi.in

 

Step 3: Create the user and groups.

[root@erpclnapx ~]# useradd -u 501 applmgr

[root@erpclnapx ~]# groupadd -g 500 dba

[root@erpclnapx ~]# usermod -g dba applmgr

[root@erpclnapx ~]# id applmgr

uid=501(applmgr) gid=500(dba) groups=500(dba)

 

Step 4: Change the required ownership and permissions on directory.

[root@erpclnapx ~]# chown -R applmgr:dba /erp_ords

[root@erpclnapx ~]# chmod -R 775 /erp_ords

Step 5: Login with new user created applmgr.

 

Make the Required directory.

[applmgr@erpclnapx ~]$ mkdir -p /erp_ords/ords

[applmgr@erpclnapx ~]$ mkdir -p /erp_ords/ords/conf

[applmgr@erpclnapx ~]$ mkdir -p /erp_ords/ords/conf/ords/standalone/doc_root

 

Step 6: Download the ORDS Software and then unzip.

[applmgr@erpclnapx ~]$unzip ords-19.1.0.092.1545.zip -d /erp_ords/ords

 

Note: If ORDS and DB on Same node then no need below steps otherwise do the below steps before installation starting of ORDS.

 While connecting to remote database with sysdba privilege, we might encounter below error:-

[oracle@erpclonedb ~]$ sqlplus / as sysdba

 

SQL> alter user sys identified by oracle1;

 

Login on Remote Server

[applmgr@erpclnapx ~]$ sqlplus sys/oracle1@clone as sysdba


SQL*Plus: Release 11.2.0.3.0 Production on Sat Jul 30 18:33:40 2016


Copyright (c) 1982, 2011, Oracle.  All rights reserved.


ERROR:


ORA-01017: invalid username/password; logon denied


Enter user-name:

 

This is because, the password file might have a different password.

If sys user's password and "password file's" password is same, we can connect as sysdba privilege locally as well as remotely.

 

Created new password file:-

[oracle@ erpclonedb dbs]$orapwd file=orapwCLONE password=oracle1 entries=5 force=y

 

However, if "password file" is created using separate password, we need to know it in order to login remotely with sysdba privilege using sys user, or else, will encounter ORA - 01017.

 

By the way, this is not the same with other users. SYS is just special!!!

Now, if we alter SYS user's password, it will sync up with "password file".

[oracle@erpclonedb ~]$ sqlplus / as sysdba

SQL> alter user sys identified by oracle1;

 

Step 7: Install The ORDS.

[applmgr@erpclnapx ~]$cd /erp_ords/ords

[applmgr@erpclnapx ords]$java -jar ords.war install advanced

 

For More Info: https://blog.yannickjaquier.com/oracle/oracle-rest-data-services-ords.html

 

Step 8: Runs a Command that Keeps Running a process after You Log Out.

[applmgr@erpclnapx ~]$nohup java -jar ords.war standalone > startApex_21Jan20.log &

 

After Clone on Clone Server: doing this activity on where ORDS Install

[applmgr@erpclnapx ~]$ cd /erp_ords/ords

[applmgr@erpclnapx ords]$ java -jar ords.war install advanced

 

Verify ORDS schema in Database Configuration apex with connection host: erpclonedb.nicsi.in port: 1536 sid: CLONE

 

Requires to login with administrator privileges to verify Oracle REST Data Services schema.

 

Enter the administrator username:SYS AS SYSDBA

Enter the database password for SYS AS SYSDBA:

Confirm password:

 

Retrieving information.

Enter the default tablespace for ORDS_METADATA [APEX_SPACE]:

Enter the temporary tablespace for ORDS_METADATA [TEMP]:

Enter the default tablespace for ORDS_PUBLIC_USER [APEX_SPACE]:

Enter the temporary tablespace for ORDS_PUBLIC_USER [TEMP]:

Installing Oracle REST Data Services version 19.1.0.r0921545

... Log file written to /home/applmgr/ords_install_core_2020-03-06_115545_00676.log

... Verified database prerequisites

... Created Oracle REST Data Services proxy user

... Created Oracle REST Data Services schema

... Granted privileges to Oracle REST Data Services

... Created Oracle REST Data Services database objects

... Log file written to /home/applmgr/ords_install_datamodel_2020-03-06_115601_00890.log

... Log file written to /home/applmgr/ords_install_apex_2020-03-06_115602_00993.log

Completed installation for Oracle REST Data Services version 19.1.0.r0921545. Elapsed time: 00:00:18.452

 

Enter 1 if you wish to start in standalone mode or 2 to exit [1]:2

[applmgr@erpclnapx ords]$


Wednesday 29 January 2020

Configure X11 Forwarding with PuTTY and Xming for turned on Graphical mode in Linux.

Configure-X11-Forwarding-PuTTY-to-Xming-on-Windows


Usually, Graphical mode is turned off in Linux servers due to Security and Resource optimization.
In such environments running a GUI application is not a trivial task. However, we can use putty
and Xming to forward X11 display to a windows client over SSH protocol.

In this article, we will first install required packages on our Linux Server, then we will configure 
XMing and PuTTY for X11 forwarding on Windows.

This Article Provides:

System Specification:
One Microsoft Windows client and a Linux server.

Required Software:
Download and Install following two software on Windows client.
PuTTY
XMing X Server for Windows
Install required packages on Linux server:
Connect to Linux machine and install necessary packages for X11 forwarding.


[root@junit-01 ~]# yum install -y xauth
...
Installed:
  xorg-x11-xauth.x86_64 1:1.0.9-1.el7

Dependency Installed:
  libXmu.x86_64 0:1.1.2-2.el7        libXt.x86_64 0:1.1.5-3.el7

Complete!

We will require a Linux GUI application to test X11 forwarding configurations.
Therefore, we are installing xclock to test the configuration.

[root@junit-01 ~]# yum install -y xclock
...
Installed:
  xorg-x11-apps.x86_64 0:7.7-7.el7

Dependency Installed:
  libXaw.x86_64 0:1.0.13-4.el7         libXcursor.x86_64 0:1.1.15-1.el7
  libXfixes.x86_64 0:5.0.3-1.el7       libXft.x86_64 0:2.3.2-2.el7
  libXpm.x86_64 0:3.5.12-1.el7         libXxf86vm.x86_64 0:1.1.4-1.el7
  libxkbfile.x86_64 0:1.0.9-3.el7

Complete!

Configure XMing:
After installing Xming on Windows run xlaunch application.

[putty-configure-x11-forwarding-on-windows-01%5B2%5D]

Click on OK

[putty-configure-x11-forwarding-on-windows-02%5B2%5D]

Default configuration will work for us. Therefore, click on Next.

[putty-configure-x11-forwarding-on-windows-03%5B2%5D]

Click on Next.

[putty-configure-x11-forwarding-on-windows-04%5B2%5D]

Click on Next.

[putty-configure-x11-forwarding-on-windows-05%5B2%5D]

Click on Finish.

XMing application has been started and it is placed in System Tray of Windows.

Configure PuTTY:
Once installed, run PuTTY application.

[putty-configure-x11-forwarding-on-windows-06%5B2%5D]

Add a session of our Linux machine therein.





















Besides other configuration, we are also required to configure X11 forwarding as follows:

[putty-configure-x11-forwarding-on-windows-08%5B2%5D]

Save and open the session.

login as: root
Authenticating with public key "rsa-key-20190101"
Last login: Thu Jan  23 16:16:23 2020 from 10.24.248.38
/usr/bin/xauth:  file /root/.Xauthority does not exist
[root@erpclnapx ~]# xclock

Xming will capture the Display open a window to run xclock application.

[putty-configure-x11-forwarding-on-windows-09%5B2%5D]

We have successfully configured X11 forwarding using PuTTY and XMing.