Home >Database >Oracle >centos oracle installation tutorial

centos oracle installation tutorial

王林
王林Original
2023-05-18 11:24:073260browse

Installing Oracle database can be performed on a variety of Linux distributions, with CentOS being one of the most popular choices. Below is a detailed guide to install Oracle on CentOS:

  1. Install necessary software packages

Before installing Oracle, some software packages must be installed. These packages can be installed via yum. Open a terminal and enter the following command:

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

Before entering the command, make sure you have yum installed.

  1. Create operating system users and groups

Before installing Oracle, you need to create a dedicated Oracle operating system user and group. Open a terminal and enter the following command:

sudo groupadd oinstall
sudo groupadd dba
sudo useradd -g oinstall -G dba oracle
  1. Configure kernel parameters

Oracle requires some kernel parameters to ensure normal operation. Open a terminal and use an editor to open the /etc/sysctl.conf file:

sudo vi /etc/sysctl.conf

Add the following line at the end of the file:

fs.file-max = 6815744
kernel.sem = 250 32000 100 128
kernel.shmmni = 4096
kernel.shmall = 1073741824
kernel.shmmax = 4398046511104
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
fs.aio-max-nr = 1048576

Save and close the file. To make the kernel parameters take effect immediately, please enter the following command:

sudo sysctl -p
  1. Configure user environment variables

You need to configure some environment variables for the Oracle user. Open a terminal and use an editor to open the /home/oracle/.bash_profile file:

sudo vi /home/oracle/.bash_profile

Add the following line at the end of the file:

export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
export ORACLE_SID=orcl
export PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin

Save and close the file.

  1. Download and install Oracle database

You can download the installation program of Oracle database from the official website. The name of the installer should be something like oracle-xe-11.2.0-1.0.x86_64.rpm.sh. After downloading, please use the terminal to enter the directory where the downloaded file is located and enter the following command:

sudo chmod +x oracle-xe-11.2.0-1.0.x86_64.rpm.sh
sudo ./oracle-xe-11.2.0-1.0.x86_64.rpm.sh

Please follow the wizard to complete the installation process. You will be asked to set the Oracle system password. Be sure to use secure and strong passwords. The installation process will take some time.

  1. Configuring Oracle

After the installation is complete, you need to perform some configuration on Oracle. Use the terminal to enter the Oracle installation directory and enter the following command:

sudo /etc/init.d/oracle-xe configure

Follow the wizard to complete the configuration process. You will need to provide the following information:

  • Listening address of the Oracle listener (default is 127.0.0.1)
  • Listening port of the Oracle listener (default is 1521)
  • Oracle Administrator User Password

After completion, please enter the following command to start Oracle:

sudo service oracle-xe start

At this point, you have successfully installed the Oracle database on CentOS.

References:

  1. https://blog.csdn.net/u011032163/article/details/90589699
  2. https://www.techolac.com /linux/install-oracle-11g-r2-on-centos-7/

The above is the detailed content of centos oracle installation tutorial. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn