Install Oracle Database in Linux

This is a guide that will show how to install Oracle Database (version 12c at this time) in Linux (Oracle Linux 7 is used).
The following is assumed:

  • Oracle Linux (or any Oracle Database approved Linux distribution) is installed with a minimum working set, i. e. working from the command line, as it is accessible via SSH.
  • A desktop running a Linux distribution with a window manager is used and the connections are performed to the server via SSH.
To simplify things, let’s say Oracle Linux is installed using the default “Minimal Install” option.

Setting up Linux

First thing to do is to update the system using
sudo yum update -y
Then add necessary software
sudo yum install -y binutils.x86_64 compat-libcap1.x86_64 gcc.x86_64 gcc-c++.x86_64 glibc.i686 glibc.x86_64 glibc-devel.i686 glibc-devel.x86_64 ksh compat-libstdc++-33 libaio.i686 libaio.x86_64 libaio-devel.i686 libaio-devel.x86_64 libgcc.i686 libgcc.x86_64 libstdc++.i686 libstdc++.x86_64 libstdc++-devel.i686 libstdc++-devel.x86_64 libXi.i686 libXi.x86_64 libXtst.i686 libXtst.x86_64 make.x86_64 sysstat.x86_64 zip unzip openssh-server

Getting GUI on Server

The Oracle Database installer is graphical a Java desktop application, and thus a window manager is required. If your server already has a graphical window manager, you can skip this
yum grouplist
Will show the available options. The easiest is just
sudo yum groupinstall "Server with GUI"
Though you may only require
sudo yum groupinstall "X Window System"
Or even a more lightweight option
sudo yum install -y xorg-x11-xauth xorg-x11-apps
Additional packages installation may be required depending.

Setting up Remote Display

The next step is to prepare to server to run the graphical applications in the desktop.


In the server perform the following:

  • If you use the C shell, type:
    setenv DISPLAY desktop-ip:n.n
  • If you use the Bourne shell, type:
    export DISPLAY
  • If you use the Korn shell, type:
    export DISPLAY=desktop-ip:n.n
Replace desktop-ip with the desktop IP address and n.n with the desktop display number.screen number (usually 0:0)

If the server and the desktop are all on the same network, usually setting DISPLAY to localhost:10.0 is good enough.


In the desktop perform the following:

xhost +
ssh -X user@server
Where server is the server IP, user is your server username and login using your credentials.

If you get a warning or error message about xauth, don’t worry about it. If you logout and login again the same way, it should have disappeared since thew first login should have fixed it.

To check if everything is working properly, after authenticated in the server from the desktop with using ssh -X, do

and the clock application should appear in the desktop screen.

Running Oracle Database Installer

The Oracle Database installer comes in a zip file, e.g., confirm the version and architecture is the correct one. Assuming the Oracle Database installer is ready for install, i.e. the zip file is already on the server (sftp may help on transferring the file from the desktop to the server), uncompress the file

and then run the installer
cd database

A precondition checkup is performed by the installer and you may need to do some additional things, such as install extra software packages. It is highly recommended that you do not ignore the dependencies (maybe except the swap) as it may have prevent the database to execute correctly.
During the installation, you will be required to run some scripts manually with administration privileges.

Finishing It

After the installation you may think that opening up a browser and pointing it to “https://server-ip:5500/” may be enough, but that may not be the case.

Setting up Database Administrator User

To add a databse administrator, from the server command line, run

sqlplus /as sysdba
create user admin identified by pass;
grant dba to admin; 
conn admin/pass;

Where “admin” is the username for the administration and “pass” is the correspondent password.


Oracle database works on specific ports, thus it is mandatory that the firewall allows them to carry traffic:

firewall-cmd --zone=public --add-port=1521/tcp --add-port=5500/tcp --add-port=5520/tcp --add-port=3938/tcp --permanent
firewall-cmd --reload

Environment Settings

Edit your .bash_profile and set the following

ORACLE_HOME=$ORACLE_BASE/product/12.1.0/dbhome_1; export ORACLE_HOME
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/usr/lib64; export LD_LIBRARY_PATH
Where <INSTALL_DIR> is the Oracle installation directory (you can check the installation log “oracle/oraInventory/logs“) and <ORA_SID> is the Oracle SID (usually “oracle”).


Now try https://server-ip:5500/em/ where server-ip is the server IP address. It is necessary to accept the certificate and the to have Flash installed, since Enterprise Manager is a Flash application that is served under HTTPS.
If the application does not execute properly, try using Internet Explorer from Microsoft Windows to see if it is working.

Change Keyboard Layout on Ubuntu Server Permanently

When working on Ubuntu Servers, sometimes the defined keyboard layout is not aligned with the physical keyboard one’s using.

In order to permanently change it, just execute the following two commands.

First, configure the keyboard:

sudo dpkg-reconfigure keyboard-configuration

Test the keyboard, in particular the characters like slash, asterisk, etc.. If things are not ok, just configure it again with different options.

Next, configure the console:

sudo dpkg-reconfigure console-setup

And that’s it.

If you want to configure the size of your TTY, i. e. the text console resolution, check ChangeTTYResolution.

Testing for Internet Explorer

While developing for the web, one has to take into account the various browsers that people use.
Depending on the kind of project and target users, this may range from an easy option focused on a single browser up to the dawnting task of supporting the most used browsers world wide.

To help in this task, Microsoft has provided a set of combinations of Windows and Internet Explorer versions in ready to use virtual machines available to all major operating systems.
You can get them here in the Modern.IE web site in the virtual tools section.

Setting Drupal File Permissions and Ownership

To correctly secure a Drupal installation in Linux, just follow these simple steps:

[root@localhost]cd /path_to_drupal_installation
[root@localhost]chown -R vsftpd:www-data .
[root@localhost]find . -type d -exec chmod u=rwx,g=rx,o= '{}' \;
[root@localhost]find . -type f -exec chmod u=rw,g=r,o= '{}' \;

Change the vsftpd by your own user name, ftp deamon user or what evere user you need.

[root@localhost]cd /path_to_drupal_installation/sites
[root@localhost]find . -type d -name files -exec chmod ug=rwx,o= '{}' \;
[root@localhost]for d in ./*/files
   find $d -type d -exec chmod ug=rwx,o= '{}' \;
   find $d -type f -exec chmod ug=rw,o= '{}' \;

Full article and explanation from Securing file permissions and ownership.

iSeries AS/400 Cheat Sheet

When IBM iSeriesAS/400 new users make contact with such a system, it’s easy to get a bit lost in the command line.

AS/400 commands are generally constructed with concatenated syntactical blocks, each having it’s own meaning. Usually the first block on a command specifies the action and the remaining act as modifiers. 
For example, the command WRKSYSSTS:

  • WRK, is the first block and means WoRK
  • SYS, is the second block and means SYStem
  • STS, is the third block and means STatuS

Here’s some useful commands:

Working Active Jobs
Description: shows working active jobs.
Command: wrkactjob

Working Submitted Jobs
Description: shows the list of the working submitted jobs
Command: wrksbmjob

Working Object Lock
Description: shows the locks on an object, like a file.
Command: wrkobjlck (library/object)

CPU Usage Statistics
Description: shows CPU usage statistics, usually filtered to show only resource usages above 2%.
Command: who

Working System Status
Description: shows system overview usage status and statistics .
Command: wrksyssts

Working Disks Statistics
Description: shows disk usage statistics.
Command: wrkdsksts

Display Message Descriptions
Description: shows detailed information about the messages in a message file.
Command: dspmsgd range(messageId) msgf(library/file)

Display File
Description: shows the contents of a file.
Command: df library/file

Work with Objects
Description: shows a list of names and attributes of specified objects in specified libraries.
Command: wrkobj file

When in trouble, strike F1, AS/400 has contextual help.