MacLochlainns Weblog

Michael McLaughlin's Technical Blog

Site Admin

Archive for the ‘Oracle Linux’ Category

Oracle 23c Free SQL*Plus

without comments

It’s always frustrated me when using the sqlplus command-line interface (CLI) that you can’t just “up arrow” to through the history. At least, that’s the default case unless you wrap the sqlplus executable.

I like to do my development work as close to the database as possible. The delay from SQL Developer to the database or VSCode to the database is just too long. Therefore, I like the native sqlplus to be as efficient as possible. This post shows you how to install the rlwarp utility to wrap sqlplus and create a sandboxed student user for a local development account inside the Oracle 23c Free container. You should note that the Docker or Podman Container is using Oracle Unbreakable Linux 8 as it’s native OS.

You can connect to your Docker version of Oracle Database 23c Free with the following command:

docker exec -it -u root oracle23c bash

You can’t just use dnf to install rlwrap and get it to magically install all the dependencies. That would be too easy, eh?

Attempting to do so will lock your base OS and eventually force you to kill with prejudice the hung dnf process (at least it forced me to do so). You need to determine the rlwrap dependencies and then install them first. In that process, I noticed that the which utility program wasn’t installed in the container.

Naturally, I installed the which utility first with this command:

dnf install -y which

The rlwrap dependencies are: glibc, ncurses, perl, readline, python, and git. Only the perl, python, and git are missing from the list of formal dependencies but there’s another dependency the epel-release package.

If you want to verify whether a package is installed, you can use the rpm command like this:

rpm -qa | grep package_name

I installed the perl programming environment (a big install) with this command:

dnf install -y perl

I installed the python3 with this command:

dnf install -y python3

I installed the git module with this command:

dnf install -y git

I installed the epel-release container with this command:

dnf install -y epel-release

After installing all of these, you’re now ready to install the core rlwrap utility program. Like the other installations, you use:

dnf install -y rlwrap

At this point, you need to create a sandboxed user account for the Docker instance because as a developer using the root user for simple tasks is a bad idea. While you could do this with a Docker command, the Oracle 23c Free edition raised a lock on the /etc/group file when I tried it. Naturally, that’s not a problem because you can connect as the root user with this syntax:

docker exec -it -u root oracle23c bash

As the root user, create a student account as a developer account in the Oracle 23c Free container:

useradd -u 501 -g dba -G users -d /home/student -s /bin/bash/ -c "Student" -n student

You’ll be unable to leverage the tnsnames.ora file unless you alter the prior command to replace dba with oinstall or add the following command:

usermod -a -G oinstall student

Exit the Oracle 23c Free container as the root user and reconnect as the student user with this syntax:

docker exec -it --user student oracle23c bash

While you’re connected as the root user, you should create an upload directory as a subdirectory of the $ORACLE_BASE directory. The $ORACLE_BASE directory in the Oracle Database 23c Free Docker image is the /opt/oracle directory.

You should use the following syntax to create the upload directory and change its permission to that of the Oracle Database 23c Free installation (for a future blog post on developing external table deployment on the Docker image):

mkdir /opt/oracle
chown -R oracle:install /opt/oracle/upload

You also can add the following student function to the Ubuntu student user’s .bashrc file. It means all you need to type to connect to the Oracle Database 23c Free Docker instance is “student“. I like shortcuts like this one, which let you leverage one-line Python commands.

student () 
{
    # Discover the fully qualified program name. 
    path=`which docker 2>/dev/null`
    file=''
 
    # Parse the program name from the path.
    if [ -n ${path} ]; then
        file=${path##/*/}
    fi
 
    # Wrap when there is a file and it is rewrap.
    if [ -n ${file} ] && [[ ${file} = "docker" ]]; then
        python -c "import subprocess; subprocess.run(['docker exec -it --user student oracle23c bash'], shell=True)" 
    else
        echo "Docker is unavailable: Install the docker package."
    fi
}

Open a Ubuntu Terminal shell and type a student function name to connect to the Docker Oracle Database 23c Free instance where you can now test things like external tables with the SQL*Plus command line without installing it on the Ubuntu local operating system.

student@student-virtual-machine:~$ student
[student@d28375f0c43f ~]$ sqlplus c##student/student@free
 
SQL*Plus: Release 23.0.0.0.0 - Production on Wed Jan 3 02:14:22 2024
Version 23.3.0.23.09
 
Copyright (c) 1982, 2023, Oracle.  All rights reserved.
 
Last Successful login time: Wed Jan 03 2024 01:56:44 +00:00
 
Connected to:
Oracle Database 23c Free Release 23.0.0.0.0 - Develop, Learn, and Run for Free
Version 23.3.0.23.09
 
SQL>

Then, I added this sqlplus function to the /home/student/.bashrc file, which is owned by the student user. However, I also added the instruction to change to the student user’s home directory because the Oracle 23c Free container will connect you to the /home/oracle directory by default. I also added the default long list (ll) alias to the .bashrc file.

sqlplus () 
{
    # Discover the fully qualified program name. 
    path=`which rlwrap 2>/dev/null`
    file=''
 
    # Parse the program name from the path.
    if [ -n ${path} ]; then
        file=${path##/*/}
    fi;
 
    # Wrap when there is a file and it is rewrap.
    if [ -n ${file} ] && [[ ${file} = "rlwrap" ]]; then
        rlwrap sqlplus "${@}"
    else
        echo "Command-line history unavailable: Install the rlwrap package."
        $ORACLE_HOME/bin/sqlplus "${@}"
    fi
}
 
# Change to the user's home directory.
cd ${HOME}
 
# Create a long list alias:
alias ll='ls -l --color=auto'

After you’ve configured your student user, you can configure the oracle user account to work like a regular server. Exit the Docker Oracle Database 23c Free as the student user, then connect as the root user with this command:

docker exec -it -u root oracle23c bash

As the root user you can become the oracle user with the following command:

su - oracle

Now, add the following .bashrc shell in the /home/oracle directory:

# The oracle user's .bashrc
 
# Source global definitions
if [ -f /etc/bashrc ]; then
	. /etc/bashrc
fi
 
# User specific environment
if ! [[ "$PATH" =~ "$HOME/.local/bin:$HOME/bin:" ]]
then
    PATH="$HOME/.local/bin:$HOME/bin:$PATH"
fi
export PATH
 
# Uncomment the following line if you don't like systemctl's auto-paging feature:
# export SYSTEMD_PAGER=
 
# User specific aliases and functions
export ORACLE_SID=FREE
export ORACLE_BASE=/opt/oracle
export ORACLE_HOME=/opt/oracle/product/23c/dbhomeFree
export PATH=$PATH:/$ORACLE_HOME/bin
 
# Change to the user's home directory.
cd ${HOME}
 
# Create a long list alias:
alias ll='ls -l --color=auto'
 
sqlplus () 
{
    # Discover the fully qualified program name. 
    path=`which rlwrap 2>/dev/null`
    file=''
 
    # Parse the program name from the path.
    if [ -n ${path} ]; then
        file=${path##/*/}
    fi;
 
    # Wrap when there is a file and it is rewrap.
    if [ -n ${file} ] && [[ ${file} = "rlwrap" ]]; then
        rlwrap sqlplus "${@}"
    else
        echo "Command-line history unavailable: Install the rlwrap package."
        $ORACLE_HOME/bin/sqlplus "${@}"
    fi
}

You need to manually source the .bashrc for the oracle user because it’s not an externally available user. Use this syntax to connect as the internal user:

sqlplus / as sysdba

It’ll display:

SQL*Plus: RELEASE 23.0.0.0.0 - Production ON Wed Jan 3 07:08:11 2024
Version 23.3.0.23.09
 
Copyright (c) 1982, 2023, Oracle.  ALL rights reserved.
 
 
Connected TO:
Oracle DATABASE 23c Free RELEASE 23.0.0.0.0 - Develop, Learn, AND Run FOR Free
Version 23.3.0.23.09
 
SQL>

After all this, I can now click the “up arrow” to edit any of the sqlplus command history. If you like to work inside sqlplus natively, this should help you.

Written by maclochlainn

December 20th, 2023 at 11:11 pm

What Identifier?

without comments

It’s always interesting to see students find the little nuances that SQL*Plus can generate. One of the first things we cover is the concept of calling PL/SQL interactively versus through an embedded call. The easiest and first exercise simply uses an insecure call like:

sqlplus -s student/student @call.sql

to the call.sql program:

SQL> DECLARE
  2    lv_input  VARCHAR2(20);
  3  BEGIN
  4    lv_input := '&1';
  5    dbms_output.put_line('['||lv_input||']');
  6  END;
  7  /

It prints the following to console:

Enter value for 1: machine
old   4:   lv_input := '&1';
new   4:   lv_input := 'machine';
[machine]
 
PL/SQL procedure successfully completed.

Then, we change the '&1' parameter variable to '&mystery' and retest the program, which prints the following to the console:

Enter value for mystery: machine
old   4:   lv_input := '&mystery';
new   4:   lv_input := 'machine';
[machine]
 
PL/SQL procedure successfully completed.

After showing a numeric and string input parameter, we remove the quotation from the lv_input input parameter and raise the following error:

Enter value for mystery: machine
old   4:   lv_input := &mystery;
new   4:   lv_input := machine;
  lv_input := machine;
              *
ERROR at line 4:
ORA-06550: line 4, column 15:
PLS-00201: identifier 'MACHINE' must be declared
ORA-06550: line 4, column 3:
PL/SQL: Statement ignored

The point of the exercise is to spell out that the default input value is numeric and that if you pass a string it becomes an identifier in the scope of the program. So, we rewrite the call.sql program file by adding a machine variable, like:

SQL> DECLARE
  2    lv_input  VARCHAR2(20);
  3    machine   VARCHAR2(20) := 'Mystery Machine';
  4  BEGIN
  5    lv_input := &mystery;
  6    dbms_output.put_line('['||lv_input||']');
  7  END;
  8  /

It prints the following:

Enter value for mystery: machine
old   5:   lv_input := &mystery;
new   5:   lv_input := machine;
[Mystery Machine]
 
PL/SQL procedure successfully completed.

The parameter name becomes an identifier and maps to the variable machine. That mapping means it prints the value of the machine variable.

While this is what we’d call a terminal use case, it is a fun way to illustrate an odd PL/SQL behavior. As always, I hope its interesting for those who read it.

Written by maclochlainn

April 26th, 2021 at 12:47 pm

Create Oracle User

without comments

After you create and provision the Oracle Database 11g XE, you create an instance with the following two step process.

  1. Create a student Oracle user account with the following command:

    CREATE USER student IDENTIFIED BY student
    DEFAULT TABLESPACE users QUOTA 200M ON users
    TEMPORARY TABLESPACE temp;

  2. Grant necessary privileges to the newly created student user:

    GRANT CREATE CLUSTER, CREATE INDEXTYPE, CREATE OPERATOR
    ,     CREATE PROCEDURE, CREATE SEQUENCE, CREATE SESSION
    ,     CREATE TABLE, CREATE TRIGGER, CREATE TYPE
    ,     CREATE VIEW TO student;

As always, I hope this helps those looking for how to do something that’s less than clear because everybody uses tools.

Written by maclochlainn

August 13th, 2019 at 1:39 pm

Oracle 12c Pre-requisites

without comments

Installing any Oracle database is tedious, but the installing the prerequisites can be especially tedious. This post tries to simplify the process by creating a single prereq.sh file for all the prerequisite libraries, except for the oracle-rdbms-server-12cR1-preinstall, which you should run after the prerequisite file.

The prerequisite file should contain the following:

yum install -y binutils \
               compat-libstdc++-33 \
               compat-libstdc++-33.i686 \
               gcc \
               gcc-c++ \
               glibc \
               glibc.i686 \
               glibc-devel \
               glibc-devel.i686 \
               ksh \
               libgcc \
               libgcc.i686 \
               libstdc++ \
               libstdc++.i686 \
               libstdc++-devel \
               libstdc++-devel.i686 \
               libaio \
               libaio.i686 \
               libaio-devel \
               libaio-devel.i686 \
               libXext \
               libXext.i686 \
               libXtst \
               libXtst.i686 \
               libX11 \
               libX11.i686 \
               libXau \
               libXau.i686 \
               libxcb \
               libxcb.i686 \
               libXi \
               libXi.i686 \
               make \
               sysstat \
               unixODBC \
               unixODBC-devel \
               zlib-devel \
               zlib-devel.i686

You can run the prereq.sh script as the root user like you would source an environment file:

. ./prereq.sh

Dependent upon what you installed when creating the Oracle Linux 7.1 operating system, you should see something like this in the output console:

sh-4.2# . ./prereq.sh
Loaded plugins: langpacks
Package compat-libstdc++-33-3.2.3-72.el7.x86_64 already installed and latest version
Package libXtst-1.2.2-2.1.el7.x86_64 already installed and latest version
Package libXau-1.0.8-2.1.el7.x86_64 already installed and latest version
Package 1:make-3.82-21.el7.x86_64 already installed and latest version
Package sysstat-10.1.5-7.el7.x86_64 already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package binutils.x86_64 0:2.23.52.0.1-30.el7_1.2 will be updated
---> Package binutils.x86_64 0:2.23.52.0.1-55.el7 will be an update
---> Package compat-libstdc++-33.i686 0:3.2.3-72.el7 will be installed
---> Package gcc.x86_64 0:4.8.3-9.el7 will be updated
--> Processing Dependency: gcc = 4.8.3-9.el7 for package: gcc-gfortran-4.8.3-9.el7.x86_64
--> Processing Dependency: gcc = 4.8.3-9.el7 for package: libquadmath-devel-4.8.3-9.el7.x86_64
---> Package gcc.x86_64 0:4.8.5-4.el7 will be an update
--> Processing Dependency: cpp = 4.8.5-4.el7 for package: gcc-4.8.5-4.el7.x86_64
--> Processing Dependency: libgomp = 4.8.5-4.el7 for package: gcc-4.8.5-4.el7.x86_64
---> Package gcc-c++.x86_64 0:4.8.3-9.el7 will be updated
---> Package gcc-c++.x86_64 0:4.8.5-4.el7 will be an update
---> Package glibc.x86_64 0:2.17-78.0.1.el7 will be updated
--> Processing Dependency: glibc = 2.17-78.0.1.el7 for package: glibc-headers-2.17-78.0.1.el7.x86_64
--> Processing Dependency: glibc = 2.17-78.0.1.el7 for package: glibc-common-2.17-78.0.1.el7.x86_64
---> Package glibc.i686 0:2.17-106.0.1.el7_2.6 will be installed
--> Processing Dependency: libfreebl3.so for package: glibc-2.17-106.0.1.el7_2.6.i686
--> Processing Dependency: libfreebl3.so(NSSRAWHASH_3.12.3) for package: glibc-2.17-106.0.1.el7_2.6.i686
---> Package glibc.x86_64 0:2.17-106.0.1.el7_2.6 will be an update
---> Package glibc-devel.x86_64 0:2.17-78.0.1.el7 will be updated
---> Package glibc-devel.i686 0:2.17-106.0.1.el7_2.6 will be installed
---> Package glibc-devel.x86_64 0:2.17-106.0.1.el7_2.6 will be an update
---> Package ksh.x86_64 0:20120801-22.el7_1.3 will be installed
---> Package libX11.x86_64 0:1.6.0-2.1.el7 will be updated
---> Package libX11.i686 0:1.6.3-2.el7 will be installed
--> Processing Dependency: libX11-common >= 1.6.3-2.el7 for package: libX11-1.6.3-2.el7.i686
---> Package libX11.x86_64 0:1.6.3-2.el7 will be an update
---> Package libXau.i686 0:1.0.8-2.1.el7 will be installed
---> Package libXext.x86_64 0:1.3.2-2.1.el7 will be updated
---> Package libXext.i686 0:1.3.3-3.el7 will be installed
---> Package libXext.x86_64 0:1.3.3-3.el7 will be an update
---> Package libXi.x86_64 0:1.7.2-2.1.el7 will be updated
---> Package libXi.i686 0:1.7.4-2.el7 will be installed
---> Package libXi.x86_64 0:1.7.4-2.el7 will be an update
---> Package libXtst.i686 0:1.2.2-2.1.el7 will be installed
---> Package libaio.x86_64 0:0.3.109-12.el7 will be updated
---> Package libaio.i686 0:0.3.109-13.el7 will be installed
---> Package libaio.x86_64 0:0.3.109-13.el7 will be an update
---> Package libaio-devel.i686 0:0.3.109-13.el7 will be installed
---> Package libaio-devel.x86_64 0:0.3.109-13.el7 will be installed
---> Package libgcc.x86_64 0:4.8.3-9.el7 will be updated
---> Package libgcc.i686 0:4.8.5-4.el7 will be installed
---> Package libgcc.x86_64 0:4.8.5-4.el7 will be an update
---> Package libstdc++.x86_64 0:4.8.3-9.el7 will be updated
---> Package libstdc++.i686 0:4.8.5-4.el7 will be installed
---> Package libstdc++.x86_64 0:4.8.5-4.el7 will be an update
---> Package libstdc++-devel.x86_64 0:4.8.3-9.el7 will be updated
---> Package libstdc++-devel.i686 0:4.8.5-4.el7 will be installed
---> Package libstdc++-devel.x86_64 0:4.8.5-4.el7 will be an update
---> Package libxcb.x86_64 0:1.9-5.el7 will be updated
---> Package libxcb.i686 0:1.11-4.el7 will be installed
---> Package libxcb.x86_64 0:1.11-4.el7 will be an update
---> Package unixODBC.x86_64 0:2.3.1-11.el7 will be installed
---> Package unixODBC-devel.x86_64 0:2.3.1-11.el7 will be installed
---> Package zlib-devel.i686 0:1.2.7-15.el7 will be installed
--> Processing Dependency: zlib = 1.2.7-15.el7 for package: zlib-devel-1.2.7-15.el7.i686
--> Processing Dependency: libz.so.1 for package: zlib-devel-1.2.7-15.el7.i686
---> Package zlib-devel.x86_64 0:1.2.7-15.el7 will be installed
--> Running transaction check
---> Package cpp.x86_64 0:4.8.3-9.el7 will be updated
---> Package cpp.x86_64 0:4.8.5-4.el7 will be an update
---> Package gcc-gfortran.x86_64 0:4.8.3-9.el7 will be updated
---> Package gcc-gfortran.x86_64 0:4.8.5-4.el7 will be an update
--> Processing Dependency: libgfortran = 4.8.5-4.el7 for package: gcc-gfortran-4.8.5-4.el7.x86_64
--> Processing Dependency: libquadmath = 4.8.5-4.el7 for package: gcc-gfortran-4.8.5-4.el7.x86_64
---> Package glibc-common.x86_64 0:2.17-78.0.1.el7 will be updated
---> Package glibc-common.x86_64 0:2.17-106.0.1.el7_2.6 will be an update
---> Package glibc-headers.x86_64 0:2.17-78.0.1.el7 will be updated
---> Package glibc-headers.x86_64 0:2.17-106.0.1.el7_2.6 will be an update
---> Package libX11-common.noarch 0:1.6.0-2.1.el7 will be updated
---> Package libX11-common.noarch 0:1.6.3-2.el7 will be an update
---> Package libgomp.x86_64 0:4.8.3-9.el7 will be updated
---> Package libgomp.x86_64 0:4.8.5-4.el7 will be an update
---> Package libquadmath-devel.x86_64 0:4.8.3-9.el7 will be updated
---> Package libquadmath-devel.x86_64 0:4.8.5-4.el7 will be an update
---> Package nss-softokn-freebl.x86_64 0:3.16.2.3-12.el7_1 will be updated
---> Package nss-softokn-freebl.i686 0:3.16.2.3-14.2.el7_2 will be installed
---> Package nss-softokn-freebl.x86_64 0:3.16.2.3-14.2.el7_2 will be an update
---> Package zlib.x86_64 0:1.2.7-13.el7 will be updated
---> Package zlib.i686 0:1.2.7-15.el7 will be installed
---> Package zlib.x86_64 0:1.2.7-15.el7 will be an update
--> Running transaction check
---> Package libgfortran.x86_64 0:4.8.3-9.el7 will be updated
---> Package libgfortran.x86_64 0:4.8.5-4.el7 will be an update
---> Package libquadmath.x86_64 0:4.8.3-9.el7 will be updated
---> Package libquadmath.x86_64 0:4.8.5-4.el7 will be an update
--> Finished Dependency Resolution
 
Dependencies Resolved
 
================================================================================
 Package                Arch      Version                   Repository     Size
================================================================================
Installing:
 compat-libstdc++-33    i686      3.2.3-72.el7              ol7_latest    196 k
 glibc                  i686      2.17-106.0.1.el7_2.6      ol7_latest    4.2 M
 glibc-devel            i686      2.17-106.0.1.el7_2.6      ol7_latest    1.0 M
 ksh                    x86_64    20120801-22.el7_1.3       ol7_latest    880 k
 libX11                 i686      1.6.3-2.el7               ol7_latest    609 k
 libXau                 i686      1.0.8-2.1.el7             ol7_latest     28 k
 libXext                i686      1.3.3-3.el7               ol7_latest     38 k
 libXi                  i686      1.7.4-2.el7               ol7_latest     39 k
 libXtst                i686      1.2.2-2.1.el7             ol7_latest     19 k
 libaio                 i686      0.3.109-13.el7            ol7_latest     24 k
 libaio-devel           i686      0.3.109-13.el7            ol7_latest     12 k
 libaio-devel           x86_64    0.3.109-13.el7            ol7_latest     12 k
 libgcc                 i686      4.8.5-4.el7               ol7_latest    102 k
 libstdc++              i686      4.8.5-4.el7               ol7_latest    310 k
 libstdc++-devel        i686      4.8.5-4.el7               ol7_latest    1.5 M
 libxcb                 i686      1.11-4.el7                ol7_latest    201 k
 unixODBC               x86_64    2.3.1-11.el7              ol7_latest    412 k
 unixODBC-devel         x86_64    2.3.1-11.el7              ol7_latest     54 k
 zlib-devel             i686      1.2.7-15.el7              ol7_latest     49 k
 zlib-devel             x86_64    1.2.7-15.el7              ol7_latest     49 k
Updating:
 binutils               x86_64    2.23.52.0.1-55.el7        ol7_latest    5.0 M
 gcc                    x86_64    4.8.5-4.el7               ol7_latest     16 M
 gcc-c++                x86_64    4.8.5-4.el7               ol7_latest    7.2 M
 glibc                  x86_64    2.17-106.0.1.el7_2.6      ol7_latest    3.6 M
 glibc-devel            x86_64    2.17-106.0.1.el7_2.6      ol7_latest    1.0 M
 libX11                 x86_64    1.6.3-2.el7               ol7_latest    605 k
 libXext                x86_64    1.3.3-3.el7               ol7_latest     38 k
 libXi                  x86_64    1.7.4-2.el7               ol7_latest     39 k
 libaio                 x86_64    0.3.109-13.el7            ol7_latest     24 k
 libgcc                 x86_64    4.8.5-4.el7               ol7_latest     94 k
 libstdc++              x86_64    4.8.5-4.el7               ol7_latest    297 k
 libstdc++-devel        x86_64    4.8.5-4.el7               ol7_latest    1.5 M
 libxcb                 x86_64    1.11-4.el7                ol7_latest    189 k
Installing for dependencies:
 nss-softokn-freebl     i686      3.16.2.3-14.2.el7_2       ol7_latest    187 k
 zlib                   i686      1.2.7-15.el7              ol7_latest     90 k
Updating for dependencies:
 cpp                    x86_64    4.8.5-4.el7               ol7_latest    5.9 M
 gcc-gfortran           x86_64    4.8.5-4.el7               ol7_latest    6.6 M
 glibc-common           x86_64    2.17-106.0.1.el7_2.6      ol7_latest     11 M
 glibc-headers          x86_64    2.17-106.0.1.el7_2.6      ol7_latest    662 k
 libX11-common          noarch    1.6.3-2.el7               ol7_latest    161 k
 libgfortran            x86_64    4.8.5-4.el7               ol7_latest    292 k
 libgomp                x86_64    4.8.5-4.el7               ol7_latest    130 k
 libquadmath            x86_64    4.8.5-4.el7               ol7_latest    182 k
 libquadmath-devel      x86_64    4.8.5-4.el7               ol7_latest     45 k
 nss-softokn-freebl     x86_64    3.16.2.3-14.2.el7_2       ol7_latest    203 k
 zlib                   x86_64    1.2.7-15.el7              ol7_latest     89 k
 
Transaction Summary
================================================================================
Install  20 Packages (+ 2 Dependent packages)
Upgrade  13 Packages (+11 Dependent packages)
 
Total download size: 71 M
Downloading packages:
No Presto metadata available for ol7_latest
(1/46): compat-libstdc++-33-3.2.3-72.el7.i686.rpm          | 196 kB   00:00     
(2/46): binutils-2.23.52.0.1-55.el7.x86_64.rpm             | 5.0 MB   00:01     
(3/46): cpp-4.8.5-4.el7.x86_64.rpm                         | 5.9 MB   00:01     
(4/46): gcc-c++-4.8.5-4.el7.x86_64.rpm                     | 7.2 MB   00:02     
(5/46): gcc-4.8.5-4.el7.x86_64.rpm                         |  16 MB   00:03     
(6/46): glibc-2.17-106.0.1.el7_2.6.i686.rpm                | 4.2 MB   00:01     
(7/46): gcc-gfortran-4.8.5-4.el7.x86_64.rpm                | 6.6 MB   00:02     
(8/46): glibc-2.17-106.0.1.el7_2.6.x86_64.rpm              | 3.6 MB   00:01     
(9/46): glibc-devel-2.17-106.0.1.el7_2.6.i686.rpm          | 1.0 MB   00:00     
(10/46): glibc-devel-2.17-106.0.1.el7_2.6.x86_64.rpm       | 1.0 MB   00:00     
(11/46): glibc-headers-2.17-106.0.1.el7_2.6.x86_64.rpm     | 662 kB   00:00     
(12/46): ksh-20120801-22.el7_1.3.x86_64.rpm                | 880 kB   00:00     
(13/46): libX11-1.6.3-2.el7.i686.rpm                       | 609 kB   00:00     
(14/46): libX11-1.6.3-2.el7.x86_64.rpm                     | 605 kB   00:00     
(15/46): libX11-common-1.6.3-2.el7.noarch.rpm              | 161 kB   00:00     
(16/46): libXau-1.0.8-2.1.el7.i686.rpm                     |  28 kB   00:00     
(17/46): libXext-1.3.3-3.el7.i686.rpm                      |  38 kB   00:00     
(18/46): libXext-1.3.3-3.el7.x86_64.rpm                    |  38 kB   00:00     
(19/46): libXi-1.7.4-2.el7.i686.rpm                        |  39 kB   00:00     
(20/46): libXi-1.7.4-2.el7.x86_64.rpm                      |  39 kB   00:00     
(21/46): libXtst-1.2.2-2.1.el7.i686.rpm                    |  19 kB   00:00     
(22/46): libaio-0.3.109-13.el7.i686.rpm                    |  24 kB   00:00     
(23/46): libaio-0.3.109-13.el7.x86_64.rpm                  |  24 kB   00:00     
(24/46): libaio-devel-0.3.109-13.el7.i686.rpm              |  12 kB   00:00     
(25/46): glibc-common-2.17-106.0.1.el7_2.6.x86_64.rpm      |  11 MB   00:04     
(26/46): libaio-devel-0.3.109-13.el7.x86_64.rpm            |  12 kB   00:00     
(27/46): libgcc-4.8.5-4.el7.i686.rpm                       | 102 kB   00:00     
(28/46): libgfortran-4.8.5-4.el7.x86_64.rpm                | 292 kB   00:00     
(29/46): libgomp-4.8.5-4.el7.x86_64.rpm                    | 130 kB   00:00     
(30/46): libgcc-4.8.5-4.el7.x86_64.rpm                     |  94 kB   00:00     
(31/46): libquadmath-4.8.5-4.el7.x86_64.rpm                | 182 kB   00:00     
(32/46): libquadmath-devel-4.8.5-4.el7.x86_64.rpm          |  45 kB   00:00     
(33/46): libstdc++-4.8.5-4.el7.i686.rpm                    | 310 kB   00:00     
(34/46): libstdc++-4.8.5-4.el7.x86_64.rpm                  | 297 kB   00:00     
(35/46): libstdc++-devel-4.8.5-4.el7.i686.rpm              | 1.5 MB   00:00     
(36/46): libstdc++-devel-4.8.5-4.el7.x86_64.rpm            | 1.5 MB   00:00     
(37/46): libxcb-1.11-4.el7.x86_64.rpm                      | 189 kB   00:00     
(38/46): libxcb-1.11-4.el7.i686.rpm                        | 201 kB   00:00     
(39/46): nss-softokn-freebl-3.16.2.3-14.2.el7_2.x86_64.rpm | 203 kB   00:00     
(40/46): nss-softokn-freebl-3.16.2.3-14.2.el7_2.i686.rpm   | 187 kB   00:00     
(41/46): unixODBC-devel-2.3.1-11.el7.x86_64.rpm            |  54 kB   00:00     
(42/46): unixODBC-2.3.1-11.el7.x86_64.rpm                  | 412 kB   00:00     
(43/46): zlib-1.2.7-15.el7.i686.rpm                        |  90 kB   00:00     
(44/46): zlib-1.2.7-15.el7.x86_64.rpm                      |  89 kB   00:00     
(45/46): zlib-devel-1.2.7-15.el7.x86_64.rpm                |  49 kB   00:00     
(46/46): zlib-devel-1.2.7-15.el7.i686.rpm                  |  49 kB   00:00     
--------------------------------------------------------------------------------
Total                                              5.2 MB/s |  71 MB  00:13     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Updating   : libgcc-4.8.5-4.el7.x86_64                                   1/70 
  Updating   : glibc-common-2.17-106.0.1.el7_2.6.x86_64                    2/70 
  Updating   : nss-softokn-freebl-3.16.2.3-14.2.el7_2.x86_64               3/70 
  Updating   : glibc-2.17-106.0.1.el7_2.6.x86_64                           4/70 
  Updating   : zlib-1.2.7-15.el7.x86_64                                    5/70 
  Updating   : libquadmath-4.8.5-4.el7.x86_64                              6/70 
  Updating   : libstdc++-4.8.5-4.el7.x86_64                                7/70 
  Updating   : glibc-headers-2.17-106.0.1.el7_2.6.x86_64                   8/70 
  Updating   : libX11-common-1.6.3-2.el7.noarch                            9/70 
  Installing : nss-softokn-freebl-3.16.2.3-14.2.el7_2.i686                10/70 
  Installing : glibc-2.17-106.0.1.el7_2.6.i686                            11/70 
  Installing : libgcc-4.8.5-4.el7.i686                                    12/70 
  Installing : glibc-devel-2.17-106.0.1.el7_2.6.i686                      13/70 
  Updating   : libgfortran-4.8.5-4.el7.x86_64                             14/70 
  Updating   : cpp-4.8.5-4.el7.x86_64                                     15/70 
  Updating   : binutils-2.23.52.0.1-55.el7.x86_64                         16/70 
  Updating   : libaio-0.3.109-13.el7.x86_64                               17/70 
  Installing : unixODBC-2.3.1-11.el7.x86_64                               18/70 
  Updating   : libgomp-4.8.5-4.el7.x86_64                                 19/70 
  Updating   : gcc-4.8.5-4.el7.x86_64                                     20/70 
  Updating   : libquadmath-devel-4.8.5-4.el7.x86_64                       21/70 
  Updating   : libxcb-1.11-4.el7.x86_64                                   22/70 
  Updating   : libX11-1.6.3-2.el7.x86_64                                  23/70 
  Updating   : libXext-1.3.3-3.el7.x86_64                                 24/70 
  Updating   : libXi-1.7.4-2.el7.x86_64                                   25/70 
  Updating   : gcc-gfortran-4.8.5-4.el7.x86_64                            26/70 
  Installing : unixODBC-devel-2.3.1-11.el7.x86_64                         27/70 
  Installing : libaio-devel-0.3.109-13.el7.x86_64                         28/70 
  Updating   : glibc-devel-2.17-106.0.1.el7_2.6.x86_64                    29/70 
  Updating   : libstdc++-devel-4.8.5-4.el7.x86_64                         30/70 
  Installing : zlib-devel-1.2.7-15.el7.x86_64                             31/70 
  Installing : ksh-20120801-22.el7_1.3.x86_64                             32/70 
  Installing : libstdc++-4.8.5-4.el7.i686                                 33/70 
  Installing : libstdc++-devel-4.8.5-4.el7.i686                           34/70 
  Installing : libXau-1.0.8-2.1.el7.i686                                  35/70 
  Installing : libxcb-1.11-4.el7.i686                                     36/70 
  Installing : libX11-1.6.3-2.el7.i686                                    37/70 
  Installing : libXext-1.3.3-3.el7.i686                                   38/70 
  Installing : libXi-1.7.4-2.el7.i686                                     39/70 
  Installing : libaio-0.3.109-13.el7.i686                                 40/70 
  Installing : zlib-1.2.7-15.el7.i686                                     41/70 
  Installing : zlib-devel-1.2.7-15.el7.i686                               42/70 
  Installing : libaio-devel-0.3.109-13.el7.i686                           43/70 
  Updating   : gcc-c++-4.8.5-4.el7.x86_64                                 44/70 
  Installing : libXtst-1.2.2-2.1.el7.i686                                 45/70 
  Installing : compat-libstdc++-33-3.2.3-72.el7.i686                      46/70 
  Cleanup    : gcc-gfortran-4.8.3-9.el7.x86_64                            47/70 
  Cleanup    : gcc-c++-4.8.3-9.el7.x86_64                                 48/70 
  Cleanup    : libgfortran-4.8.3-9.el7.x86_64                             49/70 
  Cleanup    : libXi-1.7.2-2.1.el7.x86_64                                 50/70 
  Cleanup    : libquadmath-devel-4.8.3-9.el7.x86_64                       51/70 
  Cleanup    : libstdc++-devel-4.8.3-9.el7.x86_64                         52/70 
  Cleanup    : gcc-4.8.3-9.el7.x86_64                                     53/70 
  Cleanup    : glibc-devel-2.17-78.0.1.el7.x86_64                         54/70 
  Cleanup    : binutils-2.23.52.0.1-30.el7_1.2.x86_64                     55/70 
  Cleanup    : cpp-4.8.3-9.el7.x86_64                                     56/70 
  Cleanup    : libstdc++-4.8.3-9.el7.x86_64                               57/70 
  Cleanup    : libXext-1.3.2-2.1.el7.x86_64                               58/70 
  Cleanup    : glibc-headers-2.17-78.0.1.el7.x86_64                       59/70 
  Cleanup    : libX11-1.6.0-2.1.el7.x86_64                                60/70 
  Cleanup    : libxcb-1.9-5.el7.x86_64                                    61/70 
  Cleanup    : zlib-1.2.7-13.el7.x86_64                                   62/70 
  Cleanup    : libgomp-4.8.3-9.el7.x86_64                                 63/70 
  Cleanup    : libquadmath-4.8.3-9.el7.x86_64                             64/70 
  Cleanup    : libaio-0.3.109-12.el7.x86_64                               65/70 
  Cleanup    : libX11-common-1.6.0-2.1.el7.noarch                         66/70 
  Cleanup    : glibc-common-2.17-78.0.1.el7.x86_64                        67/70 
  Cleanup    : nss-softokn-freebl-3.16.2.3-12.el7_1.x86_64                68/70 
  Cleanup    : glibc-2.17-78.0.1.el7.x86_64                               69/70 
  Cleanup    : libgcc-4.8.3-9.el7.x86_64                                  70/70 
  Verifying  : libXext-1.3.3-3.el7.x86_64                                  1/70 
  Verifying  : libgcc-4.8.5-4.el7.i686                                     2/70 
  Verifying  : gcc-4.8.5-4.el7.x86_64                                      3/70 
  Verifying  : glibc-devel-2.17-106.0.1.el7_2.6.i686                       4/70 
  Verifying  : libXext-1.3.3-3.el7.i686                                    5/70 
  Verifying  : libstdc++-4.8.5-4.el7.i686                                  6/70 
  Verifying  : glibc-2.17-106.0.1.el7_2.6.x86_64                           7/70 
  Verifying  : libxcb-1.11-4.el7.i686                                      8/70 
  Verifying  : gcc-c++-4.8.5-4.el7.x86_64                                  9/70 
  Verifying  : zlib-devel-1.2.7-15.el7.x86_64                             10/70 
  Verifying  : libaio-devel-0.3.109-13.el7.i686                           11/70 
  Verifying  : libX11-1.6.3-2.el7.x86_64                                  12/70 
  Verifying  : glibc-common-2.17-106.0.1.el7_2.6.x86_64                   13/70 
  Verifying  : unixODBC-devel-2.3.1-11.el7.x86_64                         14/70 
  Verifying  : libXau-1.0.8-2.1.el7.i686                                  15/70 
  Verifying  : libaio-0.3.109-13.el7.i686                                 16/70 
  Verifying  : zlib-1.2.7-15.el7.x86_64                                   17/70 
  Verifying  : ksh-20120801-22.el7_1.3.x86_64                             18/70 
  Verifying  : libaio-0.3.109-13.el7.x86_64                               19/70 
  Verifying  : libXtst-1.2.2-2.1.el7.i686                                 20/70 
  Verifying  : glibc-2.17-106.0.1.el7_2.6.i686                            21/70 
  Verifying  : libstdc++-4.8.5-4.el7.x86_64                               22/70 
  Verifying  : libX11-common-1.6.3-2.el7.noarch                           23/70 
  Verifying  : zlib-devel-1.2.7-15.el7.i686                               24/70 
  Verifying  : unixODBC-2.3.1-11.el7.x86_64                               25/70 
  Verifying  : libgfortran-4.8.5-4.el7.x86_64                             26/70 
  Verifying  : libstdc++-devel-4.8.5-4.el7.i686                           27/70 
  Verifying  : gcc-gfortran-4.8.5-4.el7.x86_64                            28/70 
  Verifying  : libaio-devel-0.3.109-13.el7.x86_64                         29/70 
  Verifying  : nss-softokn-freebl-3.16.2.3-14.2.el7_2.x86_64              30/70 
  Verifying  : glibc-headers-2.17-106.0.1.el7_2.6.x86_64                  31/70 
  Verifying  : zlib-1.2.7-15.el7.i686                                     32/70 
  Verifying  : libstdc++-devel-4.8.5-4.el7.x86_64                         33/70 
  Verifying  : libXi-1.7.4-2.el7.x86_64                                   34/70 
  Verifying  : cpp-4.8.5-4.el7.x86_64                                     35/70 
  Verifying  : compat-libstdc++-33-3.2.3-72.el7.i686                      36/70 
  Verifying  : libX11-1.6.3-2.el7.i686                                    37/70 
  Verifying  : libgomp-4.8.5-4.el7.x86_64                                 38/70 
  Verifying  : libgcc-4.8.5-4.el7.x86_64                                  39/70 
  Verifying  : binutils-2.23.52.0.1-55.el7.x86_64                         40/70 
  Verifying  : libquadmath-devel-4.8.5-4.el7.x86_64                       41/70 
  Verifying  : libXi-1.7.4-2.el7.i686                                     42/70 
  Verifying  : glibc-devel-2.17-106.0.1.el7_2.6.x86_64                    43/70 
  Verifying  : nss-softokn-freebl-3.16.2.3-14.2.el7_2.i686                44/70 
  Verifying  : libquadmath-4.8.5-4.el7.x86_64                             45/70 
  Verifying  : libxcb-1.11-4.el7.x86_64                                   46/70 
  Verifying  : glibc-common-2.17-78.0.1.el7.x86_64                        47/70 
  Verifying  : libX11-common-1.6.0-2.1.el7.noarch                         48/70 
  Verifying  : libxcb-1.9-5.el7.x86_64                                    49/70 
  Verifying  : libgfortran-4.8.3-9.el7.x86_64                             50/70 
  Verifying  : glibc-2.17-78.0.1.el7.x86_64                               51/70 
  Verifying  : libaio-0.3.109-12.el7.x86_64                               52/70 
  Verifying  : cpp-4.8.3-9.el7.x86_64                                     53/70 
  Verifying  : libstdc++-devel-4.8.3-9.el7.x86_64                         54/70 
  Verifying  : libX11-1.6.0-2.1.el7.x86_64                                55/70 
  Verifying  : gcc-gfortran-4.8.3-9.el7.x86_64                            56/70 
  Verifying  : libquadmath-devel-4.8.3-9.el7.x86_64                       57/70 
  Verifying  : libXi-1.7.2-2.1.el7.x86_64                                 58/70 
  Verifying  : glibc-devel-2.17-78.0.1.el7.x86_64                         59/70 
  Verifying  : gcc-c++-4.8.3-9.el7.x86_64                                 60/70 
  Verifying  : nss-softokn-freebl-3.16.2.3-12.el7_1.x86_64                61/70 
  Verifying  : libgcc-4.8.3-9.el7.x86_64                                  62/70 
  Verifying  : binutils-2.23.52.0.1-30.el7_1.2.x86_64                     63/70 
  Verifying  : glibc-headers-2.17-78.0.1.el7.x86_64                       64/70 
  Verifying  : gcc-4.8.3-9.el7.x86_64                                     65/70 
  Verifying  : zlib-1.2.7-13.el7.x86_64                                   66/70 
  Verifying  : libXext-1.3.2-2.1.el7.x86_64                               67/70 
  Verifying  : libstdc++-4.8.3-9.el7.x86_64                               68/70 
  Verifying  : libgomp-4.8.3-9.el7.x86_64                                 69/70 
  Verifying  : libquadmath-4.8.3-9.el7.x86_64                             70/70 
 
Installed:
  compat-libstdc++-33.i686 0:3.2.3-72.el7  glibc.i686 0:2.17-106.0.1.el7_2.6    
  glibc-devel.i686 0:2.17-106.0.1.el7_2.6  ksh.x86_64 0:20120801-22.el7_1.3     
  libX11.i686 0:1.6.3-2.el7                libXau.i686 0:1.0.8-2.1.el7          
  libXext.i686 0:1.3.3-3.el7               libXi.i686 0:1.7.4-2.el7             
  libXtst.i686 0:1.2.2-2.1.el7             libaio.i686 0:0.3.109-13.el7         
  libaio-devel.i686 0:0.3.109-13.el7       libaio-devel.x86_64 0:0.3.109-13.el7 
  libgcc.i686 0:4.8.5-4.el7                libstdc++.i686 0:4.8.5-4.el7         
  libstdc++-devel.i686 0:4.8.5-4.el7       libxcb.i686 0:1.11-4.el7             
  unixODBC.x86_64 0:2.3.1-11.el7           unixODBC-devel.x86_64 0:2.3.1-11.el7 
  zlib-devel.i686 0:1.2.7-15.el7           zlib-devel.x86_64 0:1.2.7-15.el7     
 
Dependency Installed:
  nss-softokn-freebl.i686 0:3.16.2.3-14.2.el7_2     zlib.i686 0:1.2.7-15.el7    
 
Updated:
  binutils.x86_64 0:2.23.52.0.1-55.el7                                          
  gcc.x86_64 0:4.8.5-4.el7                                                      
  gcc-c++.x86_64 0:4.8.5-4.el7                                                  
  glibc.x86_64 0:2.17-106.0.1.el7_2.6                                           
  glibc-devel.x86_64 0:2.17-106.0.1.el7_2.6                                     
  libX11.x86_64 0:1.6.3-2.el7                                                   
  libXext.x86_64 0:1.3.3-3.el7                                                  
  libXi.x86_64 0:1.7.4-2.el7                                                    
  libaio.x86_64 0:0.3.109-13.el7                                                
  libgcc.x86_64 0:4.8.5-4.el7                                                   
  libstdc++.x86_64 0:4.8.5-4.el7                                                
  libstdc++-devel.x86_64 0:4.8.5-4.el7                                          
  libxcb.x86_64 0:1.11-4.el7                                                    
 
Dependency Updated:
  cpp.x86_64 0:4.8.5-4.el7                                                      
  gcc-gfortran.x86_64 0:4.8.5-4.el7                                             
  glibc-common.x86_64 0:2.17-106.0.1.el7_2.6                                    
  glibc-headers.x86_64 0:2.17-106.0.1.el7_2.6                                   
  libX11-common.noarch 0:1.6.3-2.el7                                            
  libgfortran.x86_64 0:4.8.5-4.el7                                              
  libgomp.x86_64 0:4.8.5-4.el7                                                  
  libquadmath.x86_64 0:4.8.5-4.el7                                              
  libquadmath-devel.x86_64 0:4.8.5-4.el7                                        
  nss-softokn-freebl.x86_64 0:3.16.2.3-14.2.el7_2                               
  zlib.x86_64 0:1.2.7-15.el7                                                    
 
Complete!

After you have installed the prerequisites, you install the oracle-dbms-server-12cR1-preinstall library as the root user. You run the command as the root user like this:

yum install -y oracle-dbms-server-12cR1-preinstall

You should see the following when it’s successful:

Loaded plugins: langpacks
adobe-linux-x86_64                                       |  951 B     00:00     
ol7_UEKR3                                                | 1.2 kB     00:00     
ol7_latest                                               | 1.4 kB     00:00     
(1/2): ol7_latest/x86_64/updateinfo                      | 829 kB     00:00     
(2/2): ol7_latest/x86_64/primary                         |  16 MB     00:02     
ol7_latest                                                          14500/14500
Resolving Dependencies
--> Running transaction check
---> Package oracle-rdbms-server-12cR1-preinstall.x86_64 0:1.0-4.el7 will be installed
--> Finished Dependency Resolution
 
Dependencies Resolved
 
================================================================================
 Package                                Arch     Version     Repository    Size
================================================================================
Installing:
 oracle-rdbms-server-12cR1-preinstall   x86_64   1.0-4.el7   ol7_latest    18 k
 
Transaction Summary
================================================================================
Install  1 Package
 
Total download size: 18 k
Installed size: 43 k
Downloading packages:
oracle-rdbms-server-12cR1-preinstall-1.0-4.el7.x86_64.rpm  |  18 kB   00:00     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : oracle-rdbms-server-12cR1-preinstall-1.0-4.el7.x86_64        1/1 
  Verifying  : oracle-rdbms-server-12cR1-preinstall-1.0-4.el7.x86_64        1/1 
 
Installed:
  oracle-rdbms-server-12cR1-preinstall.x86_64 0:1.0-4.el7                       
 
Complete!

After running the oracle-dbms-server-12cR1-preinstall library, you can navigate through the Applications, Sundry, and Users and Groups to see the following dialog:

OracleUserCreated

It’s hard to tell from the GUI the oracle user’s group. You can find oracle primary user’s group by checking the /etc/passwd file. You will find that oinstall is the primary user’s group.

As always, I hope this helps those trying to install an Oracle Database 12c instance. Please post a comment if you have a better way to load the pre-requisite packages.

Written by maclochlainn

May 31st, 2016 at 2:44 am

Linux User-Group Console

without comments

This post shows you how to add the menu option and GUI to set users and groups. It’s quite a bit easier than mastering all the command-line syntax. It makes setting up the required user and group accounts for an Oracle Enterprise or MySQL database solution much easier.

You add the utility by calling the yum (Yellowdog Updater, Modified) utility like this:

yum installed -y system-config_users

You should see the following:

Loaded plugins: langpacks
adobe-linux-x86_64                                       |  951 B     00:00     
ol7_UEKR3                                                | 1.2 kB     00:00     
ol7_latest                                               | 1.4 kB     00:00     
Resolving Dependencies
--> Running transaction check
---> Package system-config-users.noarch 0:1.3.5-2.el7 will be installed
--> Processing Dependency: system-config-users-docs for package: system-config-users-1.3.5-2.el7.noarch
--> Running transaction check
---> Package system-config-users-docs.noarch 0:1.0.9-6.el7 will be installed
--> Processing Dependency: rarian-compat for package: system-config-users-docs-1.0.9-6.el7.noarch
--> Running transaction check
---> Package rarian-compat.x86_64 0:0.8.1-11.el7 will be installed
--> Processing Dependency: rarian = 0.8.1-11.el7 for package: rarian-compat-0.8.1-11.el7.x86_64
--> Processing Dependency: rarian for package: rarian-compat-0.8.1-11.el7.x86_64
--> Processing Dependency: librarian.so.0()(64bit) for package: rarian-compat-0.8.1-11.el7.x86_64
--> Running transaction check
---> Package rarian.x86_64 0:0.8.1-11.el7 will be installed
--> Finished Dependency Resolution
 
Dependencies Resolved
 
================================================================================
 Package                      Arch       Version           Repository      Size
================================================================================
Installing:
 system-config-users          noarch     1.3.5-2.el7       ol7_latest     337 k
Installing for dependencies:
 rarian                       x86_64     0.8.1-11.el7      ol7_latest      97 k
 rarian-compat                x86_64     0.8.1-11.el7      ol7_latest      65 k
 system-config-users-docs     noarch     1.0.9-6.el7       ol7_latest     307 k
 
Transaction Summary
================================================================================
Install  1 Package (+3 Dependent packages)
 
Total download size: 805 k
Installed size: 3.9 M
Downloading packages:
(1/4): rarian-0.8.1-11.el7.x86_64.rpm                      |  97 kB   00:00     
(2/4): rarian-compat-0.8.1-11.el7.x86_64.rpm               |  65 kB   00:00     
(3/4): system-config-users-1.3.5-2.el7.noarch.rpm          | 337 kB   00:00     
(4/4): system-config-users-docs-1.0.9-6.el7.noarch.rpm     | 307 kB   00:00     
--------------------------------------------------------------------------------
Total                                              830 kB/s | 805 kB  00:00     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : rarian-0.8.1-11.el7.x86_64                                   1/4 
  Installing : rarian-compat-0.8.1-11.el7.x86_64                            2/4 
  Installing : system-config-users-1.3.5-2.el7.noarch                       3/4 
  Installing : system-config-users-docs-1.0.9-6.el7.noarch                  4/4 
  Verifying  : rarian-compat-0.8.1-11.el7.x86_64                            1/4 
  Verifying  : system-config-users-1.3.5-2.el7.noarch                       2/4 
  Verifying  : rarian-0.8.1-11.el7.x86_64                                   3/4 
  Verifying  : system-config-users-docs-1.0.9-6.el7.noarch                  4/4 
 
Installed:
  system-config-users.noarch 0:1.3.5-2.el7                                      
 
Dependency Installed:
  rarian.x86_64 0:0.8.1-11.el7                                                  
  rarian-compat.x86_64 0:0.8.1-11.el7                                           
  system-config-users-docs.noarch 0:1.0.9-6.el7                                 
 
Complete!

After successfully installing the radian, rarian-compat, system-config-users, and system-config-users-docs packages, you will find that there’s now a Users and Groups option when you navigate by clicking on Applications and then clicking on Sundry from the menu.

Menu Instructions

SQLDeveloper1

  1. You navigate to the Applications menu, and choose Sundry from the menu list and Users and Groups from the menu item to continue.

SQLDeveloper1

  1. You will be prompted for the sudoer’s password in this dialog.

SQLDeveloper1

  1. At this point, you can use the GUI interface to set users and groups.

As always, I hope this helps those trying to set users and passwords without mastering the command-line syntax.

Written by maclochlainn

May 29th, 2016 at 4:32 pm

Fix VMware Networking

with 3 comments

Occasionally, my students loose their network connection when copying their virtual machines. This article shows you how to rebuild your Internet connection.

The first step requires you to identify the port number on your host operating system, which is typically Windows OS or Mac OS X. You can find that by running the following search from a Mac OS X Terminal session or Windows OS Command session.

If you’re on the Mac OS X, you launch a Terminal session and then use the sudo command to open a shell as the root super user, like this:

sudo sh

As the root super user on Mac OS X , you run the netstat command like this:

sh-3.2# netstat -a | grep 1.ntp | grep -v grep
udp4       0      0  192.168.147.1.ntp      *.*

VMware uses the same subdomain with one difference for the gateway, it uses node 2:

192.168.147.2

The alternate syntax to find Vmware’s subdomain requires you to use an Administrator account on Windows, like this:

C:\> netstat -a | findstr /C:.ntp

After you determine the subdomain, you need to ensure VMware is configured correctly. You navigate to the menu and choose Virtual Machine and then Settings from the dropdown menu. The software shows you the following:

Linux7Network1

Then, click on the Network Adapter under the Removable Devices, and you see the following screen:

Linux71Network2

You need to make sure that you’re using Internet Sharing, or Share with my Mac. If you’re not using it select it now.

Launch the hosted Linux OS and open a Terminal seesion. Inside the Terminal, you should find the machine’s address as the root address with the ifconfig utility. The technique follows:

[student@localhost ~]$ sudo sh
[sudo] password for student: 
sh-4.2# ifconfig
eno16777736: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        ether 00:0c:29:70:77:64  txqueuelen 1000  (Ethernet)
        RX packets 34  bytes 4190 (4.0 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
 
lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 0  (Local Loopback)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Next, you need to edit some files, they assume the VMware Network Gateway is 192.168.147.2 and the machine’s address is “00:0c:29:70:77:64“. The first file you need to edit is the /etc/resolv.conf file, and it should look like this:

domain localdomain
search localdomain
nameserver 192.168.147.2

The second file you need to edit is the /etc/sysconfig/network file. It should look like this:

# Created by anaconda
NETWORKING=yes
HOSTNAME=localhost.localdomain
GATEWAY=192.168.147.2

The third file you need to edit is the /etc/sysconfig/network-scripts/ifcfg-eth0 file. It should look like this:

DEVICE=eth0
HWADDR=00:0c:29:70:77:64
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=dhcp
TYPE=Ethernet
DNS1=192.168.147.2
USERCTL=no
PEERDNS=yes
IPV6INIT=no

The last step requires that you reboot the machine or run the /etc/rc.d/init.d/network to restart the network. I hope this helps those trying to restore their VMware hosted operating systems network connection.

Written by maclochlainn

May 26th, 2016 at 12:58 am

Mac SQL Developer Install

without comments

This how you install SQL Developer on Mac OS Yosemite. The first thing you need to do is download and install Java 8, not Java 7 on your Mac OS Yosemite as suggested on some web sites. You can determine whether or not Java is installed by running the following command:

Mac-Pro-3:~ username$ java -version
No Java runtime present, requesting install.

You must accept the Java license to install Java 8 on the Mac OS X operating system:

YosemiteInstallJava_01

You have the option of installing the Java SDK or JDK. I’ve opted to install Netbeans 8 with JDK 8u45, as you can tell from the screen capture after you launched the file:

YosemiteInstallJava_02

It is a standard Mac OS installation, which is why I didn’t bother showing any dialog messages. After installing the Java JDK or SDK, you should download SQL Developer 4.1 from Oracle’s web site. Below is a screen shot of the Oracle download web page where I’ve accepted the license agreement:

SQLDeveloperDownload

If you attempt to launch the installation and you’ve set your Mac Security to the “Mac App Store and identified developers” setting, you should raise the following exception:

SQLDeveloperInstall_01

If you reset the Mac Security to an “Anywhere” setting, you can install Oracle SQL Developer on Yosemite. Just make sure you reset it to the “Mac App Store and identified developers” setting after you install SQL Developer.

If you launch SQL Developer with the Security “Anywhere” setting, it displays the following dialog:

SQLDeveloperInstall_02

After you launch the program, you will see the following progress dialog:

SQLDeveloperInstall_03

The last step of the installation launches SQL Developer, as shown below:

SQLDeveloperInstall_04

Click the Connections icon to create an initial connection, like the following:

SQLDeveloperInstall_05

After connecting to the database, you can write and execute a query as shown in the next screen capture:

SQLDeveloperInstall_06

As always, I hope that this helps those who require an example to install SQL Server on a Mac OS.

Written by maclochlainn

June 12th, 2015 at 3:08 am

SQL Developer – Fedora

with 3 comments

This is the continuation of my efforts to stage an awesome Fedora developer’s instance. It shows you how to install Java 1.8 software development kit, which is nice to have. Though you can’t use Java 1.8 officially with Oracle SQL Developer 4.0.3 it is required for Oracle SQL Developer 4.1. Fortunately, the Oracle Product Manager, Jeff Smith has advised us that you can use Java 1.8 JDK with Oracle SQL Developer 4.0.3, and he’s written a comment to the blog post that it runs better with the Java 1.8 SDK.

After you install Oracle SQL Developer 4.0.3 or Oracle SQL Developer 4.1, you can watch Jeff Smith’s YouTube Video on SQL Developer 3.1 to learn how to use the basics of SQL Developer. I couldn’t find an updated version of the video for SQL Developer 4 but I didn’t try too hard.

You use yum as the root user to install Java SDK 1.8, much like my earlier Installing the Java SDK 1.7 and Java-MySQL Sample Program. The following command installs Java 8:

yum install -y java-1.8*

It produces the following output:

Loaded plugins: langpacks, refresh-packagekit
fedora/20/x86_64/metalink                                   |  18 kB  00:00     
mysql-connectors-community                                  | 2.5 kB  00:00     
mysql-tools-community                                       | 2.5 kB  00:00     
mysql56-community                                           | 2.5 kB  00:00     
pgdg93                                                      | 3.6 kB  00:00     
updates/20/x86_64/metalink                                  |  16 kB  00:00     
updates                                                     | 4.9 kB  00:00     
(1/2): mysql-tools-community/20/x86_64/primary_db           |  21 kB  00:00     
(2/2): updates/20/x86_64/primary_db                         |  13 MB  00:09     
updates/20/x86_64/pkgtags
updates
(1/2): updates/20/x86_64/pkgtags                            | 1.4 MB  00:02     
(2/2): updates/20/x86_64/updateinfo                         | 1.9 MB  00:04     
Package 1:java-1.8.0-openjdk-headless-1.8.0.31-1.b13.fc20.x86_64 already installed and latest version
Package 1:java-1.8.0-openjdk-javadoc-1.8.0.31-1.b13.fc20.noarch already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package java-1.8.0-openjdk.x86_64 1:1.8.0.31-1.b13.fc20 will be installed
---> Package java-1.8.0-openjdk-accessibility.x86_64 1:1.8.0.31-1.b13.fc20 will be installed
---> Package java-1.8.0-openjdk-demo.x86_64 1:1.8.0.31-1.b13.fc20 will be installed
---> Package java-1.8.0-openjdk-devel.x86_64 1:1.8.0.31-1.b13.fc20 will be installed
---> Package java-1.8.0-openjdk-src.x86_64 1:1.8.0.31-1.b13.fc20 will be installed
--> Finished Dependency Resolution
 
Dependencies Resolved
 
================================================================================
 Package                          Arch   Version                  Repository
                                                                           Size
================================================================================
Installing:
 java-1.8.0-openjdk               x86_64 1:1.8.0.31-1.b13.fc20    updates 201 k
 java-1.8.0-openjdk-accessibility x86_64 1:1.8.0.31-1.b13.fc20    updates  12 k
 java-1.8.0-openjdk-demo          x86_64 1:1.8.0.31-1.b13.fc20    updates 1.9 M
 java-1.8.0-openjdk-devel         x86_64 1:1.8.0.31-1.b13.fc20    updates 9.2 M
 java-1.8.0-openjdk-src           x86_64 1:1.8.0.31-1.b13.fc20    updates  45 M
 
Transaction Summary
================================================================================
Install  5 Packages
 
Total download size: 56 M
Installed size: 92 M
Downloading packages:
(1/5): java-1.8.0-openjdk-accessibility-1.8.0.31-1.b13.fc20 |  12 kB  00:00     
(2/5): java-1.8.0-openjdk-1.8.0.31-1.b13.fc20.x86_64.rpm    | 201 kB  00:02     
(3/5): java-1.8.0-openjdk-demo-1.8.0.31-1.b13.fc20.x86_64.r | 1.9 MB  00:03     
(4/5): java-1.8.0-openjdk-devel-1.8.0.31-1.b13.fc20.x86_64. | 9.2 MB  00:07     
(5/5): java-1.8.0-openjdk-src-1.8.0.31-1.b13.fc20.x86_64.rp |  45 MB  05:05     
--------------------------------------------------------------------------------
Total                                              187 kB/s |  56 MB  05:05     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction (shutdown inhibited)
  Installing : 1:java-1.8.0-openjdk-1.8.0.31-1.b13.fc20.x86_64              1/5 
  Installing : 1:java-1.8.0-openjdk-devel-1.8.0.31-1.b13.fc20.x86_64        2/5 
  Installing : 1:java-1.8.0-openjdk-demo-1.8.0.31-1.b13.fc20.x86_64         3/5 
  Installing : 1:java-1.8.0-openjdk-accessibility-1.8.0.31-1.b13.fc20.x86   4/5 
  Installing : 1:java-1.8.0-openjdk-src-1.8.0.31-1.b13.fc20.x86_64          5/5 
  Verifying  : 1:java-1.8.0-openjdk-devel-1.8.0.31-1.b13.fc20.x86_64        1/5 
  Verifying  : 1:java-1.8.0-openjdk-demo-1.8.0.31-1.b13.fc20.x86_64         2/5 
  Verifying  : 1:java-1.8.0-openjdk-1.8.0.31-1.b13.fc20.x86_64              3/5 
  Verifying  : 1:java-1.8.0-openjdk-accessibility-1.8.0.31-1.b13.fc20.x86   4/5 
  Verifying  : 1:java-1.8.0-openjdk-src-1.8.0.31-1.b13.fc20.x86_64          5/5 
 
Installed:
  java-1.8.0-openjdk.x86_64 1:1.8.0.31-1.b13.fc20                               
  java-1.8.0-openjdk-accessibility.x86_64 1:1.8.0.31-1.b13.fc20                 
  java-1.8.0-openjdk-demo.x86_64 1:1.8.0.31-1.b13.fc20                          
  java-1.8.0-openjdk-devel.x86_64 1:1.8.0.31-1.b13.fc20                         
  java-1.8.0-openjdk-src.x86_64 1:1.8.0.31-1.b13.fc20                           
 
Complete!

Then, you go to Oracle’s SQL Developer 4.0.3 web page or Oracle’s Beta SQL Developer 4.1 web page and download the SQL Developer RPM. At the time of writing, you download the following SQL Developer 4.0.3 RPM:

sqldeveloper-4.0.3.16.84-1.noarch.rpm

Assuming you download the sqldeveloper-4.0.3.16.84-1.noarch.rpm file to the student user’s account. It will download into the /home/student/Downloads directory. You run the SQL Developer RPM file with the following syntax as the root user:

rpm -Uhv /home/student/Downloads/sqldeveloper-4.0.3.16.84-1.noarch.rpm

Running the SQL Developer RPM produces the following output:

Preparing...                          ################################# [100%]
Updating / installing...
   1:sqldeveloper-4.0.3.16.84-1       ################################# [100%]

You can now run the sqldeveloper.sh file as the root user with the following syntax:

/opt/sqldeveloper/sqldeveloper.sh

At this point, it’s important to note that my download from the Oracle SQL Developer 4.1 page turned out to be SQL Developer 4.0.3. It prompts you for the correct Java JDK, as shown below. You may opt to enter the path to the Java JDK 1.8 for SQL Developer 4.1 because until today you downloaded the Oracle SQL Developer 4.0.3 version from the Oracle SQL Developer 4.1 page. Naturally, the Oracle SQL Developer 4.1 instructions say to use the Java 1.8 JDK on the RPM for Linux Installation Notes web page, as shown below:

SQLDevRPMLinuxNotes

If you assume from the instructions on the Oracle instruction page above that Oracle SQL Developer 4.0.3 and Oracle SQL Developer 4.1 support Java 1.8 JDK, you may enter the location for the Java JDK 1.8 when prompted. Jeff Smith, the Product Manager wrote this blog post on Oracle SQL Developer 4: Windows and the JDK. Unfortunately, you’ll see the following message if you attempt to run Oracle SQL Developer 4.0.3 with the Java 1.8 SDK at the command-line:

 Oracle SQL Developer
 Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
 
Type the full pathname of a JDK installation (or Ctrl-C to quit), the path will be stored in /root/.sqldeveloper/4.0.0/product.conf
/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.31.x86_64
OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=256M; support was removed in 8.0

It also raises the following error message dialog:

SQLDev_JVMErrorMsg

Text version of Unsupported JDK Version error message:

You are attempting to run with Java 1.8.0_31.

Running this product is supported with a minimum Java version of 1.7.0_51 and a maximum version less than 1.8.

Update the SetJavaHome in “/root/.sqldeveloper/4.0.0/product.conf” to point to another Java.

This produce will not be supported, and may not run correctly if you proceed. Continue anyway?

The error dialog message tells us that the instructions on the RPM for Linux Installation Notes web page can be misleading. You really need to use the Java JDK 1.7 to be supported officially, but you can safely ignore the error.

If you want a certified component, leave the “Skip This Message Next Time” checkbox unchecked and click the “No” button to continue. At this point, there’s no automatic recovery. You need to open the following file:

/root/.sqldeveloper/4.0.0/product.conf

You need to change the SetJavaHome parameter in the file to the following:

# SetJavaHome /path/jdk
SetJavaHome /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.79-2.5.5.0.fc20.x86_64

After making the change, you can re-run the sqldeveloper.sh shell as follows:

/opt/sqldeveloper/sqldeveloper.sh

It launches the following dialog message:

SQLDeveloperInstall01

The installation pauses to ask you if you want to transfer an existing SQL Developer configuration by raising the following dialog. Assuming this is a new installation, the installer won’t find a prior configuration file. You need to click the “No” button to proceed.

SQLDevInstallPreferences

The installation continues and launches SQL Developer. The first time launch shows you the following Oracle Usage Tracking dialog. If you don’t want your use monitored, uncheck the “Allow automated usage reporting to Oracle” checkbox. Click the “OK” button to continue.

SQLDevUsageTracking

After dismissing the Oracle Usage Tracking dialog, you see the SQL Developer environment:

SQLDeveloper

After installing SQL Developer in the root account, you can install it as the student user. You use this command as the student user:

/opt/sqldeveloper/sqldeveloper.sh

It returns the following error because it’s the second installation and SQL Developer doesn’t prompt you to configure the user’s product.conf file with the working JDK location:

 Oracle SQL Developer
 Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
 
Type the full pathname of a JDK installation (or Ctrl-C to quit), the path will be stored in /home/student/.sqldeveloper/4.0.0/product.conf
Error:  Unable to get APP_JAVA_HOME input from stdin after 10 tries

You need to edit the /home/student/.sqldeveloper/4.0.0/product.conf file, and add the following line to the file:

# SetJavaHome /path/jdk
SetJavaHome /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.79-2.5.5.0.fc20.x86_64

Now, you can launch SQL Developer with the following command:

/opt/sqldeveloper/sqldeveloper.sh

Alternatively, you can add the following alias to the student user’s .bashrc file:

# Set alias for SQL Developer tool.
alias sqldeveloper="/opt/sqldeveloper/sqldeveloper.sh"

You can now launch the SQL Developer tool, like this as the student user:

sqldeveloper

You see the following when SQL Developer launches:

SQLDevInterface

As always, I hope this helps those trying to sort out installing SQL Developer on a Fedora server.

Written by maclochlainn

April 25th, 2015 at 2:38 am

A/UX, NeXTSTEP, & OS X

with 5 comments

One thing that gets tedious in the IT community and Oracle community is the penchant for Windows only solutions. While Microsoft does an excellent job in certain domains, I remain a loyal Apple customer. By the way, you can install Oracle Client software on Mac OS X and run SQL Developer against any Oracle Database server. You can even run MySQL Workbench and MySQL server natively on the Mac OS X platform, which creates a robust development platform and gives you more testing options with the MySQL monitor (the client software).

Notwithstanding, some Windows users appear to malign Apple and the Mac OS X on compatibility, but they don’t understand that it’s a derivative of the Research Unix, through BSD (Berkeley Software Distribution). This Unix lineage chart illustrates it well:

I’m probably loyal to Apple because in the early 1990’s I worked on Mac OS 6, Mac OS 7, A/UX, NeXTSTEP, and AIX/6000 (Version 3) while working at APL (American President Lines) in Oakland, California. Back then, my desktop was a pricey Macintosh Quadra 950 and today I work on a pricey Mac Pro desktop. The Mac Pro lets me use VMware virtualize development environments for Oracle Linux, Red Hat Enterprise Linux, Fedora, and as you might guess Windows 7/8. My question to those dyed in the wool Microsoft users is simple, why would you choose a single user OS like Windows over a multi-user OS like Mac OS X?

Written by maclochlainn

April 18th, 2014 at 4:28 pm

Mac Mini to the rescue

with 7 comments

In teaching, I had a problem because my students have different base operating systems, like Windows 7, Windows 8, Linux, and Mac OS X. I needed a teaching and lecture platform that would let me teach it all (not to mention support their environments). That meant it had to virtualize any of the following with a portable device:MacMiniConsole

  • Windows 7 or 8 hosting natively an Oracle Database 11g XE, 11g, or 12c and MySQL Database 5.6
  • Windows 7 or 8 hosting a Fedora or Oracle Unbreakable Linux VM (3 or 4 GB) with Oracle Database 11g XE, 11g, or 12c and MySQL Database 5.6
  • Mac OS X hosting a Fedora or Oracle Unbreakable Linux VM (3 or 4 GB) with Oracle Database 11g XE, 11g, or 12c and MySQL Database 5.6
  • Ubuntu hosting a Fedora or Oracle Unbreakable Linux VM (3 or 4 GB) with Oracle Database 11g XE, 11g, or 12c and MySQL Database 5.6

I never considered a manufacturer other than Apple for a laptop since they adopted the Intel chip. Too many of the others sell non-hyperthreaded laptop machines that they market as i5 or i7 64-bit OS machines when they’re not. Some of those vendors disable the hyperthreading facility while others provide motherboards that can’t support hyperthreading. The ones I dislike the most provide a BIOS setting that gives the impression you can enable hyperthreading when you can’t. All Apple devices, MacBook, MacBook Pro, Mac Mini, and Mac Pro do fully support a 64-bit OS and their virtualization.

A MacBook Pro came to mind but the disk space requirements were 1 TB, and that’s too pricey. I went with the Mac Mini because with 16 GB of memory and a 1 TB drive it was only $1,200. Add a wireless keyboard and mighty mouse, and an HDMI and mini-DVI connections, and I had my solution. Naturally, my desktop is a one generation old Mac Pro with 64 GB of memory and 12 TB of disk space, which supports all the virtual machines used for testing. Note to Apple marketing staff: The prior version of the Mac Pro let you pay reasonable (3rd party) prices for the additional memory and disk drives.

The Mac Mini means I can travel anywhere and plug into the console and demo tools and techniques from a myriad set of platforms without the hassle of moving on and off to frequently VM images. It’s a great solution with only one downside, HDMI to DVI sometimes creates purple toned screens. It’s unfortunate because some venues have monitors that don’t support HDMI).

Written by maclochlainn

February 6th, 2014 at 12:17 pm