Installing Oracle 11g (in a virtual machine) in a Linux system (x64)

Source: Internet
Author: User
Tags dba

Bo Master Small white One, recently is learning about linux,oracle knowledge. The content is written by the blogger in the online reference of a lot of content, hands-on success, due to Bo Master ability is limited, such as the discovery of errors, or encounter problems, I hope you have a lot of advice and joint discussion. Share to friends in need, no thanks!!!

Linux version (x64) 6.4 Oracle 11g

Because the blogger's Linux is Redhat, the way to view the version is:

Cat/etc/redhat-release

Other versions can be searched online.

One, put the Oracle installation package and the image into the virtual machine


I installed in the virtual machine, for the Linux and window content sharing is not very understanding, only copy and paste or with a USB flash drive, in order to prevent the installation package and image can not be copied into the Linux, I choose to put the necessary things in the virtual machine first:

Create a new folder in/TMP Oracle, put the required content inside. Because the file and the image memory is too large, the transmission time is longer, but also can be saved when needed (using the copy and paste method under root, if under the Oracle user, you need to give the relevant permissions)


Second, pre-installation preparation

Switch to the root user to do the following:

1) Modify the user's shell limit

Input: vi/etc/security/limits.conf, press I to enter edit mode, enter the following:

oracle soft nproc 2047 oracle hard nproc 16384 oracle soft nofile 1024 oracle hard nofile 65536


When you are finished editing, press ESC to exit edit. Enter ": Wq" to save the exit


2) Modify/etc/pam.d/login

Input command: Vi/etc/pam.d/login, press I to enter the edit mode, add the following content to the file:


Session required/lib/security/pam_limits.so

Session Required Pam_limits.so


Enter ": Wq" to save the exit

3) modifying the Linux kernel

Input command: vi/etc/sysctl.conf, press I to enter the edit mode, add the following content to the file:

fs.file-max = 6815744 fs.aio-max-nr = 1048576 kernel.shmall = 2097152 kernel.shmmax = 2147483648 kernel.shmmni = 4096 kernel.sem = 250 32000 100 128 net.ipv4.ip_local_port_range = 9000 65500 net.core.rmem_default = 4194304 net.core.rmem_max = 4194304 net.core.wmem_default = 262144

net.core.wmem_max = 1048576


  编辑完成后按Esc键,输入“:wq”存盘退出


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 else ulimit -u 16384 -n 65536 fi fi


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


6) Create related users and groups

Groupadd Oinstall

Groupadd dba

USERADD-G oinstall-g dba Oracle

passwd dba


To see if the creation was successful:


Tail/etc/group

tail/etc/passwd

7) Create the database installation directory, under the home of Oracle


mkdir /home/oracle/app mkdir /home/oracle/app/oracle

Modify a file's owner, group, and access rights


chown -R oracle:oinstall /home/oracle/app

Chmod-r 777 /home/oracle/app


Check the file and directory permissions you created to see if the next operational requirements are met


8) Configure user environment variables for Oracle

Input: VI. bash_profile

Press I to edit. Bash_profile, enter edit mode and add the following:


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

export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib


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


There are a few things to consider in the configuration of environment variables:

(1) Switch to the Oracle user, sometimes "su-oracle", save the modified file will not be saved, at this time because the user's permissions are not enough, you can choose to change the user rights, or "logout" to quit the current user, re-login to the Oracle user

(2) When the environment variable is configured, if you cannot determine what the path is, you can enter

echo $PATH to view the path, other paths are as above.


Three-mount

1) switch to Oracle user on the graphical interface, unzip the Oracle installation package

Enter the command:

unzip linux.x64_11gR2_database_1of2.zip

unzip linux.x64_11gR2_database_2of2.zip

 

Note: If the decompression is unsuccessful, you can find the reason from two aspects: one is to see if there are files to extract, and two is to see if the user has the ability to decompress the file.

2) After the decompression is complete, the CD enters its unzipped directory.

Enter the command:

CD database (database in your extracted directory, according to your own situation, into the database)

Use the LS command to view the files that the database contains after decompression

3) Perform the installation, enter the command:./runinstaller

Start to display the graphical installation, the missing RPM package is displayed during the graphical installation and you need to install it from the mirror

You can put the image file in the/mnt

Input command: RPM-IVH xxx.rpm installation package, the name of the specific package can be viewed in the mirror.

Installation is complete.


After the installation is complete, switch to the Oracle user and enter:

Sqlplus/nolog

Connect/as SYSDBA

Four in the Oracle user's graphical interface Oracle users, a new terminal, the Direct input command: DBCA, to complete the database build library.

In this case, the database repository is no longer described in detail.

Installing Oracle 11g (in a virtual machine) in a Linux system (x64)

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: info-contact@alibabacloud.com 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.