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
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
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:
If you use the Korn shell, type:
with the desktop IP address and n.n
desktop display number.screen number
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:
ssh -X user@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. linuxx64_12201_database.zip, 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
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.
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;
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
Edit your .bash_profile and set the following
TMPDIR=$TMP; export TMPDIR
ORACLE_BASE=/<INSTALL_DIR>/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/12.1.0/dbhome_1; export ORACLE_HOME
ORACLE_SID=<ORA_SID>; export ORACLE_SID
PATH=$ORACLE_HOME/bin:$PATH; export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/usr/lib64; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH
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.