Home > Database > Oracle > body text

oracle for linux installation tutorial

WBOY
Release: 2023-05-13 20:40:06
Original
973 people have browsed it

Oracle for Linux is a very popular enterprise-level database software that is often used to process large amounts of data. This article will provide a detailed Oracle for Linux installation tutorial to help you install and configure the software in the Linux operating system. This article explains how to download software packages, set environment variables, create database instances, start and stop Oracle instances, and more.

1. Download the Oracle for Linux installation package

First, you need to download the Oracle for Linux installation package from Oracle's official website. Before downloading, you need to register an Oracle account and log in to the account. The specific steps are as follows:

  1. Visit Oracle’s official website https://www.oracle.com/index.html
  2. In the upper right corner of the homepage, click the “Sign In” button. And enter your account number and password to log in.
  3. After successful login, find the "Database" option under the "Products and Services" menu on the left side of the page, and then select "Oracle Database Standard Edition 2" to enter the download page.
  4. In the download page, select the installation package that suits you according to your operating system. In this article, we will use the Linux x86-64 installation package for demonstration.
  5. After the download is complete, unzip the installation package to a folder you like, such as "/opt/Oracle".

2. Set environment variables

Before you start installing Oracle for Linux, you need to set some environment variables to ensure that Oracle can run correctly. The specific steps are as follows:

  1. Open the terminal and enter the root user.
  2. Enter the /etc/profile.d/ directory and create a new sh file:
cd /etc/profile.d/
touch oracle_env.sh
Copy after login
  1. Edit the sh file and add the following environment variables:
export ORACLE_HOME=/opt/Oracle/database
export ORACLE_SID=orcl
export PATH=$PATH:$ORACLE_HOME/bin
Copy after login

Note: In the above code, ORACLE_HOME should point to your Oracle for Linux installation directory (that is, the folder path where you unzipped the installation package), and ORACLE_SID is the name of the database instance you want to create. In the above code, we specified the instance name as "orcl", but you can modify it according to your needs.

  1. Save the file and run the following command to ensure that the environment variables take effect:
source /etc/profile.d/oracle_env.sh
Copy after login
  1. Check that your environment variables are set correctly:
echo $ORACLE_HOME
echo $ORACLE_SID
echo $PATH
Copy after login

3. Create a database instance

After successfully setting the environment variables, you can start creating your Oracle database instance. The specific steps are as follows:

  1. Run the following command to start the Oracle installation wizard:
cd /opt/Oracle/database
./runInstaller
Copy after login
  1. In the installation wizard page that appears, select "Create and configure database ".
  2. In the "Select Installation Options" page, select "Typical Installation".
  3. In the "System Class" page, select "Server Class".
  4. In the "Grid Installation Options" page, select "No".
  5. In the "Oracle Standard Edition General Purpose" page, select "Single-machine database installation".
  6. In the "Software Location" page, set the installation path of Oracle to the path you want to install and click "Next".
  7. In the "Database Edition" page, select the Oracle version you want to install (Enterprise Edition, Standard Edition, etc.).
  8. In the "Configuration Options" page, select "Create Database".
  9. In the "Database Identification" page, enter the name and password of the database instance you want to create.
  10. In the "Database Storage" page, select whether to use ASM storage management, and then specify the data storage path of the Oracle database.
  11. In the "Recovery Configuration" page, select the backup and recovery options you want to implement.
  12. In the "Database Content" page, select the database components you want to install, such as data dictionary, sample tables, toolkits, etc.
  13. Check your settings and click the "Install" button to install.
  14. After the installation is completed, click the "Finish" button to close the installation wizard.

4. Starting and stopping the Oracle instance

After you successfully install Oracle for Linux, you can use the following commands to start and stop the Oracle instance:

  1. Start instance:
su - oracle
sqlplus / as sysdba
startup
exit
Copy after login
  1. Stop instance:
su - oracle
sqlplus / as sysdba
shutdown immediate
exit
Copy after login

You have successfully installed and configured Oracle for Linux. You can use Oracle Database in a Linux operating system to meet your enterprise-level needs by setting environment variables, creating database instances, and starting and stopping Oracle instances.

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

source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!