Install Oracle Database 11g Express Edition on CentOS 6.x
Oracle database is one of the most widely used relational database management systems (RDBMS) in enterprise environments. Developed, maintained, and supported by Oracle Corporation, this RDBMS is often installed on top of a flavor of Enterprise Linux (RHEL, CentOS, or Scientific Linux). This makes for a very robust operating system — database choice.
In this article, I will explain how to install Oracle Database 11g Express Edition on CentOS 6.x
- Product: Oracle Database 11g Express Edition
- Version : 188.8.131.52.0
- Install Oracle Dependencies
Use “oracle-rdbms-server-11gR2-preinstall” package offered by “Oracle Public Yum” repository. The Oracle public yum repository provides a free and easiest way to install all the latest Oracle Linux dependencies automatically.
To setup yum repository, follow the instructions provided below.
yum install oracle-rdbms-server-11gR2-preinstall
Note : While importing GPG key, you might get “GPG key retrieval failed” error as shown below.
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
GPG key retrieval failed: [Errno 14] Could not open/read file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
Download and verify the appropriate Oracle Linux GPG Key
wget https://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol6 -O /etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
2. Setting Hostname
Open the “/etc/sysconfig/network” file and modify the HOSTNAME to match your FQDN (Fully Qualified Domain Name) hostname.
<public-ip> oracle.rnavagamuwa.com rnavagamuwa
Now you need to restart networking on the server to make sure that changes will be persistent on reboot.
2. Oracle User Settings
- et the password for the “oracle” user.
- Add the entry to file “/etc/security/limits.d/90-nproc.conf” as described below.
* — nproc 16384
- Set SELinux to “permissive” mode by editing the file “/etc/selinux/config“.
- Restart the server to reflect new changes.
- Login as Oracle user and open file “.bash_profile“, which is available on oracle user’s home directory, make an entry as described below.
# Oracle Settingsexport PATH=/usr/java/default/bin:$PATH
4. Create a 2GB swap file
- Create the file to be used for swap.
sudo fallocate -l 2G /mnt/2GB.swap
- Format the file for swap.
sudo mkswap /mnt/2GB.swap
- Add the file to the system as a swap file.
sudo swapon /mnt/2GB.swap
- Add this line to the end of /etc/fstab to make the change permanent.
/mnt/2GB.swap none swap sw 0 0
- To change the swappiness value edit /etc/sysctl.conf and add the following line.
Start with a value of 10 and increase if needed. A typical default value for swappiness is 60. The higher the number (up to 100), the more often swap is utilized.
How much swappiness affects performance depends on how your memory is being used, so experiment to find an optimal value. At 0 the swap file will only be used when the system runs completely out of memory. Higher values let the system swap idle processes out to allow the system to free memory for disk caching, potentially improving overall system performance.
- Check that the swap file was created.
sudo swapon -s
- Set correct permissions to the swap file
chmod 600 /mnt/2GB.swap
5. Download and install software
- Download oracle DB from here.
- Unzip and install the rpm package.
rpm -i oracle-xe-11.2.0–1.0.x86_64.rpm
Call To Action
- Clap. Appreciate and let others find this article.
- Comment. Share your views on this article.
- Follow me. Randika Navagamuwa to receive updates on articles like this.
- Keep in touch. LinkedIn, Twitter, The TechFootPrint