Linux ORACLE11GR2 system installation to database Setup configuration and final Oracle DMP file import one-stop operation record (RPM)

Source: Internet
Author: User
Tags chmod

Brief introduction

Before also installed under Linux Oralce, can be a daze each time, because the brain blank, online casually see a document on the direct copy, finally made a mess, although installed, but the chaos is very, in recent days because of resignation, handover time and install Oracle, found that the old encountered errors, Cause can not be loaded, through this time I have a good study of the next Oracle, do not want to make it clear, now record, hope to be able to other online friends to provide a point of help, the paper borrowed a large number of users of the summary, first thank them!

Installation Environment

Linux servers: Suse11-linux 64/32-bit
Oracle Server: ORACLE11GR2 64/32-bit

System Requirements

Memory: Must be higher than 1G of physical memory
Swap space: Typically twice times the memory, for example: 1G of memory can be set to swap partition 3G size
Hard disk: Above 5G

System Configuration

First, perform the following steps under the root user:

1) Modify the user's shell restrictions, modify the/etc/security/limits.conf file, enter the command: vi/etc/security/limits.conf, press the I key to enter the editing mode, add the following content to the file

Oracle Soft Nproc 2047

Oracle Hard Nproc 16384

Oracle Soft Nofile 1024

Oracle Hard Nofile 65536

Press ESC when editing is complete and enter ": Wq" to save the exit. (Do not configure the installation will be prompted when the lack of space, up to XXX ... No installation required)

2) Modify the/etc/pam.d/login file, enter the command: Vi/etc/pam.d/login, press the I key to enter the editing mode, add the following content to the file

Session required/lib/security/
Session Required

Press ESC when editing is complete and enter ": Wq" to eject

3) Modify the Linux kernel, modify the/etc/sysctl.conf file

Kernel.shmall = 268435456



Kernel.sem = 250 32000 100 128

net.ipv4.ip_local_port_range=9000 65500





Press ESC when editing is complete and enter ": Wq" to eject

4) to make the/etc/sysctl.conf change take effect immediately, execute the following command. Input: Sysctl-p

5) Edit/etc/profile, enter command: Vi/etc/profile, press I to enter edit mode, add the following content to the file

if [$USER = "Oracle"]; Then

if [$SHELL = "/bin/ksh"]; Then

Ulimit-p 16384

Ulimit-n 65536


Ulimit-u 16384-n 65536


Umask 022


Press ESC when editing is complete and enter ": Wq" to eject

6) Create related users and groups as owners of software installation and support groups

To create a user, enter a command:

Groupadd Oinstall
Groupadd dba

(Create users and groups)

Create Oracle user and password, enter command: (Grant permission)

useradd-d/home/oracle-g oinstall-g dba-m Oracle

passwd Oracle

Then will let you enter the password, the password any input 2 times, but must be consistent, enter the confirmation

7) Create database software directory and data file directory, directory location, according to their own situation, pay attention to disk space, here I put it under the Oracle user, for example:

Enter the command:



8) Change Directory owner is owned by Oracle user, enter command:

Chown–r Oracle:oinstall/u01/app

Chown-r oracle:oinstall/opt/oracle

chmod 755-r/u01/app

chmod 755-r/opt/oracle

Second, perform the following steps under Oracle User:

9) Configure environment variables for Oracle users, first, switch to the newly created Oracle user

Input: Su–oracle, and then directly in input: Vi/home/oracle/.bash_profile, press I edit. bash_profile, enter edit mode to add the following:

Umask 022

Export Oracle_base=/u01/app/oracle

Export Oracle_home= $ORACLE _base/product/11.0.1/db_1


Path= $PATH: $HOME/bin: $ORACLE _home/bin: $ORACLE _home/opatch: $ORACLE _home/jdk/bin: $PATH

Export PATH

Export lc_all= "en_US"

Export lang= "en_US"

Export nls_lang= "American_america. ZHS16GBK "

Export nls_date_format= "Yyyy-mm-dd HH24:MI:SS"

Press ESC when editing is complete and enter ": Wq" to eject

Installing the Oracle System

1, when the above system requires the operation of all completed, logout system, in the graphical interface to the Oracle user login. First copy the downloaded Oracle installation package to Linux, and we recommend copying it with Xmanager or other FTP tools.

Send Oracle installation package to/opt/oracle with Oracle user

(The following two steps need to be performed under the root user)




Assign Yihaodian the extracted folder permissions

chmod 777-r/opt/oracle/database/

2, pre-installation detection of the dependency package (if you need to download:, there is a free website can be downloaded: (if you do not want to search, I csdn download it))

1, rpm-q binutils compat-libstdc++-33 elfutils-libelf elfutils-libelf-devel glibc glibc-common glibc-devel gcc-gcc-c++ L Ibaio-devel Libaio libgcc libstdc++ libstdc++-devel make Sysstat unixODBC unixodbc-devel Pdksh

2, rpm-q binutils compat-db control-center gcc gcc-c++ glibc glibc-common gnome-libs libstdc++ libstdc++-devel make Pdksh Sysstat XScreenSaver Libaio Openmotif21

3, rpm-q gcc make binutils setarch compat-db compat-gcc compat-gcc-c++ compat-libstdc++ compat-libstdc++-devel unixODBC un Ixodbc-devel Libaio-devel Sysstat

The above detection is sure to indicate which RPM is not installed, if not detected, it does not matter, the next time the Oracle installation is still undetectable, when you are installed is not too late.

3. Perform the installation of Oracle database software on Oracle users

Enter the command:

4, solve garbled characters (character set is not the same, at this time the installation may appear garbled, resolved as follows:)

Export Lang=en_us

5, the installation process (list needs to be noted, the other default is the next step)

6, after a long wait, installation completed:

After the installation is complete, you will be prompted to execute 2 shell scripts with root privileges. Follow the path of its prompt to find its location,

Note: Switch to root user, execute under command


And then give the Oracle_home path .

Establishing an Oracle Database

1) or in Oracle user's graphical interface Oracle user, a new terminal, the direct input command DBCA will pop up the following interface. We use a custom database here, if not started attention. Bash_profile Environment Variables and screen display issues (Xclock, Xhost +)

Note: Here to choose the first and second line, to see your needs

Enter a unified password (you can also set its password separately)

Database storage location Default is good, you can also set your own

Do not specify fast recovery and archiving

Remove the infrequently used modules

Memory allocations and specified character sets

Note: The character set is not selected, there will be a lot of problems in the following data or elsewhere, this character set is consistent with your project requirements

Installation Complete

Setting Up Configuration Monitoring

1) in Oracle User's graphical interface Oracle user, the new terminal is opened, the input command NETCA will pop up the following interface

Create a listening service (acting as an Oracle Server for other Oracle clients to connect to this Oracle server)

The listener name can be set freely.

Monitoring Configuration Complete

Configure the local Network service name (acting as an Oracle client, connecting to another Oracle server)

Enter the instance name of the database for the connected Oracle server (the SID name of the database previously established)

Enter the IP address of your Oracle server

Choose to test the connection

Click Change Login to enter one of the user names and passwords for the connected Oracle server, click OK

This interface indicates the success of the test (if unsuccessful, see if the network is unblocked, whether the connected Oracle server is started, whether the listener is started, etc.)

Name a local network service name you set

Configuration complete at this point

Start the database

1, the default database is established after the start, if the server restarts, it is necessary to manually start it, the command is as follows:

Export ORACLE_SID=ORCL (Select the database SID you want to start)

Echo $ORACLE _sid (show instance name)


Connect SYS as SYSDBA

(Enter your password)

Startup (Database startup)

2. Start monitoring

First, exit SQL execution from the database above and return to the normal command line with quit or exit

Start monitoring: Lsnrctl start (if the listener name is not the default, start your corresponding listener name)


1, create a temporary table space , the user must first create a temporary tablespace and database table space two table space, otherwise the system default table space is not good

Create temporary tablespace ha_temp tempfile '/u01/app/oralce/oradata/orcl/ha_temp.dbf ' size 1024m autoextend on next 100m MaxSize 10240m extent management local;


1) zd_temp temp Table space Name

2)/u01/app/oralce/oradata/orcl/the place where the database files are stored, usually after the database is installed, there are control files, data files and log files in the folder, plus the name of the table space to create +DBF (data file)

3) Initial size of 1024m table space

4) Auto-grow size of 100m table space

5) Maximum size of 10240m table space

2. Create a data table space

Create tablespace ha logging datafile '/u01/app/oralce/oradata/orcl/ha.dbf ' size 1024m autoextend on next 100m maxsize 1024 0m extent management Local;

3. create user and specify table space

Create user HA1 identified by zd315 default tablespace abc temporary tablespace ha;

4. grant permissions to users

Create user HA1 identified by zd315 default Tablespace ha;

IMP Imports Oracle database DMP file under Linux

Enter the command:
Imp ha1/[email protected] file=/opt/oracle/hadrp.dmp ignore=y full=y

Description: HA1: User name;

zd315: password;

ORCL: database instance name;

File is followed by the path of the DMP file placement.

Connect under Window

1. Instant Client 11g Installation and configuration

2. PL/SQL tools can be connected

Summary: This article resolves the installation of the Oracle system and the establishment of the database configuration and the final database import process, the above-written content to draw on a lot of online resources, to thank them, I hope I write a little help to the people behind


Linux ORACLE11GR2 system installation to database Setup configuration and final Oracle DMP file import one-stop operation record (RPM)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.