Sunday, July 16, 2023

Docker : Install Docker on Oracle Linux 7

 


Docker : Install Docker on Oracle Linux 7 (OL7)


Install Docker

Enable all the required repositories. To do this you are going to need the yum-utils package.


yum install -y yum-utils zip unzip

yum-config-manager --enable ol7_optional_latest

yum-config-manager --enable ol7_addons


yum install -y oraclelinux-developer-release-el7

yum-config-manager --enable ol7_developer

Install Docker and BTRFS.


yum install -y docker-engine btrfs-progs btrfs-progs-devel

Configure BTRFS

By default the containers are created under the "/var/lib/docker", so you really need to house this on a separate disk or in a separate partition, preferably using BTRFS as the file system.

NOTE : you can keep docker in default location or can create new mount .

I have a second LUN with a device named "/dev/sdb". I could build the file system on this disk directly, but I prefer to partition the disks with a single partition using fdisk. These responses will create a new partition using the whole of the disk ("n", "p", "return", "return", "return", "w").


# fdisk /dev/sdb

Welcome to fdisk (util-linux 2.23.2).


Changes will remain in memory only, until you decide to write them.

Be careful before using the write command.


Device does not contain a recognized partition table

Building a new DOS disklabel with disk identifier 0x2ccc116e.


Command (m for help): n

Partition type:

   p   primary (0 primary, 0 extended, 4 free)

   e   extended

Select (default p): p

Partition number (1-4, default 1): 

First sector (2048-25165823, default 2048): 

Using default value 2048

Last sector, +sectors or +size{K,M,G} (2048-25165823, default 25165823): 

Using default value 25165823

Partition 1 of type Linux and of size 12 GiB is set


Command (m for help): w

The partition table has been altered!


Calling ioctl() to re-read partition table.

Syncing disks.

#

Make the BTRFS file system on the "sdb1" partition. The Oracle Linux 7 Configuring Docker Storage manual describes how to use the docker-storage-config utility to do this with a single command.


# docker-storage-config -s btrfs -d /dev/sdb1

Creating 'btrfs' file system on: /dev/sdb1

#

We can see the file system is added to the "/etc/fstab" file and has been mounted under "/var/lib/docker" by the utility.


# cat /etc/fstab


#

# /etc/fstab

# Created by anaconda on Tue Nov 14 11:49:55 2017

#

# Accessible filesystems, by reference, are maintained under '/dev/disk'

# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info

#

/dev/mapper/ol-root     /                       xfs     defaults        0 0

UUID=196ae589-c060-46b9-87dc-49d3ed2b01e7 /boot                   xfs     defaults        0 0

/dev/mapper/ol-swap     swap                    swap    defaults        0 0

UUID=10dbd6c1-8ae4-420e-91d8-b021f334e82b /var/lib/docker btrfs defaults 0 0 # added by docker-storage-config

#



# df -h

Filesystem           Size  Used Avail Use% Mounted on

devtmpfs             7.7G     0  7.7G   0% /dev

tmpfs                7.8G     0  7.8G   0% /dev/shm

tmpfs                7.8G   25M  7.7G   1% /run

tmpfs                7.8G     0  7.8G   0% /sys/fs/cgroup

/dev/mapper/ol-root   45G   25G   21G  55% /

/dev/sda1            497M  291M  206M  59% /boot

tmpfs                1.6G   12K  1.6G   1% /run/user/42

tmpfs                1.6G     0  1.6G   0% /run/user/0

/dev/sdb1            100G   17M   98G   1% /var/lib/docker

#

If we didn't have access to the docker-storage-config utility we could have used the following commands.


# mkfs.btrfs -f -L docker1 /dev/sdb1

# systemctl stop docker.service

# rm -Rf /var/lib/docker

# mkdir /var/lib/docker

# echo "LABEL=docker1  /var/lib/docker btrfs defaults 0 0" >> /etc/fstab

# mount /var/lib/docker

Finish Docker Setup

Enable and start the Docker service.


# systemctl enable docker.service

# systemctl start docker.service

You can get information about docker using the following commands.


# systemctl status docker.service

# docker info

# docker version

You are now ready to start using Docker!

Sunday, July 9, 2023

Install oracle apex on Linux

Install oracle apex on Linux:


 Following software are installed in the given order for Apex.


1- openjdk-11.0.2_linux-x64_bin.tar

2- Oracle Database.

3- apex_20.2.zip

4- apache-tomcat-9.0.41.tar.gz

5- ords-20.4.1.013.1644.zip (ords have a .war file which will be deployed on tomacat to access apex).


OS: Linux_x64


1- install database. (I installed 12.1.0.2.0)


2- ------------ Installing Apex ------------------------


a) create dedicated tablespace for apex.


create tablespace apex datafile '/opt/oracle/oradata/orcl/apex01.dbf' SIZE 100M AUTOEXTEND ON NEXT 1M;


b) create directy in which we want to install the apex. unzip the zip file of apex setup (apex_20.2.zip).


mkdir /opt/apex

unzip apex_20.2.zip


c) Connect to SQL*Plus as the SYS user and run the "apexins.sql" script, specifying the relevant tablespace names and image URL.

cd /opt/apex

sqlplus / as sysdba

@apexins.sql APEX APEX TEMP /i/


d) change the admin password:

cd /opt/apex

sqlplus /as sysdba

@apxchpwd.sql

-----------------------------

e) Create the APEX_LISTENER and APEX_REST_PUBLIC_USER users by running the "apex_rest_config.sql" script.

sqlplus / as sysdba

@apex_rest_config.sql (i set the password apex)



3- --------------Installing Tomcat -------------------


a) create a directory for java and unzip it.


mkdir /opt/java

tar -xzvf openjdk-11.0.2_linux-x64_bin.tar.gz


b) create soft link to set java as latest java.


ln -s jdk-11.0.1 latest


c) make a directory for tomcat and unzip it.


mkdir /opt/tomcat

tar -xzvf apache-tomcat-9.0.41.tar.gz


 ln -s apache-tomcat-9.0.14 latest

d) create .env file for java.

vi /home/oracle/java.env

export JAVA_HOME=/opt/java/jdk-11.0.2

export PATH=$JAVA_HOME/bin:$PATH

e) start the tomcat services.

. /home/oracle/java.env

/opt/tomcat/apache-tomcat-9.0.41/bin

./startup.sh

f) check the status of the tomcat:

ps -ef|grep tomcat

http://192.168.0.100:8080/


4- --------------Installing ORDS ------------------



a) Unlock the following users and change their passwords:


ALTER USER SYS IDENTIFIED BY nosys ACCOUNT UNLOCK;

ALTER USER APEX_LISTENER IDENTIFIED BY apex ACCOUNT UNLOCK;

ALTER USER APEX_PUBLIC_USER IDENTIFIED BY apex ACCOUNT UNLOCK;

ALTER USER APEX_REST_PUBLIC_USER IDENTIFIED BY apex ACCOUNT UNLOCK;


-- The next one will fail if you've never installed ORDS before. Ignore errors.

ALTER USER ORDS_PUBLIC_USER IDENTIFIED BY apex ACCOUNT UNLOCK;



b) Unzip the ORDS.

mkdir /opt/ords

unzip ords-20.4.1.013.1644.zip


c) Make a directory to hold the configuration.


mkdir -p /opt/ords/conf


edit the following file and input only given entries.


vi /opt/ords/params/ords_params.properties


db.hostname=localhost

db.port=1521

db.servicename=orcl

db.sid=orcl


d) Set the configuration directory:

cd /opt/ords

. /home/oracle/java.env


$JAVA_HOME/bin/java -jar ords.war configdir /opt/ords/conf


e) Start the configuration:


$JAVA_HOME/bin/java -jar ords.war


--------

[oracle@apex1 ords]$ $JAVA_HOME/bin/java -jar ords.war

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


Enter the administrator username:sys

Enter the database password for SYS AS SYSDBA:

Confirm password:

Connecting to database user: SYS AS SYSDBA url: jdbc:oracle:thin:@//localhost:1521/orcl


Retrieving information.

Enter 1 if you want to use PL/SQL Gateway or 2 to skip this step.

If using Oracle Application Express or migrating from mod_plsql then you must enter 1 [1]:

Enter a number to select a feature to enable:

   [1] SQL Developer Web  (Enables all features)

   [2] REST Enabled SQL

   [3] Database API

   [4] REST Enabled SQL and Database API

   [5] None

Choose [1]:

2021-02-01T19:51:51.705Z INFO        reloaded pools: []

Installing Oracle REST Data Services version 20.4.1.r0131644

... Log file written to /home/oracle/ords_install_core_2021-02-01_145151_00860.log

... Verified database prerequisites

... Created Oracle REST Data Services proxy user

Warning: Nashorn engine is planned to be removed from a future JDK release

... 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/oracle/ords_install_datamodel_2021-02-01_145218_00571.log

... Log file written to /home/oracle/ords_install_apex_2021-02-01_145222_00690.log

Completed installation for Oracle REST Data Services version 20.4.1.r0131644. Elapsed time: 00:00:34.176 


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

--------

f)

mkdir -p /opt/tomcat/apache-tomcat-9.0.41/webapps/i

cp -R /opt/apex/images/* /opt/tomcat/apache-tomcat-9.0.41/webapps/i


cp /opt/ords/ords.war /opt/tomcat/apache-tomcat-9.0.41/webapps



g) Change the Tomcat default listen port from 8080 to 8085:


vi /opt/tomcat/apache-tomcat-9.0.41/conf/server.xml


<Connector port="8085" protocol="HTTP/1.1"

               connectionTimeout="20000"

               redirectPort="8443" />
-----------------------------------------------------------------------------

In-Case of error (WARNING: The pool named: |apex|| is invalid and will be ignored), update the password from following user and 

edit the following files and input new password.


alter user ORDS_PUBLIC_USER identified by  381;

alter user APEX_PUBLIC_USER identified by 381;

alter user APEX_LISTENER identified by 381;

alter user APEX_REST_PUBLIC_USER identfied by 381;


cd /opt/ords/conf/ords/conf/

vi apex_rt.xml

vi apex.xml 

vi apex_al.xml

vi apex_pu.xml

Wednesday, July 5, 2023

EBS WITH DBCS

 Boosting Business Agility Oracle E-Business Suite (EBS) with Oracle Database Cloud Service (DBCS)


Note:
The minimum database version required for Oracle Database Cloud Service (DBCS) integration with Oracle E-Business Suite (EBS) R12.2.x is Oracle Database 19c Only.


Oracle DBCS is a fully managed, scalable, and secure database service provided by Oracle its cloud-based service that makes it easy to deploy and manage Oracle databases in the cloud. With DBCS, you can provision new databases in minutes and scale up or down as needed without having to worry about capacity planning or managing complex infrastructure. In today's data-driven world, businesses are constantly striving for agility and scalability to meet evolving demands.

DBCS Will Auto Manage :

*Automated Backup and Recovery
*Automated Patching and Upgrades (for Database Only )
*Automatic Storage Management
*Automated Performance Tuning
*Automatic SQL Plan Management
*Automatic Indexing
*Query Optimization
*In-Memory Caching

DBCS accelerates data processing and improves response times. This translates into faster application performance, increased productivity, and improved customer experiences.


If you're ready to take your data management to the next level, it's time to explore the benefits of Oracle DBCS. Embrace the power of the cloud and propel your organization towards a more agile and efficient future. Experience the transformative potential of DBCS and unlock the true value of your data.