Installation of Oracle
Installing Oracle Database involves several steps, including downloading the software, preparing the environment, running the installer, and configuring the database. Below is a general guide for installing Oracle Database on a Linux system. The steps may vary slightly depending on the specific version of Oracle and the operating system.
Prerequisites
- System Requirements: Ensure your system meets the hardware and software requirements for the Oracle version you are installing.
- Oracle Account: You need an Oracle account to download the software from the Oracle website.
- Required Packages: Install necessary packages and libraries. For example, on a Linux system, you might need packages likeĀ
binutils
,Ācompat-libstdc++
,Āelfutils-libelf
,Āgcc
,Āglibc
,Ālibaio
,Ālibgcc
,Ālibstdc++
,Āmake
,Āsysstat
, andĀunixODBC
.
Step-by-Step Installation Guide
1. Download the Oracle Software
- Go to theĀ Oracle Technology Network (OTN)Ā and download the appropriate version of Oracle Database for your operating system.
2. Prepare the Environment
- Create Oracle User and Groups:
sudo groupadd oinstall sudo groupadd dba sudo useradd -g oinstall -G dba oracle sudo passwd oracle
- Set Kernel Parameters:
EditĀ/etc/sysctl.conf
Ā to include the following parameters:kernel.shmall = 2097152 kernel.shmmax = 2147483648 kernel.shmmni = 4096 kernel.sem = 250 32000 100 128 fs.file-max = 6815744 net.ipv4.ip_local_port_range = 9000 65500 net.core.rmem_default = 262144 net.core.rmem_max = 4194304 net.core.wmem_default = 262144 net.core.wmem_max = 1048576
Apply the changes:
sudo sysctl -p
- Set User Limits:
EditĀ/etc/security/limits.conf
Ā to include:oracle soft nproc 2047 oracle hard nproc 16384 oracle soft nofile 1024 oracle hard nofile 65536
- Create Directories:
sudo mkdir -p /u01/app/oracle sudo chown -R oracle:oinstall /u01/app sudo chmod -R 775 /u01/app
3. Configure Environment Variables
- Edit theĀ
.bash_profile
Ā orĀ.bashrc
Ā file for theĀoracle
Ā user:export ORACLE_BASE=/u01/app/oracle export ORACLE_HOME=$ORACLE_BASE/product/12.1.0/dbhome_1 export ORACLE_SID=orcl export PATH=$ORACLE_HOME/bin:$PATH export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib
4. Run the Oracle Installer
- Unzip the downloaded Oracle software:
unzip linuxx64_12201_database.zip
- Navigate to theĀ
database
Ā directory and start the installer:cd database ./runInstaller
- Follow the prompts in the Oracle Universal Installer (OUI):
- Select installation option (e.g., “Install database software only” or “Create and configure a database”).
- Specify the Oracle Base and Home directories.
- Choose the database edition (Enterprise, Standard, etc.).
- Complete the prerequisite checks.
- Review the summary and start the installation.
5. Execute Configuration Scripts
- After the installation, the OUI will prompt you to run configuration scripts as the root user:
sudo /u01/app/oraInventory/orainstRoot.sh sudo /u01/app/oracle/product/12.1.0/dbhome_1/root.sh
6. Configure the Database (if not done during installation)
- If you chose to create a database during installation, it will be configured automatically. Otherwise, you can use the Database Configuration Assistant (DBCA) to create and configure a database:
dbca
7. Verify the Installation
- Check the status of the Oracle listener:
lsnrctl status
- Connect to the database using SQL*Plus:
sqlplus / as sysdba
Post-Installation Tasks
- Backup: Take a backup of your new database.
- Security: Apply the latest security patches and updates.
- Networking: Configure Oracle Net Services for remote connections if needed.
Troubleshooting
- Check Logs: Review the installation logs located inĀ
$ORACLE_BASE/cfgtoollogs
Ā for any errors. - Environment Variables: Ensure all environment variables are correctly set.
- Permissions: Verify that the Oracle user has the correct permissions on all directories.
This guide provides a high-level overview of the Oracle Database installation process. For detailed instructions, refer to the official Oracle documentation specific to your version and operating system.